Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions molecule/gitlab_runner/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ provisioner:
gitlab_runner_concurrent: 4
host_vars:
instancegitlabciopenstack1:
gitlab_runner_version: "16.11.0"
gitlab_runner_version: "17.8.1"
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"
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"
gitlab_runner_install_docker: true
gitlab_runner_ssh_public_key: "test_key.pub"
gitlab_runner_ssh_private_key: "test_key"
Expand Down Expand Up @@ -68,7 +69,7 @@ provisioner:
locked: true
limit: 10
instancegitlabciopenstack2:
gitlab_runner_version: "16.11.0"
gitlab_runner_version: "17.8.1"
gitlab_runner_install_docker: false
gitlab_runner_ssh_public_key: ""
gitlab_runner_ssh_private_key: ""
Expand Down
4 changes: 2 additions & 2 deletions roles/gitlab_runner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ None.
### GitLab-Runner variables

```yaml
gitlab_runner_version: "17.4.0"
gitlab_runner_version: "17.8.1"
```
The version of GitLab-Runner to install.

```yaml
gitlab_runner_pkg_version: "17.4.0-1"
gitlab_runner_pkg_version: "17.8.1-1"
```
The version to be used to determine the GitLab-Runner
[package](https://packages.gitlab.com/runner/gitlab-runner) (optional).
Expand Down
19 changes: 15 additions & 4 deletions roles/gitlab_runner/tasks/install.debianlike.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,23 @@
ansible.builtin.package_facts:
manager: "auto"

- name: "Install gitlab-runner from a .deb file"
ansible.builtin.apt:
deb: "{{ gitlab_runner_deb_file }}"
allow_downgrade: true
- name: "Install gitlab-runner manually using deb package"
when:
- "gitlab_runner_deb_file | length > 0"
- "'gitlab-runner' not in ansible_facts.packages or
ansible_facts.packages['gitlab-runner'][0].version is version(gitlab_runner_pkg_version, 'ne')"
block:

- name: "Install gitlab-runner-helper-images from a .deb file"
ansible.builtin.apt:
deb: "{{ gitlab_runner_helper_images_deb_file }}"
allow_downgrade: true
when: "gitlab_runner_version is version('17.7.0', 'ge') or gitlab_runner_version | length == 0"

- name: "Install gitlab-runner from a .deb file"
ansible.builtin.apt:
deb: "{{ gitlab_runner_deb_file }}"
allow_downgrade: true
ignore_errors: "{{ ansible_check_mode }}" # ignore errors due to unresolvable dependencies in check mode

...
Loading