Stages
To organize more complex pipelines composed of a significant number of steps, Microtica allows you to group multiple steps in stages, that suppose to execute in parallel.
Stages can be declared usingĀ stagesĀ property in the pipeline yaml by specifying the stage names in an ordered list. Declared stages can then be referenced from the steps by specifying the name of the stage.
All steps assigned to a certain stage are executed in parallel.
You can assign one stage to multiple steps but you canāt assign a step to multiple stages.
Steps that are not assigned to any stage will be automatically assigned to the default stage that will execute first.
Here is skeleton of pipeline with stages:
InĀ this example, we will create a pipeline that consists of two stages and three steps.
Here is the graphical preview of the pipeline:
In the example above, we define two stages,Ā buildĀ andĀ test.Ā We also define three steps,Ā BuildMyAppĀ that belongs toĀ theĀ buildĀ stage,Ā andĀ TestMyAppĀ andĀ GenerateTestReportsĀ that belong toĀ theĀ testĀ stage.
The pipeline starts by executingĀ theĀ BuildMyAppĀ step. When this step finishes with its execution successfully,Ā TestMyAppĀ andĀ GenerateTestReportsĀ steps start execution in parallel.
Once the two steps within theĀ testĀ stage finish successfully, the pipeline execution is complete.