when
Control when a job runs.
Supported: on_success, on_failure, always, manual, delayed
Not supported: never, manual_confirmation
Examples
Run on success (default)
job:
script: echo "job"
when: on_success
Run on failure
stages:
- build
- test
build:
stage: build
script: exit 1
test:
stage: test
script: echo "on_failure"
when: on_failure
Always run
job:
script: echo "job"
when: always
Manual trigger
job:
script: echo "job"
when: manual
Delayed start
job:
script: echo "job"
when: delayed
start_in: 10 seconds