Create a release pipeline

Completed

After configuring your build pipelines, you can use the generated artifact in a release pipeline. A new release pipeline can be created using the blue New pipeline button in the Releases menu under the Pipelines section.

Screenshot of the New pipeline button in the Releases menu.

In a release pipeline, you have to define where your artifacts are located and the different stages that a pipeline will go through. A stage is another job that will run on a build agent. The job can contain one or more tasks, that you can configure as we did with a release pipeline. For Business Central applications, you'll need to add PowerShell scripts, as there is no template (yet) in Azure DevOps. You start by selecting Empty job in the Stage part.

Screenshot of the new release pipeline select a template window.

If you select Add an artifact, you can select the artifact stored as a result of your build pipeline.

Screenshot of the Add an artifact window.

In the stage section, you can add steps to the job. Again, you can select PowerShell here, and then select a PowerShell file from your repository. Your build agent will execute those PowerShell scripts and deploy and publish your artifact to a specific Business Central instance.

Screenshot of the stage section where steps can be added to release pipeline steps.

Each stage can have some pre-deployment conditions and post-deployment conditions. You can open the conditions by selecting the icon before or after the stage block.

Screenshot of the add pre-deployment conditions feature.

In the pre-deployment conditions, you can specify that the stage will automatically deploy after the release or that it needs a manual interaction. You can configure to deploy using a schedule and specify that users from your team should allow deployment.

Screenshot of the Pre-deployment conditions window.

You can link different stages and create a structure where you can deploy to different environments automatically, and some manual. You can have a structure where you automatically deploy to a QA environment, but need to manually trigger a deploy to production, only after the deployment is approved.

Screenshot of the deployment structure stages.

In the release overview page, you can see all the different release pipelines, including their different releases, and the status for every stage in that release. Selecting a stage will list the details of every step in the job of that stage.

Screenshot of the release overview page.