Skip to content

Commit

Permalink
feat: support specifying --docker-volumes
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDevMinerTV committed Nov 21, 2024
1 parent 593a3d5 commit 4d056fc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Ansible Collections
startup.
- `runner_stop_timeout`: Optional. Timeout in seconds for the service stop
command after which systemd will just `SIGKILL` the process.
- `runner_docker_volumes`: Optional. List of volumes to mount into the CI jobs.

- `runner_user`: Optional. User that will be used to run the runner. Only used
if `runner_executor` is set to `shell`.
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ runner_docker_volume_mount_ssl: "/etc/ssl/certs:/etc/ssl/certs:ro"
runner_docker_image: "docker:stable"
runner_docker_privileged: false
runner_docker_services_timeout: 90
runner_docker_volumes: []

runner_user: gitlab-runner
runner_home: /home/gitlab-runner
Expand Down
1 change: 1 addition & 0 deletions tasks/registration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
--env 'DOCKER_DRIVER={{ env_docker_driver }}'
--env 'DOCKER_TLS_CERTDIR={{ env_docker_tls_certdir }}'
{{ '--docker-image ' + runner_docker_image if runner_executor == 'docker' else '' }}
{{ runner_docker_volumes | default([]) | map('regex_replace', '^(.*)$', '--docker-volumes \\1') | join(' ') }}
{{ '--docker-privileged ' if runner_executor == 'docker' and runner_docker_privileged else '' }}
{{ '--docker-wait-for-services-timeout '
+ runner_docker_services_timeout | string if runner_executor == 'docker' else '' }}
Expand Down

0 comments on commit 4d056fc

Please sign in to comment.