Reputation: 1
How to create Azure devops yaml Pipleine.I'm currently trying to create multiple build pipelines for my Angular app in Azure DevOps using the new YAML way. … As far as I can tell from the docs it is not possible to define multiple pipelines in a single .yml file either. Is this scenario currently not supported in Azure DevOps
Upvotes: 0
Views: 194
Reputation: 15621
To create a pipeline, the simplified steps are ...
You can also read Create your first pipeline
As far as multiple pipelines in one .yml file: no, you define one pipeline in one yaml file. But that doesn't mean you cannot have multiple stages in one pipeline.
A stage is a logical boundary in the pipeline. It can be used to mark separation of concerns (for example, Build, QA, and production). Each stage contains one or more jobs. When you define multiple stages in a pipeline, by default, they run one after the other. You can specify the conditions for when a stage runs. When you are thinking about whether you need a stage, ask yourself:
- Do separate groups manage different parts of this pipeline? For example, you could have a test manager that manages the jobs that relate to testing and a different manager that manages jobs related to production deployment. In this case, it makes sense to have separate stages for testing and production.
- Is there a set of approvals that are connected to a specific job or set of jobs? If so, you can use stages to break your jobs into logical groups that require approvals.
- Are there jobs that need to run a long time? If you have part of your pipeline that will have an extended run time, it makes sense to divide them into their own stage.
and
You can organize pipeline jobs into stages. Stages are the major divisions in a pipeline: "build this app", "run these tests", and "deploy to pre-production" are good examples of stages. They are logical boundaries in your pipeline where you can pause the pipeline and perform various checks.
Source for the last snippet and an interesting read: Add stages, dependencies, & conditions.
Upvotes: 0