aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2023-03-15 17:43:03 +0000
committerAlex Bennée <alex.bennee@linaro.org>2023-03-22 15:06:57 +0000
commit82790dfefc98686fb268a75f76ba44a7f09f133c (patch)
tree7d4a5d022656a82d86f97db4ca679cf7086acfbe /scripts
parent6df250e1812652fa2024d5e5c88a706c4e973428 (diff)
scripts/ci: update gitlab-runner playbook to handle CentOS
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> Message-Id: <20230315174331.2959-5-alex.bennee@linaro.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/ci/setup/gitlab-runner.yml20
1 files 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\"] }})'"