[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 04/11] scripts/ci: update gitlab-runner playbook to handle CentOS
From: |
Alex Bennée |
Subject: |
[PATCH 04/11] scripts/ci: update gitlab-runner playbook to handle CentOS |
Date: |
Fri, 10 Mar 2023 10:31:16 +0000 |
This was broken when we moved to using the pre-built packages as we
didn't take care to ensure we used RPMs where required.
NB: I could never get this to complete on my test setup but I suspect
this was down to network connectivity and timeouts while downloading.
Fixes: 69c4befba1 (scripts/ci: update gitlab-runner playbook to use latest
runner)
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
scripts/ci/setup/gitlab-runner.yml | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/scripts/ci/setup/gitlab-runner.yml
b/scripts/ci/setup/gitlab-runner.yml
index 95d4199c03..1a1b270ff2 100644
--- a/scripts/ci/setup/gitlab-runner.yml
+++ b/scripts/ci/setup/gitlab-runner.yml
@@ -48,13 +48,29 @@
- debug:
msg: gitlab-runner arch is {{ gitlab_runner_arch }}
- - name: Download the matching gitlab-runner
+ - name: Download the matching gitlab-runner (DEB)
get_url:
dest: "/root/"
url:
"https://gitlab-runner-downloads.s3.amazonaws.com/latest/deb/gitlab-runner_{{
gitlab_runner_arch }}.deb"
+ when:
+ - ansible_facts['distribution'] == 'Ubuntu'
+
+ - name: Download the matching gitlab-runner (RPM)
+ get_url:
+ dest: "/root/"
+ url:
"https://gitlab-runner-downloads.s3.amazonaws.com/latest/rpm/gitlab-runner_{{
gitlab_runner_arch }}.rpm"
+ when:
+ - ansible_facts['distribution'] == 'CentOS'
- - name: Install gitlab-runner via package manager
+ - name: Install gitlab-runner via package manager (DEB)
apt: deb="/root/gitlab-runner_{{ gitlab_runner_arch }}.deb"
+ when:
+ - ansible_facts['distribution'] == 'Ubuntu'
+
+ - name: Install gitlab-runner via package manager (RPM)
+ yum: name="/root/gitlab-runner_{{ gitlab_runner_arch }}.rpm"
+ when:
+ - ansible_facts['distribution'] == 'CentOS'
- name: Register the gitlab-runner
command: "/usr/bin/gitlab-runner register --non-interactive --url {{
gitlab_runner_server_url }} --registration-token {{
gitlab_runner_registration_token }} --executor shell --tag-list {{
ansible_facts[\"architecture\"] }},{{ ansible_facts[\"distribution\"]|lower
}}_{{ ansible_facts[\"distribution_version\"] }} --description '{{
ansible_facts[\"distribution\"] }} {{ ansible_facts[\"distribution_version\"]
}} {{ ansible_facts[\"architecture\"] }} ({{ ansible_facts[\"os_family\"] }})'"
--
2.39.2
- [PATCH 02/11] tests/docker: all add DOCKER_BUILDKIT to RUNC environment, (continued)
- [PATCH 02/11] tests/docker: all add DOCKER_BUILDKIT to RUNC environment, Alex Bennée, 2023/03/10
- [PATCH 01/11] tests/avocado: update AArch64 tests to Alpine 3.17.2, Alex Bennée, 2023/03/10
- [PATCH 03/11] scripts/ci: add libslirp-devel to build-environment, Alex Bennée, 2023/03/10
- [PATCH 09/11] tests/tcg: disable pauth for aarch64 gdb tests, Alex Bennée, 2023/03/10
- Re: [PATCH 09/11] tests/tcg: disable pauth for aarch64 gdb tests, Richard Henderson, 2023/03/10
[PATCH 04/11] scripts/ci: update gitlab-runner playbook to handle CentOS,
Alex Bennée <=
[PATCH 07/11] tcg: Clear plugin_mem_cbs on TB exit, Alex Bennée, 2023/03/10
[PATCH 11/11] tests/avocado: don't use tags to define drive, Alex Bennée, 2023/03/10
[PATCH 10/11] include/exec: fix kerneldoc definition, Alex Bennée, 2023/03/10