Member-only story
YAML vs Classic Azure Pipelines
An honest comparison based on experience.
Classic pipelines are set up using a UI and clicking around, moving through tabs, and choosing between the options the UI shows you. The same definition applies to release pipelines, the difference is that the former are used generally to build applications and the latter to deploy them.
On the other hand, YAML pipelines are set up using code on, you guessed it, a YAML file. Azure DevOps has a task assistant that helps you find the tasks you need and add them to the YAML file.
You can build and deploy an application using classic pipelines. However, release pipelines have more features to manage deployments for different environments, triggers, pre, and post-deployment conditions, etc.
With YAML pipelines you can build and deploy an application as well. They have something called “deployment jobs” and “environments” that can be used to deploy to different environments, similar to what the release pipelines do.
Pros and Cons
YAML Pipelines
✅ Collaboration is easier since it is code and it can be treated as such (code reviews, pull requests, formatting tools, in-code comments).
✅ Another benefit of it being code is that it is easy to make changes to multiple values at the same time. For example, using your IDE’s search tool to find and replace several appearances of the same value.
✅ Using a version control tool, such as git, makes it very easy to compare changes.
✅ Since the pipeline is in a YAML file in the repo, if the repo needs to be reverted to an older commit, the pipeline version will also be reverted.
✅ It is now the default option in Azure DevOps for build pipelines.
✅ Most CI/CD tools support YAML, which makes it easier for you to change from one tool to another.
✅ Container jobs are exclusive to YAML pipelines.
🚫 It may take a bit more effort and time to get the hang of it. However, you can use the task assistant to add the tasks you need. Similarly, an existing classic pipeline can be exported as YAML, though a few adjustments will be necessary…