Enable CCACHE in builder images / labels 39/31739/6
authorDave Wallace <dwallacelf@gmail.com>
Tue, 23 Mar 2021 22:54:36 +0000 (18:54 -0400)
committerDave Wallace <dwallacelf@gmail.com>
Thu, 25 Mar 2021 18:29:05 +0000 (14:29 -0400)
- Remove aarch64 labels which do not have any executor docker images.

Change-Id: I1f46929b1c8393aa7a25bad215a95b85f2e00bd9
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
40 files changed:
docker/scripts/lib_apt.sh
docker/scripts/lib_dnf.sh
docker/scripts/lib_yum.sh
jenkins-config/clouds/nomad/FDIONOMAD/builder-centos7-prod-aarch64.yaml [deleted file]
jenkins-config/clouds/nomad/FDIONOMAD/builder-centos7-prod-x86_64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-centos7-sandbox-aarch64.yaml [deleted file]
jenkins-config/clouds/nomad/FDIONOMAD/builder-centos7-sandbox-x86_64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-centos7-test-aarch64.yaml [deleted file]
jenkins-config/clouds/nomad/FDIONOMAD/builder-centos7-test-x86_64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-centos8-prod-aarch64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-centos8-prod-x86_64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-centos8-sandbox-aarch64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-centos8-sandbox-x86_64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-centos8-test-aarch64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-centos8-test-x86_64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-debian10-prod-aarch64.yaml [deleted file]
jenkins-config/clouds/nomad/FDIONOMAD/builder-debian10-prod-x86_64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-debian10-sandbox-aarch64.yaml [deleted file]
jenkins-config/clouds/nomad/FDIONOMAD/builder-debian10-sandbox-x86_64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-debian10-test-aarch64.yaml [deleted file]
jenkins-config/clouds/nomad/FDIONOMAD/builder-debian10-test-x86_64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-debian9-prod-aarch64.yaml [deleted file]
jenkins-config/clouds/nomad/FDIONOMAD/builder-debian9-prod-x86_64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-debian9-sandbox-aarch64.yaml [deleted file]
jenkins-config/clouds/nomad/FDIONOMAD/builder-debian9-sandbox-x86_64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-debian9-test-aarch64.yaml [deleted file]
jenkins-config/clouds/nomad/FDIONOMAD/builder-debian9-test-x86_64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-ubuntu1804-prod-aarch64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-ubuntu1804-prod-x86_64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-ubuntu1804-sandbox-aarch64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-ubuntu1804-sandbox-x86_64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-ubuntu1804-test-aarch64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-ubuntu1804-test-x86_64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-ubuntu2004-prod-aarch64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-ubuntu2004-prod-x86_64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-ubuntu2004-sandbox-aarch64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-ubuntu2004-sandbox-x86_64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-ubuntu2004-test-aarch64.yaml
jenkins-config/clouds/nomad/FDIONOMAD/builder-ubuntu2004-test-x86_64.yaml
jjb/scripts/setup_executor_env.sh

index 8994a78..af9da0b 100644 (file)
@@ -249,8 +249,7 @@ COPY files/sshconfig /root/.ssh/config
 WORKDIR /
 $vpp_install_skip_sysctl_envvar
 ENV VPP_ZOMBIE_NOCHECK="1"
-# TODO: Mount ccache volume into docker container, then remove this.
-ENV CCACHE_DISABLE="1"
+ENV CCACHE_DIR="/scratch/ccache"
 EOF
     generate_apt_dockerfile_clean
 }
index c5bb5c4..34bc40c 100644 (file)
@@ -166,8 +166,7 @@ RUN gem install package_cloud \\
 # CI Runtime Environment
 WORKDIR /
 ENV VPP_ZOMBIE_NOCHECK="1"
-# TODO: Mount ccache volume into docker container, then remove this.
-ENV CCACHE_DISABLE="1"
+ENV CCACHE_DIR="/scratch/ccache"
 EOF
     generate_dnf_dockerfile_clean
 }
index b24b229..4e165e6 100644 (file)
@@ -169,8 +169,7 @@ RUN gem install package_cloud \\
 # CI Runtime Environment
 WORKDIR /
 ENV VPP_ZOMBIE_NOCHECK="1"
-# TODO: Mount ccache volume into docker container, then remove this.
-ENV CCACHE_DISABLE="1"
+ENV CCACHE_DIR="/scratch/ccache"
 EOF
     generate_yum_dockerfile_clean
 }
diff --git a/jenkins-config/clouds/nomad/FDIONOMAD/builder-centos7-prod-aarch64.yaml b/jenkins-config/clouds/nomad/FDIONOMAD/builder-centos7-prod-aarch64.yaml
deleted file mode 100644 (file)
index 95b632f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
----
-templates:
-  - image: "fdiotools/builder-centos7:prod-aarch64"
-    labels: "builder-centos7-prod-aarch64"
-    prefix: "builder-centos7-prod-aarch64"
index a5d77a7..95b451f 100644 (file)
@@ -12,3 +12,4 @@ templates:
     labels: "builder-centos7-prod-x86_64"
     memory: 14000
     prefix: "builder-centos7-prod-x86_64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
diff --git a/jenkins-config/clouds/nomad/FDIONOMAD/builder-centos7-sandbox-aarch64.yaml b/jenkins-config/clouds/nomad/FDIONOMAD/builder-centos7-sandbox-aarch64.yaml
deleted file mode 100644 (file)
index 2458aa9..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
----
-templates:
-  - image: "fdiotools/builder-centos7:sandbox-aarch64"
-    labels: "builder-centos7-sandbox-aarch64"
-    prefix: "builder-centos7-sandbox-aarch64"
index efa35ed..6a52ded 100644 (file)
@@ -12,3 +12,4 @@ templates:
     labels: "builder-centos7-sandbox-x86_64"
     memory: 14000
     prefix: "builder-centos7-sandbox-x86_64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
diff --git a/jenkins-config/clouds/nomad/FDIONOMAD/builder-centos7-test-aarch64.yaml b/jenkins-config/clouds/nomad/FDIONOMAD/builder-centos7-test-aarch64.yaml
deleted file mode 100644 (file)
index 364e6a1..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
----
-templates:
-  - image: "fdiotools/builder-centos7:test-aarch64"
-    labels: "builder-centos7-test-aarch64"
-    prefix: "builder-centos7-test-aarch64"
index 529c2a1..1b58ba5 100644 (file)
@@ -12,3 +12,4 @@ templates:
     labels: "builder-centos7-test-x86_64"
     memory: 14000
     prefix: "builder-centos7-test-x86_64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
index 4e60a6d..b01ee17 100644 (file)
@@ -3,3 +3,4 @@ templates:
   - image: "fdiotools/builder-centos8:prod-aarch64"
     labels: "builder-centos8-prod-aarch64"
     prefix: "builder-centos8-prod-aarch64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
index 09ddccc..efba480 100644 (file)
@@ -12,3 +12,4 @@ templates:
     labels: "builder-centos8-prod-x86_64"
     memory: 14000
     prefix: "builder-centos8-prod-x86_64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
index 8a0d72a..6dd19a3 100644 (file)
@@ -3,3 +3,4 @@ templates:
   - image: "fdiotools/builder-centos8:sandbox-aarch64"
     labels: "builder-centos8-sandbox-aarch64"
     prefix: "builder-centos8-sandbox-aarch64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
index 447ceb5..a5ec1c1 100644 (file)
@@ -12,3 +12,4 @@ templates:
     labels: "builder-centos8-sandbox-x86_64"
     memory: 14000
     prefix: "builder-centos8-sandbox-x86_64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
index 0ae69f6..e64c44a 100644 (file)
@@ -3,3 +3,4 @@ templates:
   - image: "fdiotools/builder-centos8:test-aarch64"
     labels: "builder-centos8-test-aarch64"
     prefix: "builder-centos8-test-aarch64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
index 8868e31..e6fe1df 100644 (file)
@@ -12,3 +12,4 @@ templates:
     labels: "builder-centos8-test-x86_64"
     memory: 14000
     prefix: "builder-centos8-test-x86_64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
diff --git a/jenkins-config/clouds/nomad/FDIONOMAD/builder-debian10-prod-aarch64.yaml b/jenkins-config/clouds/nomad/FDIONOMAD/builder-debian10-prod-aarch64.yaml
deleted file mode 100644 (file)
index 2145da0..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
----
-templates:
-  - image: "fdiotools/builder-debian10:prod-aarch64"
-    labels: "builder-debian10-prod-aarch64"
-    prefix: "builder-debian10-prod-aarch64"
index b3444f8..27433e6 100644 (file)
@@ -12,3 +12,4 @@ templates:
     labels: "builder-debian10-prod-x86_64"
     memory: 14000
     prefix: "builder-debian10-prod-x86_64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
diff --git a/jenkins-config/clouds/nomad/FDIONOMAD/builder-debian10-sandbox-aarch64.yaml b/jenkins-config/clouds/nomad/FDIONOMAD/builder-debian10-sandbox-aarch64.yaml
deleted file mode 100644 (file)
index 6cb7529..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
----
-templates:
-  - image: "fdiotools/builder-debian10:sandbox-aarch64"
-    labels: "builder-debian10-sandbox-aarch64"
-    prefix: "builder-debian10-sandbox-aarch64"
index 424e5cf..9320036 100644 (file)
@@ -12,3 +12,4 @@ templates:
     labels: "builder-debian10-sandbox-x86_64"
     memory: 14000
     prefix: "builder-debian10-sandbox-x86_64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
diff --git a/jenkins-config/clouds/nomad/FDIONOMAD/builder-debian10-test-aarch64.yaml b/jenkins-config/clouds/nomad/FDIONOMAD/builder-debian10-test-aarch64.yaml
deleted file mode 100644 (file)
index 92b9937..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
----
-templates:
-  - image: "fdiotools/builder-debian10:test-aarch64"
-    labels: "builder-debian10-test-aarch64"
-    prefix: "builder-debian10-test-aarch64"
index 359323d..e40a09b 100644 (file)
@@ -12,3 +12,4 @@ templates:
     labels: "builder-debian10-test-x86_64"
     memory: 14000
     prefix: "builder-debian10-test-x86_64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
diff --git a/jenkins-config/clouds/nomad/FDIONOMAD/builder-debian9-prod-aarch64.yaml b/jenkins-config/clouds/nomad/FDIONOMAD/builder-debian9-prod-aarch64.yaml
deleted file mode 100644 (file)
index c247c76..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
----
-templates:
-  - image: "fdiotools/builder-debian9:prod-aarch64"
-    labels: "builder-debian9-prod-aarch64"
-    prefix: "builder-debian9-prod-aarch64"
index 1314af8..d4115a5 100644 (file)
@@ -12,3 +12,4 @@ templates:
     labels: "builder-debian9-prod-x86_64"
     memory: 14000
     prefix: "builder-debian9-prod-x86_64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
diff --git a/jenkins-config/clouds/nomad/FDIONOMAD/builder-debian9-sandbox-aarch64.yaml b/jenkins-config/clouds/nomad/FDIONOMAD/builder-debian9-sandbox-aarch64.yaml
deleted file mode 100644 (file)
index af12835..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
----
-templates:
-  - image: "fdiotools/builder-debian9:sandbox-aarch64"
-    labels: "builder-debian9-sandbox-aarch64"
-    prefix: "builder-debian9-sandbox-aarch64"
index 86847e1..5a3a6c7 100644 (file)
@@ -12,3 +12,4 @@ templates:
     labels: "builder-debian9-sandbox-x86_64"
     memory: 14000
     prefix: "builder-debian9-sandbox-x86_64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
diff --git a/jenkins-config/clouds/nomad/FDIONOMAD/builder-debian9-test-aarch64.yaml b/jenkins-config/clouds/nomad/FDIONOMAD/builder-debian9-test-aarch64.yaml
deleted file mode 100644 (file)
index ff8e981..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
----
-templates:
-  - image: "fdiotools/builder-debian9:test-aarch64"
-    labels: "builder-debian9-test-aarch64"
-    prefix: "builder-debian9-test-aarch64"
index 6042ed3..057527f 100644 (file)
@@ -12,3 +12,4 @@ templates:
     labels: "builder-debian9-test-x86_64"
     memory: 14000
     prefix: "builder-debian9-test-x86_64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
index b857ebe..d72e1dd 100644 (file)
@@ -3,3 +3,4 @@ templates:
   - image: "fdiotools/builder-ubuntu1804:prod-aarch64"
     labels: "builder-ubuntu1804-prod-aarch64"
     prefix: "builder-ubuntu1804-prod-aarch64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
index d7c4ef6..b6267be 100644 (file)
@@ -12,3 +12,4 @@ templates:
     labels: "builder-ubuntu1804-prod-x86_64"
     memory: 14000
     prefix: "builder-ubuntu1804-prod-x86_64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
index 3be0f2b..f897aa4 100644 (file)
@@ -3,3 +3,4 @@ templates:
   - image: "fdiotools/builder-ubuntu1804:sandbox-aarch64"
     labels: "builder-ubuntu1804-sandbox-aarch64"
     prefix: "builder-ubuntu1804-sandbox-aarch64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
index c28e5f8..9fd8d0c 100644 (file)
@@ -12,3 +12,4 @@ templates:
     labels: "builder-ubuntu1804-sandbox-x86_64"
     memory: 14000
     prefix: "builder-ubuntu1804-sandbox-x86_64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
index 2d4481f..bcb41bb 100644 (file)
@@ -3,3 +3,4 @@ templates:
   - image: "fdiotools/builder-ubuntu1804:test-aarch64"
     labels: "builder-ubuntu1804-test-aarch64"
     prefix: "builder-ubuntu1804-test-aarch64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
index 3341b25..83691cf 100644 (file)
@@ -12,3 +12,4 @@ templates:
     labels: "builder-ubuntu1804-test-x86_64"
     memory: 14000
     prefix: "builder-ubuntu1804-test-x86_64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
index 71bd7c8..eee2c64 100644 (file)
@@ -3,3 +3,4 @@ templates:
   - image: "fdiotools/builder-ubuntu2004:prod-aarch64"
     labels: "builder-ubuntu2004-prod-aarch64"
     prefix: "builder-ubuntu2004-prod-aarch64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
index 2560e45..a0d493c 100644 (file)
@@ -12,3 +12,4 @@ templates:
     labels: "builder-ubuntu2004-prod-x86_64"
     memory: 14000
     prefix: "builder-ubuntu2004-prod-x86_64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
index 9f23d19..dd4de72 100644 (file)
@@ -3,3 +3,4 @@ templates:
   - image: "fdiotools/builder-ubuntu2004:sandbox-aarch64"
     labels: "builder-ubuntu2004-sandbox-aarch64"
     prefix: "builder-ubuntu2004-sandbox-aarch64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
index 53426ed..3fc8d54 100644 (file)
@@ -12,3 +12,4 @@ templates:
     labels: "builder-ubuntu2004-sandbox-x86_64"
     memory: 14000
     prefix: "builder-ubuntu2004-sandbox-x86_64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
index 31b815c..850d53a 100644 (file)
@@ -3,3 +3,4 @@ templates:
   - image: "fdiotools/builder-ubuntu2004:test-aarch64"
     labels: "builder-ubuntu2004-test-aarch64"
     prefix: "builder-ubuntu2004-test-aarch64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
index b35cef8..5a1c326 100644 (file)
@@ -12,3 +12,4 @@ templates:
     labels: "builder-ubuntu2004-test-x86_64"
     memory: 14000
     prefix: "builder-ubuntu2004-test-x86_64"
+    hostVolumes: "/tmp/ccache:/scratch/ccache"
index f6b6480..fbbcc5a 100755 (executable)
@@ -59,4 +59,26 @@ ls -lh "$downloads_cache" || true
 echo "$long_line"
 echo "DNS nameserver config in '/etc/resolv.conf':"
 cat /etc/resolv.conf || true
+
+if [ -n "${CCACHE_DIR:-}" ] ; then
+    echo "$long_line"
+    if [ -d "$CCACHE_DIR" ] ; then
+        num_ccache_files="$(find $CCACHE_DIR -type f | wc -l)"
+        ccache_conf="$CCACHE_DIR/ccache.conf"
+        echo "CCACHE_DIR='$CCACHE_DIR' ($num_ccache_files ccache files):"
+        du -sh /tmp/ccache
+        df -h /tmp/ccache
+        ls -l $CCACHE_DIR
+        unset -v CCACHE_DISABLE
+        if [ -f "$ccache_conf" ] ; then
+            echo "Contents of $ccache_conf:"
+            cat $ccache_conf
+        fi
+    else
+        echo "CCACHE_DIR='$CCACHE_DIR' is missing, disabling CCACHE..."
+        unset -v CCACHE_DIR
+        export CCACHE_DISABLE="1"
+        echo "CCACHE_DISABLE='${CCACHE_DISABLE:-}'"
+    fi
+fi
 echo "$long_line"