predefined CI/CD variables

Variables GitLab sets in every job, such as CI_COMMIT_BRANCH, CI_COMMIT_SHA and CI_REGISTRY_IMAGE, describing the pipeline, the commit and the project.

In more detail

Some exist only in certain pipelines: CI_COMMIT_BRANCH is absent in tag and merge request pipelines, and CI_MERGE_REQUEST_IID exists only in merge request pipelines. Rules, scripts and keywords such as image can all use them.

Related terms

Taught in

References

Certification courses