gitlab预定义环境变量对照表


官方文档地址:https://docs.gitlab.com/ee/ci/variables/predefined_variables.html

查看所有的预定义环境变量

job_name:
  script:
    - export

以项目举例,项目仓库地址是:http://192.168.2.153:8070/chenjianzhen/jdd-boot-parent-cloud.git
项目结构如下:

export CI='true'
export CI_BUILDS_DIR='/builds'
export CI_BUILD_BEFORE_SHA='677bf1c1cd50d00c635c050bbe40dd13cfd7ef8c'
export CI_BUILD_ID='7338'
export CI_BUILD_NAME='maven_step'
export CI_BUILD_REF='4182e5cdde2b14bf49286150f139d03fbc1038a0'
export CI_BUILD_REF_NAME='test'
export CI_BUILD_REF_SLUG='test'
export CI_BUILD_STAGE='package'
export CI_BUILD_TOKEN='xxxxxxxxxxxxxxxxxxxx'
export CI_COMMIT_BEFORE_SHA='677bf1c1cd50d00c635c050bbe40dd13cfd7ef8c'
export CI_COMMIT_DESCRIPTION=''
export CI_COMMIT_MESSAGE='5.调整变量文件job'
export CI_COMMIT_REF_NAME='test'
export CI_COMMIT_REF_SLUG='test'
export CI_COMMIT_SHA='4182e5cdde2b14bf49286150f139d03fbc1038a0'
export CI_COMMIT_TITLE='5.调整变量文件job'
export CI_CONCURRENT_ID='0'
export CI_CONCURRENT_PROJECT_ID='0'
export CI_CONFIG_PATH='.gitlab-ci.yml'
export CI_DISPOSABLE_ENVIRONMENT='true'
export CI_JOB_ID='7338'
export CI_JOB_NAME='maven_step'
export CI_JOB_STAGE='package'
export CI_JOB_STATUS='running'
export CI_JOB_TOKEN='xxxxxxxxxxxxxxxxxxxx'
export CI_JOB_URL='http://192.168.2.153:8070/chenjianzhen/jdd-boot-parent-cloud/-/jobs/7338'
export CI_PIPELINE_ID='3309'
export CI_PIPELINE_IID='78'
export CI_PIPELINE_SOURCE='push'
export CI_PIPELINE_URL='http://192.168.2.153:8070/chenjianzhen/jdd-boot-parent-cloud/pipelines/3309'
export CI_PROJECT_DIR='/builds/chenjianzhen/jdd-boot-parent-cloud'
export CI_PROJECT_ID='99'
export CI_PROJECT_NAME='jdd-boot-parent-cloud'
export CI_PROJECT_NAMESPACE='chenjianzhen'
export CI_PROJECT_PATH='chenjianzhen/jdd-boot-parent-cloud'
export CI_PROJECT_PATH_SLUG='chenjianzhen-jdd-boot-parent-cloud'
export CI_PROJECT_URL='http://192.168.2.153:8070/chenjianzhen/jdd-boot-parent-cloud'
export CI_PROJECT_VISIBILITY='private'
export CI_REGISTRY_PASSWORD='xxxxxxxxxxxxxxxxxxxx'
export CI_REGISTRY_USER='gitlab-ci-token'
export CI_REPOSITORY_URL='http://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@192.168.2.153:8070/chenjianzhen/jdd-boot-parent-cloud.git'
export CI_RUNNER_DESCRIPTION='161-2node'
export CI_RUNNER_EXECUTABLE_ARCH='linux/amd64'
export CI_RUNNER_ID='12'
export CI_RUNNER_REVISION='5316d4ac'
export CI_RUNNER_SHORT_TOKEN='5161089a'
export CI_RUNNER_TAGS='check, yarn, nodejs, maven, k8s, deploy, docker'
export CI_RUNNER_VERSION='14.6.0'
export CI_SERVER='yes'
export CI_SERVER_NAME='GitLab'
export CI_SERVER_REVISION='c69471c'
export CI_SERVER_VERSION='11.4.14'
export CI_SERVER_VERSION_MAJOR='11'
export CI_SERVER_VERSION_MINOR='4'
export CI_SERVER_VERSION_PATCH='14'
export CURRENT_PROJECT='jdd-cloud-gateway'
export DOCKER_DRIVER='overlay2'
export DOCKER_HTTP='registry.cn-gdgz1.ctyun.cn'
export DOCKER_PASSWORD='1ea357b6a2a9b8ea203ee42258bed1b681025ace93b1da51deebf47c8b34d7f1'
export DOCKER_USER='cn-gdgz1@LTTE5RKHMORDLCR6DXM9'
export FF_CMD_DISABLE_DELAYED_ERROR_LEVEL_EXPANSION='false'
export FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR='false'
export FF_ENABLE_BASH_EXIT_CODE_CHECK='false'
export FF_ENABLE_JOB_CLEANUP='false'
export FF_GITLAB_REGISTRY_HELPER_IMAGE='true'
export FF_KUBERNETES_HONOR_ENTRYPOINT='false'
export FF_NETWORK_PER_BUILD='false'
export FF_SCRIPT_SECTIONS='false'
export FF_SKIP_NOOP_BUILD_STAGES='true'
export FF_USE_DIRECT_DOWNLOAD='true'
export FF_USE_DYNAMIC_TRACE_FORCE_SEND_INTERVAL='false'
export FF_USE_FASTZIP='false'
export FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY='false'
export FF_USE_NEW_BASH_EVAL_STRATEGY='false'
export FF_USE_NEW_SHELL_ESCAPE='false'
export FF_USE_POWERSHELL_PATH_RESOLVER='false'
export FF_USE_WINDOWS_LEGACY_PROCESS_STRATEGY='true'
export GITLAB_CI='true'
export GITLAB_FEATURES=''
export GITLAB_USER_EMAIL='1103324414@qq.com'
export GITLAB_USER_ID='31'
export GITLAB_USER_LOGIN='wangwei'
export GITLAB_USER_NAME='wangwei'
export HOME='/root'
export HOSTNAME='runner-5161089a-project-99-concurrent-0'
export MAVEN_CLI_OPTS='-s .m2/settings.xml --batch-mode'
export MAVEN_OPTS='-Dmaven.repo.local=.m2/repository'
export OLDPWD='/builds/chenjianzhen/jdd-boot-parent-cloud'
export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
export PWD='/builds/chenjianzhen/jdd-boot-parent-cloud/jdd-cloud-module'
export SHLVL='2'

相关