Skip to content

Instantly share code, notes, and snippets.

@alphajc
Created September 9, 2019 01:32
Show Gist options
  • Save alphajc/e2c19fa624ccc29fb3af0803e9afcb22 to your computer and use it in GitHub Desktop.
Save alphajc/e2c19fa624ccc29fb3af0803e9afcb22 to your computer and use it in GitHub Desktop.
gitlab-runner配置参数与环境变量对照表

参数与环境变量对照表

参数 环境变量
-c value, --config value CONFIG_FILE
--template-config value TEMPLATE_CONFIG_FILE
--tag-list value RUNNER_TAG_LIST
-n, --non-interactive REGISTER_NON_INTERACTIVE
--leave-runner REGISTER_LEAVE_RUNNER
-r value, --registration-token value REGISTRATION_TOKEN
--run-untagged REGISTER_RUN_UNTAGGED
--locked REGISTER_LOCKED
--access-level value REGISTER_ACCESS_LEVEL
--maximum-timeout value REGISTER_MAXIMUM_TIMEOUT
--paused REGISTER_PAUSED
--name value, --description value RUNNER_NAME
--limit value RUNNER_LIMIT
--output-limit value RUNNER_OUTPUT_LIMIT
--request-concurrency value RUNNER_REQUEST_CONCURRENCY
-u value, --url value CI_SERVER_URL
-t value, --token value CI_SERVER_TOKEN
--tls-ca-file value CI_SERVER_TLS_CA_FILE
--tls-cert-file value CI_SERVER_TLS_CERT_FILE
--tls-key-file value CI_SERVER_TLS_KEY_FILE
--executor value RUNNER_EXECUTOR
--builds-dir value RUNNER_BUILDS_DIR
--cache-dir value RUNNER_CACHE_DIR
--clone-url value CLONE_URL
--env value RUNNER_ENV
--pre-clone-script value RUNNER_PRE_CLONE_SCRIPT
--pre-build-script value RUNNER_PRE_BUILD_SCRIPT
--post-build-script value RUNNER_POST_BUILD_SCRIPT
--debug-trace-disabled RUNNER_DEBUG_TRACE_DISABLED
--shell value RUNNER_SHELL
--custom_build_dir-enabled CUSTOM_BUILD_DIR_ENABLED
--ssh-user value SSH_USER
--ssh-password value SSH_PASSWORD
--ssh-host value SSH_HOST
--ssh-port value SSH_PORT
--ssh-identity-file value SSH_IDENTITY_FILE
--docker-host value DOCKER_HOST
--docker-cert-path value DOCKER_CERT_PATH
--docker-tlsverify DOCKER_TLS_VERIFY
--docker-hostname value DOCKER_HOSTNAME
--docker-image value DOCKER_IMAGE
--docker-runtime value DOCKER_RUNTIME
--docker-memory value DOCKER_MEMORY
--docker-memory-swap value DOCKER_MEMORY_SWAP
--docker-memory-reservation value DOCKER_MEMORY_RESERVATION
--docker-cpuset-cpus value DOCKER_CPUSET_CPUS
--docker-cpus value DOCKER_CPUS
--docker-dns value DOCKER_DNS
--docker-dns-search value DOCKER_DNS_SEARCH
--docker-privileged DOCKER_PRIVILEGED
--docker-disable-entrypoint-overwrite DOCKER_DISABLE_ENTRYPOINT_OVERWRITE
--docker-userns value DOCKER_USERNS_MODE
--docker-cap-add value DOCKER_CAP_ADD
--docker-cap-drop value DOCKER_CAP_DROP
--docker-oom-kill-disable DOCKER_OOM_KILL_DISABLE
--docker-security-opt value DOCKER_SECURITY_OPT
--docker-devices value DOCKER_DEVICES
--docker-disable-cache DOCKER_DISABLE_CACHE
--docker-volumes value DOCKER_VOLUMES
--docker-volume-driver value DOCKER_VOLUME_DRIVER
--docker-cache-dir value DOCKER_CACHE_DIR
--docker-extra-hosts value DOCKER_EXTRA_HOSTS
--docker-volumes-from value DOCKER_VOLUMES_FROM
--docker-network-mode value DOCKER_NETWORK_MODE
--docker-links value DOCKER_LINKS
--docker-services value DOCKER_SERVICES
--docker-wait-for-services-timeout value DOCKER_WAIT_FOR_SERVICES_TIMEOUT
--docker-allowed-images value DOCKER_ALLOWED_IMAGES
--docker-allowed-services value DOCKER_ALLOWED_SERVICES
--docker-pull-policy value DOCKER_PULL_POLICY
--docker-shm-size value DOCKER_SHM_SIZE
--docker-tmpfs value DOCKER_TMPFS
--docker-services-tmpfs value DOCKER_SERVICES_TMPFS
--docker-sysctls value DOCKER_SYSCTLS
--docker-helper-image value DOCKER_HELPER_IMAGE
--parallels-base-name value PARALLELS_BASE_NAME
--parallels-template-name value PARALLELS_TEMPLATE_NAME
--parallels-disable-snapshots PARALLELS_DISABLE_SNAPSHOTS
--parallels-time-server value PARALLELS_TIME_SERVER
--virtualbox-base-name value VIRTUALBOX_BASE_NAME
--virtualbox-base-snapshot value VIRTUALBOX_BASE_SNAPSHOT
--virtualbox-disable-snapshots VIRTUALBOX_DISABLE_SNAPSHOTS
--cache-type value CACHE_TYPE
--cache-path value CACHE_PATH
--cache-shared CACHE_SHARED
--cache-s3-server-address value CACHE_S3_SERVER_ADDRESS
--cache-s3-access-key value CACHE_S3_ACCESS_KEY
--cache-s3-secret-key value CACHE_S3_SECRET_KEY
--cache-s3-bucket-name value CACHE_S3_BUCKET_NAME
--cache-s3-bucket-location value CACHE_S3_BUCKET_LOCATION
--cache-s3-insecure CACHE_S3_INSECURE
--cache-gcs-access-id value CACHE_GCS_ACCESS_ID
--cache-gcs-private-key value CACHE_GCS_PRIVATE_KEY
--cache-gcs-credentials-file value GOOGLE_APPLICATION_CREDENTIALS
--cache-gcs-bucket-name value CACHE_GCS_BUCKET_NAME
--machine-idle-nodes value MACHINE_IDLE_COUNT
--machine-idle-time value MACHINE_IDLE_TIME
--machine-max-builds value MACHINE_MAX_BUILDS
--machine-machine-driver value MACHINE_DRIVER
--machine-machine-name value MACHINE_NAME
--machine-machine-options value MACHINE_OPTIONS
--machine-off-peak-periods value MACHINE_OFF_PEAK_PERIODS
--machine-off-peak-timezone value MACHINE_OFF_PEAK_TIMEZONE
--machine-off-peak-idle-count value MACHINE_OFF_PEAK_IDLE_COUNT
--machine-off-peak-idle-time value MACHINE_OFF_PEAK_IDLE_TIME
--kubernetes-host value KUBERNETES_HOST
--kubernetes-cert-file value KUBERNETES_CERT_FILE
--kubernetes-key-file value KUBERNETES_KEY_FILE
--kubernetes-ca-file value KUBERNETES_CA_FILE
--kubernetes-bearer_token_overwrite_allowed KUBERNETES_BEARER_TOKEN_OVERWRITE_ALLOWED
--kubernetes-bearer_token value KUBERNETES_BEARER_TOKEN
--kubernetes-image value KUBERNETES_IMAGE
--kubernetes-namespace value KUBERNETES_NAMESPACE
--kubernetes-namespace_overwrite_allowed value KUBERNETES_NAMESPACE_OVERWRITE_ALLOWED
--kubernetes-privileged KUBERNETES_PRIVILEGED
--kubernetes-cpu-limit value KUBERNETES_CPU_LIMIT
--kubernetes-memory-limit value KUBERNETES_MEMORY_LIMIT
--kubernetes-service-cpu-limit value KUBERNETES_SERVICE_CPU_LIMIT
--kubernetes-service-memory-limit value KUBERNETES_SERVICE_MEMORY_LIMIT
--kubernetes-helper-cpu-limit value KUBERNETES_HELPER_CPU_LIMIT
--kubernetes-helper-memory-limit value KUBERNETES_HELPER_MEMORY_LIMIT
--kubernetes-cpu-request value KUBERNETES_CPU_REQUEST
--kubernetes-memory-request value KUBERNETES_MEMORY_REQUEST
--kubernetes-service-cpu-request value KUBERNETES_SERVICE_CPU_REQUEST
--kubernetes-service-memory-request value KUBERNETES_SERVICE_MEMORY_REQUEST
--kubernetes-helper-cpu-request value KUBERNETES_HELPER_CPU_REQUEST
--kubernetes-helper-memory-request value KUBERNETES_HELPER_MEMORY_REQUEST
--kubernetes-pull-policy value KUBERNETES_PULL_POLICY
--kubernetes-node-selector value KUBERNETES_NODE_SELECTOR
--kubernetes-node-tolerations value KUBERNETES_NODE_TOLERATIONS
--kubernetes-image-pull-secrets value KUBERNETES_IMAGE_PULL_SECRETS
--kubernetes-helper-image value KUBERNETES_HELPER_IMAGE
--kubernetes-terminationGracePeriodSeconds value KUBERNETES_TERMINATIONGRACEPERIODSECONDS
--kubernetes-poll-interval value KUBERNETES_POLL_INTERVAL
--kubernetes-poll-timeout value KUBERNETES_POLL_TIMEOUT
--kubernetes-service-account value KUBERNETES_SERVICE_ACCOUNT
--kubernetes-service_account_overwrite_allowed value KUBERNETES_SERVICE_ACCOUNT_OVERWRITE_ALLOWED
--kubernetes-pod_annotations_overwrite_allowed value KUBERNETES_POD_ANNOTATIONS_OVERWRITE_ALLOWED
--kubernetes-pod-security-context-fs-group value KUBERNETES_POD_SECURITY_CONTEXT_FS_GROUP
--kubernetes-pod-security-context-run-as-group value KUBERNETES_POD_SECURITY_CONTEXT_RUN_AS_GROUP
--kubernetes-pod-security-context-run-as-non-root value KUBERNETES_POD_SECURITY_CONTEXT_RUN_AS_NON_ROOT
--kubernetes-pod-security-context-run-as-user value KUBERNETES_POD_SECURITY_CONTEXT_RUN_AS_USER
--custom-config-exec value CUSTOM_CONFIG_EXEC
--custom-config-exec-timeout value CUSTOM_CONFIG_EXEC_TIMEOUT
--custom-prepare-exec value CUSTOM_PREPARE_EXEC
--custom-prepare-exec-timeout value CUSTOM_PREPARE_EXEC_TIMEOUT
--custom-run-exec value CUSTOM_RUN_EXEC
--custom-cleanup-exec value CUSTOM_CLEANUP_EXEC
--custom-cleanup-exec-timeout value CUSTOM_CLEANUP_EXEC_TIMEOUT
--custom-graceful-kill-timeout value CUSTOM_GRACEFUL_KILL_TIMEOUT
--custom-force-kill-timeout value CUSTOM_FORCE_KILL_TIMEOUT

其它参数

--kubernetes-pod-labels value                                A toml table/json object of key-value. Value is expected to be a string. When set, this will create pods with the given pod labels. Environment variables will be substituted for values here. (default: "{}")
--kubernetes-pod-annotations value                           A toml table/json object of key-value. Value is expected to be a string. When set, this will create pods with the given annotations. Can be overwritten in build with KUBERNETES_POD_ANNOTATION_* variables (default: "{}")
--kubernetes-pod-security-context-supplemental-groups value  A list of groups applied to the first process run in each container, in addition to the container's primary GID
--custom-config-args value                                   Arguments for the config executable
--custom-prepare-args value                                  Arguments for the prepare executable
--custom-run-args value                                      Arguments for the run executable
--custom-cleanup-args value                                  Arguments for the cleanup executable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment