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

mck pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-builds.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 861b85f  Add retry count and options to wget and curl  jenkins builds 
were crashing because these commands would trip on any network hickup
861b85f is described below

commit 861b85fea658a0009cf2dbfe91003b874b00fb40
Author: Mick Semb Wever <m...@apache.org>
AuthorDate: Wed May 12 20:03:55 2021 +0200

    Add retry count and options to wget and curl
     jenkins builds were crashing because these commands would trip on any 
network hickup
---
 build-scripts/cassandra-test-docker.sh | 2 +-
 docker/centos8-image.docker            | 2 +-
 jenkins-dsl/cassandra_pipeline.groovy  | 1 +
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/build-scripts/cassandra-test-docker.sh 
b/build-scripts/cassandra-test-docker.sh
index 4d2cd6a..ff9bcc3 100755
--- a/build-scripts/cassandra-test-docker.sh
+++ b/build-scripts/cassandra-test-docker.sh
@@ -81,7 +81,7 @@ EOF
           # Jenkins agents run multiple executors per machine. 
`jenkins_executors=1` is used for anything non-jenkins.
           jenkins_executors=1
           if [[ ! -z ${JENKINS_URL+x} ]] && [[ ! -z ${NODE_NAME+x} ]] ; then
-              jenkins_executors=$(curl -s 
"${JENKINS_URL}/computer/${NODE_NAME}/api/json?pretty=true" | grep 
'numExecutors' | awk -F' : ' '{print $2}' | cut -d',' -f1)
+              jenkins_executors=$(curl -s --retry 9 --retry-connrefused 
--retry-delay 1 "${JENKINS_URL}/computer/${NODE_NAME}/api/json?pretty=true" | 
grep 'numExecutors' | awk -F' : ' '{print $2}' | cut -d',' -f1)
           fi
           max_docker_runs_by_cores=$( echo "sqrt( $cores / $jenkins_executors 
)" | bc )
           max_docker_runs_by_mem=$(( $mem / ( 5 * 1024 * 1024 * 1024 * 
$jenkins_executors ) ))
diff --git a/docker/centos8-image.docker b/docker/centos8-image.docker
index 0c7e0c3..c605949 100644
--- a/docker/centos8-image.docker
+++ b/docker/centos8-image.docker
@@ -20,7 +20,7 @@ RUN yum -y install \
    sudo \
    python3-pip
 
-RUN curl -S -s --retry 9 
http://mirror.centos.org/centos/7/os/x86_64/Packages/ant-junit-1.9.4-2.el7.noarch.rpm
 -o ant-junit-1.9.4-2.el7.noarch.rpm
+RUN curl -S -s --retry 9 --retry-connrefused --retry-delay 1 
http://mirror.centos.org/centos/7/os/x86_64/Packages/ant-junit-1.9.4-2.el7.noarch.rpm
 -o ant-junit-1.9.4-2.el7.noarch.rpm
 
 RUN rpm -i --nodeps ant-junit-1.9.4-2.el7.noarch.rpm
 
diff --git a/jenkins-dsl/cassandra_pipeline.groovy 
b/jenkins-dsl/cassandra_pipeline.groovy
index 7e27687..4b22254 100644
--- a/jenkins-dsl/cassandra_pipeline.groovy
+++ b/jenkins-dsl/cassandra_pipeline.groovy
@@ -321,6 +321,7 @@ pipeline {
             sh "echo \"summary) cassandra-builds: `git -C cassandra-builds log 
-1 --pretty=format:'%h %an %ad %s'`\" > builds.head"
             sh "./cassandra-builds/jenkins-dsl/print-shas.sh"
             sh "xz TESTS-TestSuites.xml"
+            sh "wget --retry-connrefused --waitretry=1 
\"\${BUILD_URL}/timestamps/?time=HH:mm:ss&timeZone=UTC&appendLog\" -qO - > 
console.log.xz || echo wget failed"
             sh "echo \"For test report and logs see 
https://nightlies.apache.org/cassandra/devbranch/${JOB_NAME}/${BUILD_NUMBER}/\"";
         }
         post {

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to