Skip to content

Commit 2bbe6ed

Browse files
committed
Add deb file installation support for GitLab-Runner 17.7 or greater
Signed-off-by: Norman Ziegner <[email protected]>
1 parent b543a0c commit 2bbe6ed

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

molecule/gitlab_runner/molecule.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ provisioner:
3939
instancegitlabciopenstack1:
4040
gitlab_runner_version: "17.8.1"
4141
gitlab_runner_deb_file: "https://packages.gitlab.com/runner/gitlab-runner/packages/{{ ansible_distribution | lower }}/{{ ansible_distribution_release | lower }}/gitlab-runner_{{ gitlab_runner_pkg_version }}_amd64.deb/download.deb"
42+
gitlab_runner_helper_images_deb_file: "https://packages.gitlab.com/runner/gitlab-runner/packages/{{ ansible_distribution | lower }}/{{ ansible_distribution_release | lower }}/gitlab-runner-helper-images_{{ gitlab_runner_pkg_version }}_all.deb/download.deb"
4243
gitlab_runner_install_docker: true
4344
gitlab_runner_ssh_public_key: "test_key.pub"
4445
gitlab_runner_ssh_private_key: "test_key"

roles/gitlab_runner/tasks/install.debianlike.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,22 @@
5151
ansible.builtin.package_facts:
5252
manager: "auto"
5353

54-
- name: "Install gitlab-runner from a .deb file"
55-
ansible.builtin.apt:
56-
deb: "{{ gitlab_runner_deb_file }}"
57-
allow_downgrade: true
54+
- name: "Install gitlab-runner manually using deb package"
5855
when:
5956
- "gitlab_runner_deb_file | length > 0"
6057
- "'gitlab-runner' not in ansible_facts.packages or
6158
ansible_facts.packages['gitlab-runner'][0].version is version(gitlab_runner_pkg_version, 'ne')"
59+
block:
60+
61+
- name: "Install gitlab-runner-helper-images from a .deb file"
62+
ansible.builtin.apt:
63+
deb: "{{ gitlab_runner_helper_images_deb_file }}"
64+
allow_downgrade: true
65+
when: "gitlab_runner_version is version('17.7.0', 'ge') or gitlab_runner_version | length == 0"
66+
67+
- name: "Install gitlab-runner from a .deb file"
68+
ansible.builtin.apt:
69+
deb: "{{ gitlab_runner_deb_file }}"
70+
allow_downgrade: true
71+
6272
...

0 commit comments

Comments
 (0)