I've started doing some testing using multi-stage pipelines to be able to have the pipeline as code, but I'm getting a bit confused about the usage of the pipeline considering we have Release pipeline as well, and multi-stage pipeline currently can do the release pipeline's job with gates and multiple environments, just in a code based pipeline which I would prefer.
My question is when should each of them be used?
Conclusion. The Azure DevOps Server provides two different types of pipelines to perform build, deployment, testing and further actions. A Build Pipeline is used to generate Artifacts out of Source Code. A Release Pipeline consumes the Artifacts and conducts follow-up actions within a multi-staging system.
A pipeline is comprised of Stages, Jobs, and Steps. A stage contains multiple jobs and jobs contain multiple steps. The YAML syntax following the outline above would be: stages: - stage: Build.
Release pipelines in Azure Pipelines help your team continuously deliver software to your customers at a faster pace and with lower risk. You can fully automate the testing and delivery of your software in multiple stages all the way to production.
Stages are the major divisions in your release pipeline: "run functional tests", "deploy to pre-production", and "deploy to production" are good examples of release stages.
When should each of them be used?
I strongly agree with iberodev's and Daniel's comments, that YAML is the future. Based on the needs of most developers and users, YAML has been the focus of our development work in recent sprints.
But as of now, your choice of what to use should be based on the features supported by each.
Most of time, we recommend you use YAML in multi-stage pipelines. We have provided support for most of the UI features in YAML, including pipeline resource, server job and etc.
Also, YAML still has some features that classic ui pipelines don't, such as Environments, Strategies jobs, job outputs, templating and etc. These are all only supported in YAML.
In addition, this is our latest YAML feature announcement document and we are still keeping this doc update as we put new features into the product. If the features you need to put into actual use are described in this document, I strongly suggest you use Multi-stage pipeline.
BUT, as I mentioned previously, we are developing but haven't supported all of the classic features in YAML. For example, one key feature in classic UI release pipelines, Gate, it is still in progress in development: Automated checks (gates) between stages.
When this or other features which haven't been added in YAML are necessary for your team, then you're better off using Release pipeline with classic UI for your product security.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With