Stages

YAML keys for stages block

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

---
# This document is displaying all the required keys
# 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!"

Keys

KeyRequiredTypeDescription
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: key

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

The steps: key

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

The needs: key

---
stages:
    greeting:

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

The independent: key

---
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