gitlab-runner: Upgrade to 13.5.0 & add option for extra paths to create
This patch adds a variable to the gitlab-runner, to create additional folders, that will be created with the needed SELinux permissions to be mounted inside of the container. This is used for the persistence of the hetzner-autoscale runner for example (see the README.md)
This commit is contained in:
parent
57c4d33115
commit
61f7d89d56
3 changed files with 14 additions and 2 deletions
|
@ -24,7 +24,7 @@ Role Variables
|
|||
```yaml
|
||||
# This image has the hetzner plugin pre-installed
|
||||
gitlabrunner_image: "quay.io/shivering-isles/gitlab-hetzner-runner"
|
||||
gitlabrunner_image_version: 13.2.2
|
||||
gitlabrunner_image_version: 13.5.0
|
||||
|
||||
# Adjust the name of the runner
|
||||
gitlabrunner_name: "hetzner-docker-auto-scale"
|
||||
|
@ -49,6 +49,13 @@ gitlabrunner_machine_options:
|
|||
hetzner-server-type: "cx11" # The server type (the hardware configuration) to use for a new machine
|
||||
hetzner-server-location: "fsn1" # The server location to use for a new machine
|
||||
|
||||
# Extra volumes that should be added to the gitlab runner container.
|
||||
gitlabrunner_extra_volumes:
|
||||
- "./hetzner_machine:/root/.docker/machine"
|
||||
|
||||
# Extra paths that should be created (eg. to be mounted in the container)
|
||||
gitlabrunner_extra_paths:
|
||||
- "{{ gitlabrunner_install_location }}/hetzner_machine"
|
||||
```
|
||||
|
||||
Dependencies
|
||||
|
|
|
@ -23,7 +23,10 @@ gitlabrunner_config_location: "{{ gitlabrunner_install_location }}/config"
|
|||
|
||||
# The runner image & tag/version to be used
|
||||
gitlabrunner_image: "docker.io/gitlab/gitlab-runner"
|
||||
gitlabrunner_image_version: "alpine-v13.4.1"
|
||||
gitlabrunner_image_version: "alpine-v13.5.0"
|
||||
|
||||
# Extra paths that should be created (eg. to be mounted in the container)
|
||||
gitlabrunner_extra_paths: []
|
||||
|
||||
# Extra volumes that should be added to the gitlab runner container.
|
||||
gitlabrunner_extra_volumes: []
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
state: present
|
||||
with_items:
|
||||
- "{{ gitlabrunner_config_location }}"
|
||||
- "{{ gitlabrunner_extra_paths }}"
|
||||
become: true
|
||||
|
||||
- name: Create install directory
|
||||
|
@ -48,6 +49,7 @@
|
|||
setype: "container_file_t"
|
||||
with_items:
|
||||
- "{{ gitlabrunner_config_location }}"
|
||||
- "{{ gitlabrunner_extra_paths }}"
|
||||
become: true
|
||||
|
||||
- name: Deploy docker-compose.yml
|
||||
|
|
Loading…
Add table
Reference in a new issue