Commit 5fe5bf6a authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

circleci: Move centos:8 jobs to centos:stream

We grab the image from Red Hat's quay.io image repository, which is done
with the addition of an optional prefix parameter for distcheck jobs and
a hardcoded hack for packaging jobs.

To make this work, the aarch64 packaging jobs had to be generalized to
less specific "arm64" images.
parent 51f12256
...@@ -167,13 +167,14 @@ jobs: ...@@ -167,13 +167,14 @@ jobs:
exit 1 exit 1
esac esac
case "<< parameters.platform >>" in
centos:stream) REPO=quay.io/centos/ ;;
*) REPO= ;;
esac
case "<< parameters.rclass >>" in case "<< parameters.rclass >>" in
arm.*) arm.*) ARCH=arm64 ;;
IMG=arm64v8/<< parameters.platform >> *) ARCH=amd64 ;;
;;
*)
IMG=<< parameters.platform >>
;;
esac esac
docker run \ docker run \
...@@ -182,7 +183,8 @@ jobs: ...@@ -182,7 +183,8 @@ jobs:
-e PARAM_DIST=$(echo "<< parameters.platform >>" | cut -d: -f1) \ -e PARAM_DIST=$(echo "<< parameters.platform >>" | cut -d: -f1) \
-e PARAM_RELEASE=$(echo "<< parameters.platform >>" | cut -d: -f2) \ -e PARAM_RELEASE=$(echo "<< parameters.platform >>" | cut -d: -f2) \
-v$(pwd):/varnish-cache \ -v$(pwd):/varnish-cache \
$IMG \ --platform linux/$ARCH \
${REPO}<< parameters.platform >> \
/varnish-cache/.circleci/make-$EXT-packages.sh /varnish-cache/.circleci/make-$EXT-packages.sh
- run: - run:
name: List created packages name: List created packages
...@@ -193,6 +195,10 @@ jobs: ...@@ -193,6 +195,10 @@ jobs:
- "packages" - "packages"
distcheck: distcheck:
parameters: parameters:
prefix:
description: the container image repository
type: string
default: ""
dist: dist:
description: the Linux distribution (debian|ubuntu) description: the Linux distribution (debian|ubuntu)
type: string type: string
...@@ -216,13 +222,13 @@ jobs: ...@@ -216,13 +222,13 @@ jobs:
- run: - run:
name: Extract and distcheck name: Extract and distcheck
command: | command: |
docker create --name workspace -v /workspace << parameters.dist >>:<< parameters.release >> /bin/true docker create --name workspace -v /workspace << parameters.prefix >><< parameters.dist >>:<< parameters.release >> /bin/true
docker cp /workspace workspace:/ docker cp /workspace workspace:/
docker run --volumes-from workspace -w /workspace << parameters.dist >>:<< parameters.release >> sh -c ' docker run --volumes-from workspace -w /workspace << parameters.prefix >><< parameters.dist >>:<< parameters.release >> sh -c '
if [ << parameters.dist >> = centos -o << parameters.dist >> = fedora ]; then if [ << parameters.dist >> = centos -o << parameters.dist >> = fedora ]; then
yum groupinstall -y "Development Tools" yum groupinstall -y "Development Tools"
if [ << parameters.dist >> = centos ]; then if [ << parameters.dist >> = centos ]; then
if [ << parameters.release >> = 8 ]; then if [ << parameters.release >> = stream ]; then
dnf install -y "dnf-command(config-manager)" dnf install -y "dnf-command(config-manager)"
yum config-manager --set-enabled powertools yum config-manager --set-enabled powertools
yum install -y diffutils yum install -y diffutils
...@@ -350,9 +356,10 @@ workflows: ...@@ -350,9 +356,10 @@ workflows:
dist: centos dist: centos
release: "7" release: "7"
- distcheck: - distcheck:
name: distcheck_centos_8 name: distcheck_centos_stream
prefix: quay.io/centos/
dist: centos dist: centos
release: "8" release: stream
- distcheck: - distcheck:
name: distcheck_fedora_latest name: distcheck_fedora_latest
dist: fedora dist: fedora
...@@ -405,7 +412,7 @@ workflows: ...@@ -405,7 +412,7 @@ workflows:
- debian:buster - debian:buster
- debian:stretch - debian:stretch
- centos:7 - centos:7
- centos:8 - centos:stream
- fedora:latest - fedora:latest
- alpine:3 - alpine:3
rclass: rclass:
......
...@@ -6,7 +6,7 @@ echo "PARAM_RELEASE: $PARAM_RELEASE" ...@@ -6,7 +6,7 @@ echo "PARAM_RELEASE: $PARAM_RELEASE"
echo "PARAM_DIST: $PARAM_DIST" echo "PARAM_DIST: $PARAM_DIST"
if [ -z "$PARAM_RELEASE" ]; then if [ -z "$PARAM_RELEASE" ]; then
echo "Env variable PARAM_RELEASE is not set! For example PARAM_RELEASE=8, for CentOS 8" echo "Env variable PARAM_RELEASE is not set! For example PARAM_RELEASE=stream, for CentOS stream"
exit 1 exit 1
elif [ -z "$PARAM_DIST" ]; then elif [ -z "$PARAM_DIST" ]; then
echo "Env variable PARAM_DIST is not set! For example PARAM_DIST=centos" echo "Env variable PARAM_DIST is not set! For example PARAM_DIST=centos"
...@@ -14,7 +14,7 @@ elif [ -z "$PARAM_DIST" ]; then ...@@ -14,7 +14,7 @@ elif [ -z "$PARAM_DIST" ]; then
fi fi
if [ "$PARAM_DIST" = centos ]; then if [ "$PARAM_DIST" = centos ]; then
if [ "$PARAM_RELEASE" = 8 ]; then if [ "$PARAM_RELEASE" = stream ]; then
dnf install -y 'dnf-command(config-manager)' dnf install -y 'dnf-command(config-manager)'
yum config-manager --set-enabled powertools yum config-manager --set-enabled powertools
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment