Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Mearman/318b96efb31ed33d9c2efa959784d6d8 to your computer and use it in GitHub Desktop.
Save Mearman/318b96efb31ed33d9c2efa959784d6d8 to your computer and use it in GitHub Desktop.
Environment Variable Option Description
$TEMPLATE_CONFIG_FILE --template-config value Path to the configuration template file
$CONFIG_FILE -c value, --config value Config file (default: "/etc/gitlab-runner/config.toml")
$RUNNER_TAG_LIST --tag-list value Tag list
$REGISTER_NON_INTERACTIVE -n, --non-interactive Run registration unattended
$REGISTER_LEAVE_RUNNER --leave-runner Don't remove runner if registration fails
$REGISTRATION_TOKEN -r value, --registration-token value Runner's registration token
$REGISTER_RUN_UNTAGGED --run-untagged Register to run untagged builds; defaults to 'true' when 'tag-list' is empty
$REGISTER_LOCKED --locked Lock Runner for current project, defaults to 'true'
$REGISTER_ACCESS_LEVEL --access-level value Set access_level of the runner to not_protected or ref_protected; defaults to not_protected
$REGISTER_MAXIMUM_TIMEOUT --maximum-timeout value What is the maximum timeout (in seconds) that will be set for job when using this Runner (default: "0")
$REGISTER_PAUSED --paused Set Runner to be paused, defaults to 'false'
$RUNNER_NAME --name value, --description value Runner name (default: "91a609956641")
$RUNNER_LIMIT --limit value Maximum number of builds processed by this runner (default: "0")
$RUNNER_OUTPUT_LIMIT --output-limit value Maximum build trace size in kilobytes (default: "0")
$RUNNER_REQUEST_CONCURRENCY --request-concurrency value Maximum concurrency for job requests (default: "0")
$CI_SERVER_URL -u value, --url value Runner URL
$CI_SERVER_TOKEN -t value, --token value Runner token
$CI_SERVER_TLS_CA_FILE --tls-ca-file value File containing the certificates to verify the peer when using HTTPS
$CI_SERVER_TLS_CERT_FILE --tls-cert-file value File containing certificate for TLS client auth when using HTTPS
$CI_SERVER_TLS_KEY_FILE --tls-key-file value File containing private key for TLS client auth when using HTTPS
$RUNNER_EXECUTOR --executor value Select executor, eg. shell, docker, etc.
$RUNNER_BUILDS_DIR --builds-dir value Directory where builds are stored
$RUNNER_CACHE_DIR --cache-dir value Directory where build cache is stored
$CLONE_URL --clone-url value Overwrite the default URL used to clone or fetch the git ref
$RUNNER_ENV --env value Custom environment variables injected to build environment
$RUNNER_PRE_CLONE_SCRIPT --pre-clone-script value Runner-specific command script executed before code is pulled
$RUNNER_PRE_BUILD_SCRIPT --pre-build-script value Runner-specific command script executed after code is pulled, just before build executes
$RUNNER_POST_BUILD_SCRIPT --post-build-script value Runner-specific command script executed after code is pulled and just after build executes
$RUNNER_DEBUG_TRACE_DISABLED --debug-trace-disabled When set to true Runner will disable the possibility of using the CI_DEBUG_TRACE feature
$RUNNER_SHELL --shell value Select bash, cmd or powershell
$CUSTOM_BUILD_DIR_ENABLED --custom_build_dir-enabled Enable job specific build directories
$CACHE_TYPE --cache-type value Select caching method
$CACHE_PATH --cache-path value Name of the path to prepend to the cache URL
$CACHE_SHARED --cache-shared Enable cache sharing between runners.
$CACHE_S3_SERVER_ADDRESS --cache-s3-server-address value A host:port to the used S3-compatible server
$CACHE_S3_ACCESS_KEY --cache-s3-access-key value S3 Access Key
$CACHE_S3_SECRET_KEY --cache-s3-secret-key value S3 Secret Key
$CACHE_S3_BUCKET_NAME --cache-s3-bucket-name value Name of the bucket where cache will be stored
$CACHE_S3_BUCKET_LOCATION --cache-s3-bucket-location value Name of S3 region
$CACHE_S3_INSECURE --cache-s3-insecure Use insecure mode (without https)
$CACHE_GCS_ACCESS_ID --cache-gcs-access-id value ID of GCP Service Account used to access the storage
$CACHE_GCS_PRIVATE_KEY --cache-gcs-private-key value Private key used to sign GCS requests
$GOOGLE_APPLICATION_CREDENTIALS --cache-gcs-credentials-file value File with GCP credentials, containing AccessID and PrivateKey
$CACHE_GCS_BUCKET_NAME --cache-gcs-bucket-name value Name of the bucket where cache will be stored
$SSH_USER --ssh-user value User name
$SSH_PASSWORD --ssh-password value User password
$SSH_HOST --ssh-host value Remote host
$SSH_PORT --ssh-port value Remote host port
$SSH_IDENTITY_FILE --ssh-identity-file value Identity file to be used
$DOCKER_HOST --docker-host value Docker daemon address
$DOCKER_CERT_PATH --docker-cert-path value Certificate path
$DOCKER_TLS_VERIFY --docker-tlsverify Use TLS and verify the remote
$DOCKER_HOSTNAME --docker-hostname value Custom container hostname
$DOCKER_IMAGE --docker-image value Docker image to be used
$DOCKER_RUNTIME --docker-runtime value Docker runtime to be used
$DOCKER_MEMORY --docker-memory value Memory limit (format: []). Unit can be one of b, k, m, or g. Minimum is 4M.
$DOCKER_MEMORY_SWAP --docker-memory-swap value Total memory limit (memory + swap, format: []). Unit can be one of b, k, m, or g.
$DOCKER_MEMORY_RESERVATION --docker-memory-reservation value Memory soft limit (format: []). Unit can be one of b, k, m, or g.
$DOCKER_CPUSET_CPUS --docker-cpuset-cpus value String value containing the cgroups CpusetCpus to use
$DOCKER_CPUS --docker-cpus value Number of CPUs
$DOCKER_CPU_SHARES --docker-cpu-shares value Number of CPU shares (default: "0")
$DOCKER_DNS --docker-dns value A list of DNS servers for the container to use
$DOCKER_DNS_SEARCH --docker-dns-search value A list of DNS search domains
$DOCKER_PRIVILEGED --docker-privileged Give extended privileges to container
$DOCKER_DISABLE_ENTRYPOINT_OVERWRITE --docker-disable-entrypoint-overwrite Disable the possibility for a container to overwrite the default image entrypoint
$DOCKER_USERNS_MODE --docker-userns value User namespace to use
$DOCKER_CAP_ADD --docker-cap-add value Add Linux capabilities
$DOCKER_CAP_DROP --docker-cap-drop value Drop Linux capabilities
$DOCKER_OOM_KILL_DISABLE --docker-oom-kill-disable Do not kill processes in a container if an out-of-memory (OOM) error occurs
$DOCKER_OOM_SCORE_ADJUST --docker-oom-score-adjust value Adjust OOM score (default: "0")
$DOCKER_SECURITY_OPT --docker-security-opt value Security Options
$DOCKER_DEVICES --docker-devices value Add a host device to the container
$DOCKER_DISABLE_CACHE --docker-disable-cache Disable all container caching
$DOCKER_VOLUMES --docker-volumes value Bind-mount a volume and create it if it doesn't exist prior to mounting. Can be specified multiple times once per mountpoint, e.g. --docker-volumes 'test0:/test0' --docker-volumes 'test1:/test1'
$DOCKER_VOLUME_DRIVER --docker-volume-driver value Volume driver to be used
$DOCKER_CACHE_DIR --docker-cache-dir value Directory where to store caches
$DOCKER_EXTRA_HOSTS --docker-extra-hosts value Add a custom host-to-IP mapping
$DOCKER_VOLUMES_FROM --docker-volumes-from value A list of volumes to inherit from another container
$DOCKER_NETWORK_MODE --docker-network-mode value Add container to a custom network
$DOCKER_LINKS --docker-links value Add link to another container
$DOCKER_WAIT_FOR_SERVICES_TIMEOUT --docker-wait-for-services-timeout value How long to wait for service startup (default: "0")
$DOCKER_ALLOWED_IMAGES --docker-allowed-images value Whitelist allowed images
$DOCKER_ALLOWED_SERVICES --docker-allowed-services value Whitelist allowed services
$DOCKER_PULL_POLICY --docker-pull-policy value Image pull policy: never, if-not-present, always
$DOCKER_SHM_SIZE --docker-shm-size value Shared memory size for docker images (in bytes) (default: "0")
$DOCKER_TMPFS --docker-tmpfs value A toml table/json object with the format key=values. When set this will mount the specified path in the key as a tmpfs volume in the main container, using the options specified as key. For the supported options, see the documentation for the unix 'mount' command (default: "{}")
$DOCKER_SERVICES_TMPFS --docker-services-tmpfs value A toml table/json object with the format key=values. When set this will mount the specified path in the key as a tmpfs volume in all the service containers, using the options specified as key. For the supported options, see the documentation for the unix 'mount' command (default: "{}")
$DOCKER_SYSCTLS --docker-sysctls value Sysctl options, a toml table/json object of key=value. Value is expected to be a string. (default: "{}")
$DOCKER_HELPER_IMAGE --docker-helper-image value ADVANCED] Override the default helper image used to clone repos and upload artifacts
$PARALLELS_BASE_NAME --parallels-base-name value VM name to be used
$PARALLELS_TEMPLATE_NAME --parallels-template-name value VM template to be created
$PARALLELS_DISABLE_SNAPSHOTS --parallels-disable-snapshots Disable snapshoting to speedup VM creation
$PARALLELS_TIME_SERVER --parallels-time-server value Timeserver to sync the guests time from. Defaults to time.apple.com
$VIRTUALBOX_BASE_NAME --virtualbox-base-name value VM name to be used
$VIRTUALBOX_BASE_SNAPSHOT --virtualbox-base-snapshot value Name or UUID of a specific VM snapshot to clone
$VIRTUALBOX_DISABLE_SNAPSHOTS --virtualbox-disable-snapshots Disable snapshoting to speedup VM creation
$MACHINE_IDLE_COUNT --machine-idle-nodes value Maximum idle machines (default: "0")
$MACHINE_IDLE_TIME --machine-idle-time value Minimum time after node can be destroyed (default: "0")
$MACHINE_MAX_BUILDS --machine-max-builds value Maximum number of builds processed by machine (default: "0")
$MACHINE_DRIVER --machine-machine-driver value The driver to use when creating machine
$MACHINE_NAME --machine-machine-name value The template for machine name (needs to include %s)
$MACHINE_OPTIONS --machine-machine-options value Additional machine creation options
$MACHINE_OFF_PEAK_PERIODS --machine-off-peak-periods value Time periods when the scheduler is in the OffPeak mode. DEPRECATED
$MACHINE_OFF_PEAK_TIMEZONE --machine-off-peak-timezone value Timezone for the OffPeak periods (defaults to Local). DEPRECATED
$MACHINE_OFF_PEAK_IDLE_COUNT --machine-off-peak-idle-count value Maximum idle machines when the scheduler is in the OffPeak mode. DEPRECATED (default: "0")
$MACHINE_OFF_PEAK_IDLE_TIME --machine-off-peak-idle-time value Minimum time after machine can be destroyed when the scheduler is in the OffPeak mode. DEPRECATED (default: "0")
$KUBERNETES_HOST --kubernetes-host value Optional Kubernetes master host URL (auto-discovery attempted if not specified)
$KUBERNETES_CERT_FILE --kubernetes-cert-file value Optional Kubernetes master auth certificate
$KUBERNETES_KEY_FILE --kubernetes-key-file value Optional Kubernetes master auth private key
$KUBERNETES_CA_FILE --kubernetes-ca-file value Optional Kubernetes master auth ca certificate
$KUBERNETES_BEARER_TOKEN_OVERWRITE_ALLOWED --kubernetes-bearer_token_overwrite_allowed Bool to authorize builds to specify their own bearer token for creation.
$KUBERNETES_BEARER_TOKEN --kubernetes-bearer_token value Optional Kubernetes service account token used to start build pods.
$KUBERNETES_IMAGE --kubernetes-image value Default docker image to use for builds when none is specified
$KUBERNETES_NAMESPACE --kubernetes-namespace value Namespace to run Kubernetes jobs in
$KUBERNETES_NAMESPACE_OVERWRITE_ALLOWED --kubernetes-namespace_overwrite_allowed value Regex to validate 'KUBERNETES_NAMESPACE_OVERWRITE' value
$KUBERNETES_PRIVILEGED --kubernetes-privileged Run all containers with the privileged flag enabled
$KUBERNETES_CPU_LIMIT --kubernetes-cpu-limit value The CPU allocation given to build containers
$KUBERNETES_CPU_LIMIT_OVERWRITE_MAX_ALLOWED --kubernetes-cpu-limit-overwrite-max-allowed value If set, the max amount the cpu limit can be set to. Used with the KUBERNETES_CPU_LIMIT variable in the build.
$KUBERNETES_MEMORY_LIMIT --kubernetes-memory-limit value The amount of memory allocated to build containers
$KUBERNETES_MEMORY_LIMIT_OVERWRITE_MAX_ALLOWED --kubernetes-memory-limit-overwrite-max-allowed value If set, the max amount the memory limit can be set to. Used with the KUBERNETES_MEMORY_LIMIT variable in the build.
$KUBERNETES_SERVICE_CPU_LIMIT --kubernetes-service-cpu-limit value The CPU allocation given to build service containers
$KUBERNETES_SERVICE_MEMORY_LIMIT --kubernetes-service-memory-limit value The amount of memory allocated to build service containers
$KUBERNETES_HELPER_CPU_LIMIT --kubernetes-helper-cpu-limit value The CPU allocation given to build helper containers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment