[7.4] 71abe2ed6 circleci: Move away from centos:7 as a base image

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Fri Jun 21 13:42:15 UTC 2024


commit 71abe2ed63786a5db68813f8917bdc2bb8c39ce2
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Tue Jun 11 16:28:49 2024 +0200

    circleci: Move away from centos:7 as a base image
    
    For the build jobs we can directly use the target images and avoid the
    nested docker invocation. For other jobs or Dockerfiles where centos:7
    is used we can switch to a self-updating fedora:latest image.
    
    Better diff with the --ignore-all-space option.

diff --git a/.circleci/Dockerfile b/.circleci/Dockerfile
index 71bbce5be..9ef231e0f 100644
--- a/.circleci/Dockerfile
+++ b/.circleci/Dockerfile
@@ -1,8 +1,7 @@
-FROM centos:7
+FROM fedora-latest
 
-RUN set -e;\
-	yum install -y epel-release; \
-	yum install -y \
+RUN set -e; \
+	dnf -y install \
 	    automake \
 	    git \
 	    jemalloc-devel \
@@ -12,4 +11,4 @@ RUN set -e;\
 	    make \
 	    pcre2-devel \
 	    python3 \
-	    python-sphinx
+	    python3-sphinx
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 0d5632560..a6eeb3f73 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -30,13 +30,12 @@ jobs:
   dist:
     description: Build or download varnish-x.y.z.tar.gz that is used later for the packaging jobs
     docker:
-      - image: centos:7
+      - image: fedora:latest
     steps:
       - run:
           name: Install deps
           command: |
-            yum install -y epel-release
-            yum install -y \
+            dnf -y install \
                 automake \
                 jemalloc-devel \
                 git \
@@ -46,7 +45,7 @@ jobs:
                 make \
                 pcre2-devel \
                 python3 \
-                python-sphinx
+                python3-sphinx
       - checkout
       - when:
           condition: << pipeline.parameters.dist-url >>
@@ -98,7 +97,7 @@ jobs:
   tar_pkg_tools:
     description: Builds archives with the packaging tools from https://github.com/varnishcache/pkg-varnish-cache
     docker:
-      - image: centos:7
+      - image: fedora:latest
     steps:
       - add_ssh_keys:
           fingerprints:
@@ -106,7 +105,7 @@ jobs:
       - run:
           name: Grab the pkg repo
           command: |
-            yum install -y git
+            dnf -y install git
             mkdir -p ~/.ssh
             ssh-keyscan -H github.com >> ~/.ssh/known_hosts
             echo ${CIRCLE_REPOSITORY_URL}
@@ -219,21 +218,14 @@ jobs:
         default: medium
         type: string
     docker:
-      - image: centos:7
+      - image: << parameters.prefix >><< parameters.dist >>:<< parameters.release >>
     resource_class: << parameters.rclass >>
     working_directory: /workspace
     steps:
-      - setup_remote_docker
-      - run:
-          name: Install docker
-          command: yum install -y docker
       - checkout
       - run:
           name: Extract and build
           command: |
-            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.prefix >><< parameters.dist >>:<< parameters.release >> sh -c '
             case "<< parameters.dist >>" in
             almalinux|fedora)
                 dnf -y groupinstall "Development Tools"
@@ -337,27 +329,23 @@ jobs:
 
             chown -R varnish:varnish .
 
-            export ASAN_OPTIONS=abort_on_error=1,detect_odr_violation=1,detect_leaks=1,detect_stack_use_after_return=1,detect_invalid_pointer_pairs=1,handle_segv=0,handle_sigbus=0,use_sigaltstack=0,disable_coredump=0
-            export LSAN_OPTIONS=abort_on_error=1,use_sigaltstack=0,suppressions=$(pwd)/tools/lsan.suppr
-            export TSAN_OPTIONS=abort_on_error=1,halt_on_error=1,use_sigaltstack=0,suppressions=$(pwd)/tools/tsan.suppr
-            export UBSAN_OPTIONS=halt_on_error=1,print_stacktrace=1,use_sigaltstack=0,suppressions=$(pwd)/tools/ubsan.suppr
-
-            sudo -u varnish \
+            sudo -u varnish sh -c '
+                export ASAN_OPTIONS=abort_on_error=1,detect_odr_violation=1,detect_leaks=1,detect_stack_use_after_return=1,detect_invalid_pointer_pairs=1,handle_segv=0,handle_sigbus=0,use_sigaltstack=0,disable_coredump=0
+                export LSAN_OPTIONS=abort_on_error=1,use_sigaltstack=0,suppressions=$(pwd)/tools/lsan.suppr
+                export TSAN_OPTIONS=abort_on_error=1,halt_on_error=1,use_sigaltstack=0,suppressions=$(pwd)/tools/tsan.suppr
+                export UBSAN_OPTIONS=halt_on_error=1,print_stacktrace=1,use_sigaltstack=0,suppressions=$(pwd)/tools/ubsan.suppr
                 autoreconf -i -v
-            sudo -u varnish \
                 ./configure \
-                << pipeline.parameters.configure_args >> \
-                << parameters.extra_conf >>
-            sudo -u varnish \
-                --preserve-env=ASAN_OPTIONS,LSAN_OPTIONS,TSAN_OPTIONS,UBSAN_OPTIONS \
+                    << pipeline.parameters.configure_args >> \
+                    << parameters.extra_conf >>
                 make -j 4 -k << parameters.make_target >> VERBOSE=1 \
-                DISTCHECK_CONFIGURE_FLAGS="<< pipeline.parameters.configure_args >> \
+                    DISTCHECK_CONFIGURE_FLAGS="<< pipeline.parameters.configure_args >> \
                 << parameters.extra_conf >>"
             '
 
   collect_packages:
     docker:
-      - image: centos:7
+      - image: fedora:latest
     steps:
       - attach_workspace:
           at: ~/project


More information about the varnish-commit mailing list