summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrevor Bramwell <tbramwell@linuxfoundation.org>2021-11-19 10:18:09 -0800
committerTrevor Bramwell <tbramwell@linuxfoundation.org>2021-11-19 10:21:33 -0800
commit6a47303b70036b5b0c7c9f865ee3f12e0304a29e (patch)
treef2659fba2310c5486bfbb55f0a1907a38c56dc69
parenta94f032a7b36b148728cd5bdf6fb32bcf0ca2ef3 (diff)
Support CentOS 7 in GoogleStorage Gitlab template
Add a check for `dnf` to the GoogleStorage gitlab-ci template, falling back to `yum` if the command is not available. This should allow the job to work on both CentOS 7 and 8. Change-Id: I0964c23d799bb394bc331bd740a0d6a1cba74082 Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
-rw-r--r--gitlab-templates/GoogleStorage.gitlab-ci.yml7
1 files changed, 6 insertions, 1 deletions
diff --git a/gitlab-templates/GoogleStorage.gitlab-ci.yml b/gitlab-templates/GoogleStorage.gitlab-ci.yml
index be941a81e..4ddf313d6 100644
--- a/gitlab-templates/GoogleStorage.gitlab-ci.yml
+++ b/gitlab-templates/GoogleStorage.gitlab-ci.yml
@@ -24,7 +24,12 @@ variables:
.gsutil-install: &gsutil-install
script:
- - dnf -y install python3-pip
+ - |
+ if command -v dnf &> /dev/null; then
+ dnf -y install python3-pip
+ else
+ yum -y install python3-pip
+ fi
- python3 -m pip install -U pip
- python3 -m pip install gsutil
- echo "$GSUTIL_CONFIG" > ~/.boto