{"id":61458,"date":"2021-04-27T09:00:00","date_gmt":"2021-04-27T08:00:00","guid":{"rendered":"http:\/\/content.n4stack.io\/?p=61458"},"modified":"2021-04-28T09:30:56","modified_gmt":"2021-04-28T08:30:56","slug":"azure-devops-multi-stage-pipelines","status":"publish","type":"post","link":"http:\/\/content.n4stack.io\/2021\/04\/27\/azure-devops-multi-stage-pipelines\/","title":{"rendered":"Azure DevOps Multi-Stage Pipelines"},"content":{"rendered":"

[et_pb_section fb_built=”1″ fullwidth=”on” _builder_version=”4.9.1″ _module_preset=”default”][et_pb_fullwidth_post_title categories=”off” comments=”off” featured_image=”off” text_color=”light” _builder_version=”4.9.1″ _module_preset=”default” background_color=”#3d3d3d” custom_padding=”200px||100px||false|false”][\/et_pb_fullwidth_post_title][\/et_pb_section][et_pb_section fb_built=”1″ _builder_version=”4.0.11″][et_pb_row _builder_version=”4.0.11″][et_pb_column type=”4_4″ _builder_version=”4.0.11″][et_pb_text _builder_version=”4.9.4″ text_font_size=”18px” header_text_color=”#e05206″ header_2_text_color=”#e05206″ header_3_text_color=”#e05206″ header_5_text_color=”#00a9e0″]As I move into using Azure DevOps more and more, there is one thing which I really haven\u2019t got on with and that is release pipelines. I didn\u2019t like that I couldn\u2019t easily define it as YAML like I could with build pipelines, even though I don\u2019t like them, there are a few things I do like \u2014 like approval gates.<\/p>\n

 <\/p>\n

Environments<\/h3>\n

Luckily, there are ways to get around th<\/span>is \u2014 the most simple way is to add an\u00a0Environment<\/em>\u00a0and then add an\u00a0Approval<\/em>. Adding an\u00a0Environment<\/em>\u00a0is simple enough, just click on\u00a0Environment<\/em>\u00a0in your\u00a0Pipeline<\/em>\u00a0and then add one with\u00a0None<\/em>\u00a0selected under\u00a0Resource<\/em>;<\/p>\n

\"\"<\/p>\n

Adding an environment {Source: MediaGlasses<\/a>}<\/p>\n

 <\/p>\n

Once you have added the\u00a0Environment<\/em>\u00a0you can then add an approval check, to do this click on the\u00a0Environment<\/em>\u00a0you have just created and click on the three dots in the top right-hand side of the page. From the menu select\u00a0Approvals and checks<\/em>;<\/p>\n

\"\"<\/p>\n

\"\"<\/p>\n

Adding an approval {Source: MediaGlasses<\/a>}<\/p>\n

 <\/p>\n

Now we have an\u00a0Environment<\/em>\u00a0and the\u00a0Approval<\/em>\u00a0in place we can move onto the Pipeline.<\/p>\n

 <\/p>\n

Pipeline<\/h3>\n

I already had a multi-stage pipeline I have been using to demo a container build, so I decided to adapt that as it made sense to slot in an approval at the stage where our container image is built, tagged and pushed, there are a few stages before that though so lets take a quick look at those.<\/p>\n

First up is the stage where the Resource Group is created;<\/p>\n

[\/et_pb_text][et_pb_code _builder_version=”4.9.4″]