Files
Sven-Hendrik Haase 733edf508f gitlab_runner: Pass stuff into buildbtw-executor using args instead of env vars
We noticed that env vars given in environment = [] get prefixed with CUSTOM_ENV_ and that's exactly what we're trying to avoid here.
2026-10-07 17:58:49 +02:00

93 lines
3.1 KiB
Django/Jinja

concurrent = 8
check_interval = 0
listen_address = ":9252"
[session_server]
session_timeout = 1800
[[runners]]
name = "{{ inventory_hostname }}"
url = "https://gitlab.archlinux.org"
token = "{{ vault_gitlab_runner_token }}"
executor = "docker"
[runners.custom_build_dir]
[runners.cache]
Type = "s3"
Shared = true
[runners.cache.s3]
ServerAddress = "fsn1.your-objectstorage.com"
AccessKey = "{{ vault_hetzner_s3_gitlab_runners_access_key }}"
SecretKey = "{{ vault_hetzner_s3_gitlab_runners_secret_key }}"
# Also refer to minio_s3_bucket.gitlab_runners_cache in tf-stage1/archlinux.tf
BucketName = "archlinux-gitlab-runners-cache"
[runners.cache.gcs]
[runners.docker]
tls_verify = false
image = "registry.archlinux.org/archlinux/archlinux-docker:base-master"
privileged = false
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = true
shm_size = 0
memory = "{{ gitlab_runner_memory_limit_docker }}"
{% if 'gitlab_vm_runners' in group_names %}
[[runners]]
name = "{{ inventory_hostname }}"
url = "https://gitlab.archlinux.org"
token = "{{ vault_gitlab_vm_runner_token }}"
executor = "custom"
builds_dir = "/builds"
cache_dir = "/cache"
environment = ["ARCHIVER_STAGING_DIR=/var/tmp"]
[runners.cache]
Type = "s3"
Shared = true
[runners.cache.s3]
ServerAddress = "fsn1.your-objectstorage.com"
AccessKey = "{{ vault_hetzner_s3_gitlab_runners_access_key }}"
SecretKey = "{{ vault_hetzner_s3_gitlab_runners_secret_key }}"
# Also refer to minio_s3_bucket.gitlab_runners_cache in tf-stage1/archlinux.tf
BucketName = "archlinux-gitlab-runners-cache"
[runners.custom]
prepare_exec = "/usr/local/bin/libvirt-executor"
prepare_args = [ "prepare" ]
run_exec = "/usr/local/bin/libvirt-executor"
run_args = [ "run" ]
cleanup_exec = "/usr/local/bin/libvirt-executor"
cleanup_args = [ "cleanup" ]
{% endif %}
{% if 'gitlab_buildbtw_runners' in group_names %}
[[runners]]
name = "{{ inventory_hostname }}"
url = "https://gitlab.archlinux.org"
token = "{{ vault_gitlab_buildbtw_runner_token }}"
executor = "custom"
builds_dir = "/builds"
cache_dir = "/cache"
[runners.custom]
config_exec = "/usr/local/bin/buildbtw-executor"
config_args = [ "gitlab", "config" ]
prepare_exec = "/usr/local/bin/buildbtw-executor"
prepare_args = [ "gitlab", "prepare" ]
run_exec = "/usr/local/bin/buildbtw-executor"
run_args = [ "gitlab", "run",
{% if inventory_hostname == "runner2.archlinux.org" -%}
{# This is staging -#}
"--server-url", "https://buildbtw.archlinux.builders",
{% elif inventory_hostname == "secure-runner1.archlinux.org" -%}
{# This is production -#}
"--server-url", "https://buildbtw.archlinux.org",
{% endif -%}
"--secret-token-path", "/etc/gitlab-runner/buildbtw-runner-executor-secret-token"
]
cleanup_exec = "/usr/local/bin/buildbtw-executor"
cleanup_args = [ "gitlab", "cleanup" ]
{% endif %}