From: Trevor Bramwell Date: Fri, 19 Nov 2021 18:18:09 +0000 (-0800) Subject: Support CentOS 7 in GoogleStorage Gitlab template X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?p=releng.git;a=commitdiff_plain;h=6a47303b70036b5b0c7c9f865ee3f12e0304a29e 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 --- 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