YAML PipeLine

YAML showing logical separation between your tasks.


So in this example, it was like building one stage for building the application, one stage for deploying to dev, one stage for deploying to production.
But in Use cases, depending on your use cases, those stages could be used for other purposes. For example, that could be a stage for running infrastructure tests in Windows Or tests inside a Linux machine

Inside PipeLine, a job is a collection of multiple tasks, and the stages is a collection of multiple jobs.


USE CASE
We have a front end and the back end application, 
we can compile both applications at the same time in parallel.


Jobs

  • Required two jobs, one to build the front end application and the second job to build the back end application.
  • Jobs by default, they will run in parallel. Unless you say this job depends on the first job(by using depends keyword)

 

Stage

  • Stages cannot run in parallel. They typically run in sequence.
  • STAGE 1: 
    • Have both jobs (build the front end application build the back end application) and  working as part of the same stage i.e the build stage,
  • STAGE 2:
    • A Job to deploying the application to the dev environment
    • A job for deploying that backend application to the dev environment.
  • STAGE 3
    • A Job to deploy our application into production.

 

Tasks

 

 

What Happen if we Run above Pipe Line

  • We have actually two jobs running in parallel, one for deploying the front end and the other one for deploying to back end.
  • We can see the job for deploying to prod us still waiting for these two jobs to finish running. And once run successfully.

 

Our Pipeline YAML file

 

 

Click Save and Run
in UI Now our stages are showing Horizontally

 

Summary

  • These build and release stages were defined in the GUI designer, but we can also define them into the Yaml pipeline.
  • We are running these stages or these jobs from a separate node pool and they can do that actually from different stages. 
  • Here we are using by default the VM image Ubuntu latest for all my stages unless we specify

 

Pipeline Documentation 


Related Question