Skip to content

Latest commit

 

History

History
45 lines (39 loc) · 1.04 KB

02_118-env-vars.md

File metadata and controls

45 lines (39 loc) · 1.04 KB

CI Environment Variables

Use this yaml to peek at your CI environment variables:

test:
  script:
  - env | egrep 'CI|GITLAB'

Reference: https://docs.gitlab.com/ce/ci/variables/README.html


Example dump:

CI_PROJECT_NAME=example4
CI_BUILD_TOKEN=xxxxxxxxxxxxxxxxxxxx
CI_PROJECT_URL=http://gitlab.gitlabtutorial.org/root/example4
CI_BUILD_BEFORE_SHA=27ca77c87ef2aa04915c41ae4ce817593aef0ab7
CI_SERVER_VERSION=8.13.5
CI_BUILD_ID=180
[email protected]
CI_PROJECT_ID=3
CI_RUNNER_ID=11
CI_PIPELINE_ID=107
CI_BUILD_REF_NAME=master
CI_BUILD_REF=27ca77c87ef2aa04915c41ae4ce817593aef0ab7
CI_BUILD_STAGE=test
CI_PROJECT_DIR=/home/gitlab-runner/builds/86e471c2/0/root/example4
CI_RUNNER_TAGS=
CI_DEBUG_TRACE=false
CI_PROJECT_PATH=root/example4
CI_SERVER_NAME=GitLab
GITLAB_CI=true
CI_SERVER_REVISION=09cedb5
CI_BUILD_NAME=test
CI_SERVER=yes
CI=true
CI_PROJECT_NAMESPACE=root
CI_BUILD_REPO=http://gitlab-ci-token:[email protected]/root/example4.git
CI_RUNNER_DESCRIPTION=Shell Runner 3
GITLAB_USER_ID=1