GitLab does not offer a visual pipeline editor
Pipelines are described in YAML
Pipelines are stored in .gitlab-ci.yml
Minimal job:
job_name:
script: pwd
script
can be a string but is mostly an array:
job_name:
script:
- pwd
- whoami
Jobs fail if any command fails (exit code > 0)
script
supports all herestring variants of YAML
Literal multiline block:
job_name:
script:
- |
pwd
whoami
Use this for commands with URLs or the colon will break parsing
Shell here documents:
job_name:
script:
- |
tr a-z A-Z <<EOF
lower case to be converted to upper case
EOF
Jobs represent isolated steps in a pipeline
Stages are executed sequentially
Jobs in the same stage are executed in parallel
Special stages .pre
and .post
See chapter Jobs and stages
Sometimes a pipeline run is not desirable
Skip pipeline by prefixing the commit message:
[skip ci] My awesome commit message
Leave commit message untouched
Provide a push option:
git push -o ci.skip