website logo
Sign Up PricingApp Templates
⌘K
⏰Changelog
📚Ready-to-use Templates
Strapi Serverless
Medusa Server
Appwrite
SPA on CloudFront
Amazon EKS
Node.js
n8n Workflow Automation
Next.js
🚀Getting started
Create an account in Microtica
Create an application from template
Import an existing application
Scaling Applications in Microtica
Assign a Custom Domain
🔄Integrated CI/CD
Manual deployments
Automated deployments
Deploy from multiple Git branches
Pipeline Notifications
Deployment Insights
🚦Pipelines
Pipeline Syntax
Steps
Stages
Artifacts
Variables
↩️Automated Rollbacks
💰Cloud Cost Optimization
Cost Reports
Cost Dashboard
Automated Saving Schedules
🔗Integrations
Connect an AWS account
Connect an Existing Kubernetes Cluster
Connect a Container Registry
🤖Migrate to Microtica
Migrate from Heroku to AWS
⚙️Project Settings
Manage teammates
Manage pricing plan and billing
Docs powered by
Archbee
Pipelines

Stages

4min

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.

Syntax

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:

microtica.yaml
|
stages:
  - [first-stage-name]
  - [second-stage-name]

steps:
  step_1:
    stage: [first-stage-name]
    [step-body]
  step_2:
    stage: [second-stage-name]
    [step-body]


Pipeline with multiple 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:

Document image


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.

microtica.yaml
|
stages:
 - build
 - test

steps:
  BuildMyApp:
    stage: build
    image: node:latest
    commands:
      - npm install
      - npm run build
  TestMyApp:
    stage: test
    image: node:latest
    commands:
      - npm test
  GenerateTestReports:
    stage: test
    image: node:latest
    commands:
      - npm run generate-reports


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.

Updated 03 Mar 2023
Did this page help you?
PREVIOUS
Terraform Build
NEXT
Artifacts
Docs powered by
Archbee
TABLE OF CONTENTS
Syntax
Pipeline with multiple stages
Docs powered by
Archbee