Stages

YAML stages for stages block

The stages tag is intended to be used to parallelize one-to-many sets of step tasks.

---
# This document is displaying all the required tags
# to run two stages with one step task in parallel.
stages:
  hello:
    steps:
      - name: Hello World
        image: alpine:latest
        commands:
          - echo "Hello, Vela User"

  welcome:
    steps:
      - name: Welcome to Vela
        image: alpine:latest
        commands:
          - echo "Welcome to Vela!"

Tags

TagRequiredTypeDescription
nameYstringUnique identifier for the stage in the pipeline
stepsY[]stringSequential execution instructions for the stage
needsN[]stringStages that must complete before starting the current one
independentNboolStage will execute its steps and ignore failures from other stages’ steps

Usage

The name: tag

---
stages:
    # Unique identifier for the stage in the pipeline.
    welcome:

The steps: tag

---
stages:
    # Unique identifier for the stage in the pipeline.
    welcome:
      # Sequential execution instructions for the stage.
      steps:

The needs: tag

---
stages:
    greeting:

    # Unique identifier for the stage in the pipeline.
    welcome:
      # Stages that must complete before starting the current one.
      needs: [ greeting ]

The independent: tag

---
stages:
    greeting:

    # Unique identifier for the stage in the pipeline.
    welcome:
      # If the greeting stage fails at any point, the welcome stage will continue its execution.
      independent: true