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

Posted by

This is continuation of Implementing Sitecore CI/CD On-premises using Azure Devops Part-1

Let’s configure CD in Azure

Deployment groups

A deployment group is a logical set of deployment target machines that have agents installed on each one. Deployment groups represent the physical environments; for example, “Dev”, “Test”, “UAT”, and “Production”.

In effect, a deployment group is just another grouping of agents, much like an agent pool.

Click on deployment group under pipelines and enter deployment group name and description for your environment.


Once you provide the required details click create and you will get windows PowerShell script to execute on the desired environment so that azure devops can communicate with the machine.


Note: Check the checkbox which says “use a personal access token in the script for authentication” else you will be asked the same at the time of script execution

  • Copy the PowerShell script
  • Open windows PowerShell as administrator
  • Paste the script and press enter


Now you will be able to see your machine in deployment group.



Now let’s start to configure Release pipeline.

  1. Open Release under pipeline
  2. Click New Release Pipeline6
  3. Select template as IIS website deployment

  4. Click on Add an artifact
  5. Select the project for which you desired to create CD
  6. Select the build branch which you create in CI8
  7. Click on add. This will add the artifact.
  8. This artifact was developed when we configure CI in the previous blog (Publish Artifact)

Now let’s add jobs –

1. On Clicking Stage 1 or 1 job, 2 tasks you will get the following screen –



  • Stage name – Job name, you can give any name
  • Configuration type – IIS Website
  • Action – Create or Update
  • Website Name – Your website name in IIS

2. On clicking IIS Deployment, you will get following screen –


  • Display name – Name of Deployment group job
  • Deployment group – Select the deployment group add previously for which we need to deploy.
  • Artifact download – Artifact which contains our successfully build repo.


3. On clicking IIS Web App Manage, you will get following screen –


  • Display name – Step display name (Manage IISWebsite)
  • Physical path – System path for your website
    example – %SystemDrive%\inetpub\wwwroot\SitecoreDemo\Website


4. On clicking IIS Web App Deploy, you will get following screen –



  • Display name – Step display name (Deploy IIS Website/App:)
  • Package or Folder – File path to the package or a folder generated by MSBuild or a compressed archive file.
    Here we have to select the archive file which we had create for CI in Publish Artifacts step.
    Click on […] and select the folder – I named it as “drop”.



After you select the folder then add “\*.zip” at the end of the path.
This means search any zip file under this folder as zip file contains our repo which we need to publish.

Once the above steps are done, click save and then click create release(on top right).
Post that it will start executing and show the progress step wise as follows:



Here you go – Successfully deployed.

For continuous deployment:
Go back to edit release
Click continuous deployment trigger button and enable the same.


So, congratulations on configuring the CD pipeline on Azure cloud along with me.

Happy coding! 😊

One comment

Leave a Reply