From 1d6c1fab2770a7eae9f961488b0ee386203bb291 Mon Sep 17 00:00:00 2001 From: Toby Bellwood Date: Thu, 31 Aug 2023 11:52:12 +1000 Subject: [PATCH 1/2] add timeout retries to docker push --- Jenkinsfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ba2d30d100..1992f94873 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -98,8 +98,10 @@ pipeline { } steps { retry(3) { - sh script: 'docker login -u amazeeiojenkins -p $PASSWORD', label: "Docker login" - sh script: "make -O publish-testlagoon-images PUBLISH_PLATFORM_ARCH=linux/arm64,linux/amd64 BRANCH_NAME=${SAFEBRANCH_NAME}", label: "Publishing built images" + timeout(time: 10, unit: 'MINUTES') { + sh script: 'docker login -u amazeeiojenkins -p $PASSWORD', label: "Docker login" + sh script: "make -O publish-testlagoon-images PUBLISH_PLATFORM_ARCH=linux/arm64,linux/amd64 BRANCH_NAME=${SAFEBRANCH_NAME}", label: "Publishing built images" + } } } } From f26e336e739398e5b52593114260f978dcec8a2c Mon Sep 17 00:00:00 2001 From: Toby Bellwood Date: Mon, 18 Sep 2023 13:13:17 +1000 Subject: [PATCH 2/2] replace jenkins timeout with shell --- Jenkinsfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1992f94873..5e24d323c1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -98,10 +98,8 @@ pipeline { } steps { retry(3) { - timeout(time: 10, unit: 'MINUTES') { - sh script: 'docker login -u amazeeiojenkins -p $PASSWORD', label: "Docker login" - sh script: "make -O publish-testlagoon-images PUBLISH_PLATFORM_ARCH=linux/arm64,linux/amd64 BRANCH_NAME=${SAFEBRANCH_NAME}", label: "Publishing built images" - } + sh script: 'docker login -u amazeeiojenkins -p $PASSWORD', label: "Docker login" + sh script: "timeout 12m make -O publish-testlagoon-images PUBLISH_PLATFORM_ARCH=linux/arm64,linux/amd64 BRANCH_NAME=${SAFEBRANCH_NAME}", label: "Publishing built images" } } }