From 6a47303b70036b5b0c7c9f865ee3f12e0304a29e Mon Sep 17 00:00:00 2001 From: Trevor Bramwell Date: Fri, 19 Nov 2021 10:18:09 -0800 Subject: 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 --- gitlab-templates/GoogleStorage.gitlab-ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- cgit 1.2.3-korg