We're Hiring!
Take the next step in your career and work on diverse technology projects with cross-functional teams.
LEARN MORE
Mountain West Farm Bureau Insurance
office workers empowered by business technology solutions
BLOG
11
12
2020
1.28.2022

Are Multi-Stage YAML Pipelines in Azure DevOps Ready for Prime Time?

Last updated:
11.12.2020
1.28.2022

Microsoft recently announced that Multi-Stage YAML pipelines has gone GA (General Availability) and this has generated a lot of interest in YAML based pipelines replacing the UI based ones. The last time I looked at YAML pipelines, there were quite a few limitations for releases that kept us from fully switching over. Over the last few weeks, I did some live coding experiments on Twitch, performed a thorough comparison of features, and reviewed it with our teams to come to the conclusion that the Multi-Stages YAML pipelines are ready for prime time. You should start investigating and looking into the new features and additional functionality only available in the YAML pipelines.

Back in 2015, Microsoft updated the build system to the web based, cross platform system that is today. The build system is made up of two key parts. First is builds that performs activities that compile, verify quality of the code, and package the application into an artifact so it is ready to deploy and release. The two common types of builds that are performed here are PR builds and CI builds. Releases manage the orchestration of artifacts throughout the environment performing activities such as deployments, automated testing, approval gates, and more. Microsoft has renamed these builds to Classic UI builds.

A Multi-Stage YAML Pipeline represents the entire pipeline from CI to the deployments to each environment as a YAML code file. The YAML file essentially replaces what both the Builds and Releases accomplishes. This is built on the same platform as the Classic UI builds and releases.

YAML pipeline

Here is a simplified representation of what a multi-stage YAML Pipeline looks like. Any time you are using code versus an editor, there will be a learning curve. YAML is no different. It is a simple syntax of key value pairs similar to JSON but YAML uses indention instead of brackets.

trigger:

- master

stages:

- stage: CI

jobs:
  - job: Build and Package App
steps:
  - checkout
- Install Node.js
- npm install and build
- publish artifact

- stage: DEV

jobs:
  - deployment: Deploy Web App
    environment: Dev environment
    steps:
     - Provision Web App Infrastructure
     - Deploy Web App

-stage: PROD

jobs:
  - deployment: Deploy Web App
    environment: Prod environment
   steps:
     - Provision Web App Infrastructure
     - Deploy Web App

When authoring YAML pipelines you do get some assistance. Editing in the web and using the Azure Pipelines extension in VSCode provide intellisense and display error indicators if indenting or syntax isn't correct. In addition, when adding tasks as steps, you can use the assistant to find the desired task and help set the appropriate values.

YAML markup for Azure Web App

I went through all of the typical activities we perform builds and releases and made sure they were all able to be accomplished with YAML pipelines. All of these activities are available or equivalent functionality is available. Only one feature didn't have a good alternative in YAML pipelines is deployment gates. If you are using these, you probably will want to still with the releases for now or handle it with custom decorators. There are a few older technologies like TFVC and Subversion that are not supported. This link provides a nice feature comparison list.

YAML pipelines offer some advantages over the classic UI builds and releases. First, the YAML file is code and lives with the application code so when you branch your code, you branch your YAML pipeline file. This allows you to modify the build in your branch without affecting other branches. Also, with smaller applications and microservices able to be deployed independently, the overhead of having a PR, CI, and Release for each deployable because harder to manage. There's also a few new features in YAML pipelines that make them more compelling. Features like templates for making pipelines and utilizing environments to separate compliance and approvals from the pipelines.

If you haven't started looking into YAML pipelines, now that it is GA and at feature parity with classic UI pipelines, it is a great time to start. Microsoft Learn has several nice hands on labs for getting started. Microsoft Learn - Create a multistage pipeline by using Azure Pipelines.

Recent Blog Posts

lunavi logo alternate white and yellow
2.15.2022
02
.
15
.
2022
Service Changes Coming to Microsoft 365 & Office 365

The NCE offers new subscription terms including 12-month and 36-month plans priced lower than monthly contracts. In addition, it is easier to add seats, cancellation policies are more consistent, and there are two promotional options to lock in a better rate for your current renewal. However, the mandatory new plans do include price adjustments.

Learn more
lunavi logo alternate white and yellow
1.28.2022
01
.
21
.
2022
Automate Your Cloud with Azure Bicep

Azure Bicep is a great way to implement Infrastructure as a Code to automate the provisioning of Azure resources. In this post, I’ll get you started by describing how Bicep language works as well as key differences and similarities between Bicep and ARM Templates.

Learn more
lunavi logo alternate white and yellow
1.28.2022
12
.
22
.
2021
Lunavi Response to Log4j Vulnerability

The log4j vulnerability is affecting many Apache systems. Learn how Lunavi is responding to this ongoing threat.

Learn more