Variables
Variables can be set at pipeline, stage and step levels.
Pipeline
Pipeline environment variables are available to all run steps in your pipeline.
kind: pipeline
spec:
options:
envs:
GOOS: linux
GOARCH: amd64
stages:
- type: ci
spec:
steps:
- name: test 1.20
type: run
spec:
container: golang:1.20
script: |
go build
go test
- name: test 1.21
type: run
spec:
container: golang:1.21
script: |
go build
go testStage
Stage environment variables are available to all run steps in the stage.
Step
Run step environment variables are only available to the step.
Background steps also support environment variables.
Last updated
Was this helpful?