Implementing Sitecore CI/CD On-premises using Azure Devops Part-1

Posted by

Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily – leading to multiple integrations per day. Each integration can then be verified by an automated build and automated tests.

This approach leads to significantly reduced integration problems, and you can detect errors quickly, and locate them more easily. The goal is to reduce the risk of seeing “integration hell” by waiting for the end of a project or a sprint to merge the work of all developers.

Continuous Integration/Continuous Delivery has become a necessary practice now a days.
There are numerous ways to achieve the same. One of the best approaches is DevOps.

DevOps do not have a fixed definition. Stating a definition by Atlassian below-

DevOps is a set of practices that automates the processes between software development and IT teams, in order that they can build, test, and release software faster and more reliably. The concept of DevOps is founded on building a culture of collaboration between teams that historically functioned in relative siloes.

Microsoft is offering DevOps services by the name of Azure DevOps. We are going to setup CI/CD over the same and will also understand to you can connect under GIT Repository with azure. So, let’s begin –

After you have created Azure devops account and project, you will see similar image as below.


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

  1. Create a new build pipeline.
  2. Connect it to your desired Git Repository. Here we are using Bitbucket.2
  3. Authorize your desired Repository connection.
  4. Select branch for Continuous Integration.
  5. Select appropriate build template. Here we are selecting ASP.NET as template.3

This shows azure devops is now connected with your desired Repository.

Configuring CI for the same Repository

  1. 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 –4
  2. Use NuGet 4.4.1
  3. NuGet Restore – This will restore all the required nuget for the solution.5
  4. Build Solution – Configure your build settings.6MSBuild Arguments –    a. DeployOnBuild
    b. WebPublishMethod
    c. PackageAsSingleFile


  5. 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.
  6.  Gulp – Configure gulp to run all the task in task runner which will build and deploy the files.7
    • 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.

    I have updated gulp task to include yml files when publishing the files so that we can run unicorn directly as output folder will contain all ymls as well.

  7. Archive Output – Create an archive location to keep the published solution files.8
    • 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.
  8. Publish Artifact – This method is used to deploy your output file into artifact so that you can use this file to deploy (CD) later.9
  9. We have configured the build step. Now let’s configure “Triggers” for CI.10
  10. 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 –11
    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. Hi Arpit,
    Can you please provide the link for part2 (continuation of this post as mentioned)
    Thanks in advance

Leave a Reply