[master] 5fe5bf6ac circleci: Move centos:8 jobs to centos:stream

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Tue Feb 15 07:11:06 UTC 2022


commit 5fe5bf6acee90f4f4c0dc20b3c2e76c9b843efd4
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Mon Feb 14 15:48:49 2022 +0100

    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.

diff --git a/.circleci/config.yml b/.circleci/config.yml
index fcac45566..9eb09b793 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -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:
diff --git a/.circleci/make-rpm-packages.sh b/.circleci/make-rpm-packages.sh
index 63b5ae4a8..40c883d98 100755
--- a/.circleci/make-rpm-packages.sh
+++ b/.circleci/make-rpm-packages.sh
@@ -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


More information about the varnish-commit mailing list