[master] c3875bbb7 circleci: Avoid building a new container image

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


commit c3875bbb7a5880f41dd6b576133867a520aba579
Author: Guillaume Quintard <guillaume.quintard at gmail.com>
Date:   Tue Feb 1 20:36:49 2022 -0800

    circleci: Avoid building a new container image
    
    Instead we can run packaging jobs directly from the target system's base
    image.

diff --git a/.circleci/config.yml b/.circleci/config.yml
index eec999dbf..2f4e303e5 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -176,14 +176,14 @@ jobs:
                     ;;
             esac
 
-            set -x
-            echo "FROM $IMG" > Dockerfile
-            echo "ADD make-$EXT-packages.sh /usr/bin/" >> Dockerfile
-            echo "CMD make-$EXT-packages.sh" >> Dockerfile
-
-            cp .circleci/make-$EXT-packages.sh .
-            docker build -t docker_img .
-            docker run --rm -it -e PARAM_DIST=$(echo "<< parameters.platform >>" | cut -d: -f1) -e PARAM_RELEASE=$(echo "<< parameters.platform >>" | cut -d: -f2) -v$(pwd):/varnish-cache docker_img
+            docker run \
+              --rm \
+              -it \
+              -e PARAM_DIST=$(echo "<< parameters.platform >>" | cut -d: -f1) \
+              -e PARAM_RELEASE=$(echo "<< parameters.platform >>" | cut -d: -f2) \
+              -v$(pwd):/varnish-cache \
+              $IMG \
+              /varnish-cache/.circleci/make-$EXT-packages.sh
       - run:
           name: List created packages
           command: find ./packages -type f


More information about the varnish-commit mailing list