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>
.gsutil-install: &gsutil-install
script:
.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
- python3 -m pip install -U pip
- python3 -m pip install gsutil
- echo "$GSUTIL_CONFIG" > ~/.boto