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:
exit 1
esac
case "<< parameters.platform >>" in
centos:stream) REPO=quay.io/centos/ ;;
*) REPO= ;;
esac
case "<< parameters.rclass >>" in
arm.*)
IMG=arm64v8/<< parameters.platform >>
;;
*)
IMG=<< parameters.platform >>
;;
arm.*) ARCH=arm64 ;;
*) ARCH=amd64 ;;
esac
docker run \
......@@ -182,7 +183,8 @@ jobs:
-e PARAM_DIST=$(echo "<< parameters.platform >>" | cut -d: -f1) \
-e PARAM_RELEASE=$(echo "<< parameters.platform >>" | cut -d: -f2) \
-v$(pwd):/varnish-cache \
$IMG \
--platform linux/$ARCH \
${REPO}<< parameters.platform >> \
/varnish-cache/.circleci/make-$EXT-packages.sh
- run:
name: List created packages
......@@ -193,6 +195,10 @@ jobs:
- "packages"
distcheck:
parameters:
prefix:
description: the container image repository
type: string
default: ""
dist:
description: the Linux distribution (debian|ubuntu)
type: string
......@@ -216,13 +222,13 @@ jobs:
- run:
name: Extract and distcheck
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 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
yum groupinstall -y "Development Tools"
if [ << parameters.dist >> = centos ]; then
if [ << parameters.release >> = 8 ]; then
if [ << parameters.release >> = stream ]; then
dnf install -y "dnf-command(config-manager)"
yum config-manager --set-enabled powertools
yum install -y diffutils
......@@ -350,9 +356,10 @@ workflows:
dist: centos
release: "7"
- distcheck:
name: distcheck_centos_8
name: distcheck_centos_stream
prefix: quay.io/centos/
dist: centos
release: "8"
release: stream
- distcheck:
name: distcheck_fedora_latest
dist: fedora
......@@ -405,7 +412,7 @@ workflows:
- debian:buster
- debian:stretch
- centos:7
- centos:8
- centos:stream
- fedora:latest
- alpine:3
rclass:
......
......@@ -6,7 +6,7 @@ echo "PARAM_RELEASE: $PARAM_RELEASE"
echo "PARAM_DIST: $PARAM_DIST"
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
elif [ -z "$PARAM_DIST" ]; then
echo "Env variable PARAM_DIST is not set! For example PARAM_DIST=centos"
......@@ -14,7 +14,7 @@ elif [ -z "$PARAM_DIST" ]; then
fi
if [ "$PARAM_DIST" = centos ]; then
if [ "$PARAM_RELEASE" = 8 ]; then
if [ "$PARAM_RELEASE" = stream ]; then
dnf install -y 'dnf-command(config-manager)'
yum config-manager --set-enabled powertools
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