diff --git a/roles/gitlab_runner/README.md b/roles/gitlab_runner/README.md index 2f79525..ad6252e 100644 --- a/roles/gitlab_runner/README.md +++ b/roles/gitlab_runner/README.md @@ -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 diff --git a/roles/gitlab_runner/defaults/main.yml b/roles/gitlab_runner/defaults/main.yml index 6f295eb..9d1cbc1 100644 --- a/roles/gitlab_runner/defaults/main.yml +++ b/roles/gitlab_runner/defaults/main.yml @@ -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: [] diff --git a/roles/gitlab_runner/tasks/main.yml b/roles/gitlab_runner/tasks/main.yml index a468ebf..2207e12 100644 --- a/roles/gitlab_runner/tasks/main.yml +++ b/roles/gitlab_runner/tasks/main.yml @@ -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