In the left side menu you get an option of Pipelines, this is the place where we need to work on for CI/CD setup.
Broadly categorizing the setup into two parts-
- Connecting Desired Repository
- Configuring CI for the same Repository
Connecting Desired Repository
- Create a new build pipeline.
- Connect it to your desired Git Repository. Here we are using Bitbucket.

- Authorize your desired Repository connection.
- Select branch for Continuous Integration.
- Select appropriate build template. Here we are selecting ASP.NET as template.

Configuring CI for the same Repository
- Remove Test Assemblies and Publish Symbols Path from job and add npm install, Gulp 03-Publish-All-Projects and Archive Output. Once done it will look something like the below image –

- Use NuGet 4.4.1
- NuGet Restore – This will restore all the required nuget for the solution.

- Build Solution – Configure your build settings.
MSBuild Arguments – a. DeployOnBuild
b. WebPublishMethod
c. PackageAsSingleFile
SkipInvalidConfigurations - Npm Install – This will add node module and let you run gulp task as we need to run gulp task to build and publish the solution.
- Gulp – Configure gulp to run all the task in task runner which will build and deploy the files.
- Gulp File Path – Select your gulp file which contains the task from the Repository.
- Gulp Task – Mention the gulp task function which will build and deploy your solution.
- Archive Output – Create an archive location to keep the published solution files.
- Root folder or file to archive – Create a folder to keep all the published files inside specific folder. I have named it as Output.
- Archive file to create – This field contains the path for archive zip file. $(Build.ArtifactStagingDirectory) – This is a temporary location to keep your created zip file. BuildOutputQA5Jul-$(Build.BuildId).zip – This part contains file name. I have added “BuildOutputQA5Jul” as prefix and “-$(Build.BuildId)” this will add unique build id to every build for distinguishing all the output file with respect to build.
- Publish Artifact – This method is used to deploy your output file into artifact so that you can use this file to deploy (CD) later.

- We have configured the build step. Now let’s configure “Triggers” for CI.

- Here will be enable continuous integration and select the branch for which you want to monitor the commits.
Let’s run the build now by click on queue –
So, congratulations on configuring the CI pipeline on Azure cloud along with me. For deploying CD configuration On-premises watch out this space.
A continuation blog (part-2) is available here.
継続的インテグレーションは、チームのメンバーが頻繁に作業を統合するソフトウェア開発プラクティスです。通常、各人は少なくとも毎日統合し、1日に複数の統合を行います。各統合は、自動ビルドと自動テストによって検証できます。
このアプローチにより、統合の問題が大幅に減少し、エラーをすばやく検出して、より簡単に見つけることができます。目標は、プロジェクトまたはスプリントの終了を待ってすべての開発者の作業をマージすることにより、「統合地獄」が発生するリスクを減らすことです。
継続的インテグレーション/継続的デリバリーは、今日必要な慣行になっています。 同じことを達成するための多くの方法があります。最良のアプローチの1つはDevOpsです。
DevOpsには固定定義がありません。以下にアトラシアンによる定義を述べる-
DevOpsは、ソフトウェア開発チームとITチームの間のプロセスを自動化して、ソフトウェアをより迅速かつ確実に構築、テスト、リリースできるようにする一連のプラクティスです。 DevOpsの概念は、歴史的に相対的なサイロで機能していたチーム間のコラボレーションの文化を構築することに基づいています。
Microsoftは、AzureDevOpsという名前でDevOpsサービスを提供しています。同じ上にCI / CDをセットアップし、GITリポジトリの下で紺碧で接続できることも理解します。それでは、始めましょう
Azure devopsアカウントとプロジェクトを作成すると、次のような画像が表示されます。

左側のメニューには、パイプラインのオプションがあります。これは、CI / CDセットアップのために作業する必要がある場所です。
セットアップを大きく2つの部分に分類します-
- 必要なリポジトリを接続する
- 同じリポジトリのCIを構成する
必要なリポジトリを接続する
- 新しいビルドパイプラインを作成します。
- 目的のGitリポジトリに接続します。 ここではBitbucketを使用しています。

- 目的のリポジトリ接続を承認します。
- 継続的インテグレーションのブランチを選択します。
- 適切なビルドテンプレートを選択します。 ここでは、テンプレートとしてASP.NETを選択しています。

これは、azuredevopsが目的のリポジトリに接続されていることを示しています。
同じリポジトリのCIを構成する
- テストアセンブリを削除し、シンボルパスをジョブから公開し、npm install、Gulp 03-Publish-All-Projects、およびアーカイブ出力を追加します。 完了すると、次の画像のようになります–

- NuGet4.4.1を使用する
- NuGetの復元–これにより、ソリューションに必要なすべてのnugetが復元されます。

- ビルドソリューション–ビルド設定を構成します。
MSBuildの引数–
a. DeployOnBuild
b. WebPublishMethod
c. PackageAsSingleFile SkipInvalidConfigurations - Npm Install –これにより、ノードモジュールが追加され、ソリューションをビルドして公開するためにgulpタスクを実行する必要があるため、gulpタスクを実行できるようになります。
- Gulp –ファイルをビルドおよびデプロイするタスクランナーですべてのタスクを実行するようにgulpを構成します。

- gulpファイルパス–リポジトリからタスクを含むgulpファイルを選択します。
- Gulpタスク–ソリューションをビルドしてデプロイするgulpタスク関数に言及します。ファイルを公開するときにymlファイルを含めるようにgulpタスクを更新しました。これにより、出力フォルダーにすべてのymlも含まれるため、ユニコーンを直接実行できます。
- アーカイブ出力–公開されたソリューションファイルを保持するアーカイブの場所を作成します。

- ルートフォルダまたはアーカイブするファイル–すべての公開ファイルを特定のフォルダ内に保持するフォルダを作成します。 私はそれを出力と名付けました。
- 作成するアーカイブファイル–このフィールドには、アーカイブzipファイルのパスが含まれます。
$(Build.ArtifactStagingDirectory) – This is a temporary location to keep your created zip file.
BuildOutputQA5Jul-$(Build.BuildId).zip – This part contains file name. I have added “BuildOutputQA5Jul” as prefix and “-$(Build.BuildId)” this will add unique build id to every build for distinguishing all the output file with respect to build.
- アーティファクトの公開–この方法は、出力ファイルをアーティファクトに展開するために使用され、後でこのファイルを使用して展開(CD)できるようにします。

- ビルドステップを構成しました。 それでは、CIの「トリガー」を構成しましょう。

- ここでは、継続的インテグレーションを有効にし、コミットを監視するブランチを選択します。
キューをクリックして、今すぐビルドを実行しましょう –
だから、私と一緒にAzureクラウドでCIパイプラインを構成しておめでとうございます。 CD構成を展開する場合は、オンプレミスでこのスペースに注意してください。 継続ブログ(パート2)はこちらから入手できます。
Hi Arpit,
Can you please provide the link for part2 (continuation of this post as mentioned)
Thanks in advance
Hi Raghava,
Here you go – https://iarpitkatiyar.com/2020/06/06/implementing-sitecore-ci-cd-on-premises-using-azure-devops-part-2/