You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2023/10/06 17:59:53 UTC

[couchdb] 01/01: Configure hex, gradle, pip and npm caches.

This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch jenkins-hex-cache
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 5852b79a33804ae104486e5ad2cbc374fdc48329
Author: Nick Vatamaniuc <va...@gmail.com>
AuthorDate: Thu Oct 5 13:01:24 2023 -0400

    Configure hex, gradle, pip and npm caches.
    
    We saw repeated failures on some CI nodes, possibly from them being throttled
    by hex.pm. To mitigate it, try to setup package caches for hex, gradle, pip and
    npm.
    
    So far it works with Docker builder only but requires that cache directories in
    /home/jenkins are owned by the `jenkins` user. That has to happen as part of
    the Jenkins node setup. Nodes controlled from couchdb-infra-cm have been
    updated to have those directories and permission however the ARM64 one doesn't
    yet, so we're excluding it temporarily.
---
 build-aux/Jenkinsfile.full | 19 +++++++++++--------
 build-aux/Jenkinsfile.pr   |  2 +-
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/build-aux/Jenkinsfile.full b/build-aux/Jenkinsfile.full
index 4ca68ca46..dcd429f82 100644
--- a/build-aux/Jenkinsfile.full
+++ b/build-aux/Jenkinsfile.full
@@ -65,13 +65,16 @@ meta = [
     image: "apache/couchdbci-debian:buster-erlang-${ERLANG_VERSION}"
   ],
 
-  'bullseye-arm64': [
-    name: 'Debian 11 ARM',
-    spidermonkey_vsn: '78',
-    enable_nouveau: true,
-    image: "apache/couchdbci-debian:bullseye-erlang-${ERLANG_VERSION}",
-    node_label: 'arm64v8'
-  ],
+  // Exclude temporarily until we can fix package cache directory
+  // permissions
+  //
+  // 'bullseye-arm64': [
+  //   name: 'Debian 11 ARM',
+  //   spidermonkey_vsn: '78',
+  //   enable_nouveau: true,
+  //   image: "apache/couchdbci-debian:bullseye-erlang-${ERLANG_VERSION}",
+  //   node_label: 'arm64v8'
+  // ],
 
   'bullseye-ppc64': [
     name: 'Debian 11 POWER',
@@ -282,7 +285,7 @@ pipeline {
     // We need the jenkins user mapped inside of the image
     // npm config cache below deals with /home/jenkins not mapping correctly
     // inside the image
-    DOCKER_ARGS = '-e npm_config_cache=npm-cache -e HOME=. -v=/etc/passwd:/etc/passwd -v /etc/group:/etc/group -v /root/.gradle:/root/.gradle'
+    DOCKER_ARGS = '-e npm_config_cache=/home/jenkins/.npm -e HOME=. -e MIX_HOME=/home/jenkins/.mix -e HEX_HOME=/home/jenkins/.hex -e PIP_CACHE_DIR=/home/jenkins/.cache/pip -v=/etc/passwd:/etc/passwd -v /etc/group:/etc/group -v /home/jenkins/.gradle:/home/jenkins/.gradle:rw,z -v /home/jenkins/.hex:/home/jenkins/.hex:rw,z -v /home/jenkins/.npm:/home/jenkins/.npm:rw,z -v /home/jenkins/.cache/pip:/home/jenkins/.cache/pip:rw,z -v /home/jenkins/.mix:/home/jenkins/.mix:rw,z'
   }
 
   options {
diff --git a/build-aux/Jenkinsfile.pr b/build-aux/Jenkinsfile.pr
index 8b114803f..75ccdedf9 100644
--- a/build-aux/Jenkinsfile.pr
+++ b/build-aux/Jenkinsfile.pr
@@ -44,7 +44,7 @@ pipeline {
     // We need the jenkins user mapped inside of the image
     // npm config cache below deals with /home/jenkins not mapping correctly
     // inside the image
-    DOCKER_ARGS = '-e npm_config_cache=npm-cache -e HOME=. -v=/etc/passwd:/etc/passwd -v /etc/group:/etc/group'
+    DOCKER_ARGS = '-e npm_config_cache=/home/jenkins/.npm -e HOME=. -e MIX_HOME=/home/jenkins/.mix -e HEX_HOME=/home/jenkins/.hex -e PIP_CACHE_DIR=/home/jenkins/.cache/pip -v=/etc/passwd:/etc/passwd -v /etc/group:/etc/group -v /home/jenkins/.gradle:/home/jenkins/.gradle:rw,z -v /home/jenkins/.hex:/home/jenkins/.hex:rw,z -v /home/jenkins/.npm:/home/jenkins/.npm:rw,z -v /home/jenkins/.cache/pip:/home/jenkins/.cache/pip:rw,z -v /home/jenkins/.mix:/home/jenkins/.mix:rw,z'
 
     // *** BE SURE TO ALSO CHANGE THE ERLANG VERSIONS FARTHER DOWN ***
     // Search for ERLANG_VERSION