Gitlab CI Reference
.gitlab-ci.yml
keyword reference CI/CD YAML syntax reference | GitLab- Optimize GitLab CI/CD configuration files | GitLab
- Gitlab CI Runner
Gitlab is a DevSecOps Plattform
Examples
Gitlab CI Variables
- Predefined variables reference | GitLab
- CI_COMMIT_REF_NAME … name of branch
- CI_COMMIT_BRANCH … only available in branch pipelines
- CI_JOB_NAME … name of current job
- Create a Gitlab MR from the Terminal
Gitlab CI Jobs
after_script
runs even if script fails
Gitlab CI Caching & Artfifacts
- Use Artifacts for downloading created artifacts, or passing them to other jobs
- Use Cache across pipeline runs
Gitlab CI Caveats
- Scheduled Pipelines only work if previous jobs are not manual, and have
allow_failure: true
- requires removing
needs
keyword if they require previous manual jobs
- requires removing
rules:changes
andrules:if
cannot be combined- Both things enable a pipeline, so either the if condition is true or the file was changed
Gitlab CI Workflows
- Gitlab CI Helper Rules
- Gitlab CI Skipping Jobs
- Gitlab CI Named Pipelines
- Gitlab CI Setup manual trigger for feature branches
- Gitlab CI Security Scanning Jobs
- Gitlab CI Run jobs conditionally
- Gitlab CI Modular Maven build
- Gitlab CI Monorepo Setup