From 87ad1288601f8135dfeb5358024d1610044763f7 Mon Sep 17 00:00:00 2001 From: Joseph Ferguson Date: Tue, 6 Aug 2024 16:42:15 -0700 Subject: [PATCH] Add timeout to wget to hopefully fallback to IPv4 when IPv6 is slow on s390x --- .github/workflows/ci.yml | 2 +- Jenkinsfile.build | 3 ++- Jenkinsfile.trigger | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0156fe0..cbbab53 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: run: | # not doing "uses: docker-library/bashbrew@xxx" because it'll build which is slow and we don't need more than just bashbrew here mkdir .bin - wget -O .bin/bashbrew 'https://github.com/docker-library/bashbrew/releases/download/v0.1.11/bashbrew-amd64' + wget --timeout=5 -O .bin/bashbrew 'https://github.com/docker-library/bashbrew/releases/download/v0.1.11/bashbrew-amd64' echo '6203635644d0efef2886f8ea9c487995a7abc4166db7a4773e94f89c943a4b04 *.bin/bashbrew' | sha256sum --strict --check - chmod +x .bin/bashbrew .bin/bashbrew --version diff --git a/Jenkinsfile.build b/Jenkinsfile.build index 269db11..066c47d 100644 --- a/Jenkinsfile.build +++ b/Jenkinsfile.build @@ -45,7 +45,8 @@ node('multiarch-' + env.BASHBREW_ARCH) { ansiColor('xterm') { fi # https://doi-janky.infosiftr.net/job/wip/job/crane - wget -O "crane$ext" "https://doi-janky.infosiftr.net/job/wip/job/crane/lastSuccessfulBuild/artifact/crane-$BASHBREW_ARCH$ext" --progress=dot:giga + # ipv6 can be extremely slow on s390x so set a timeout and have wget try the other DNS addresses instead + wget --timeout=5 -O "crane$ext" "https://doi-janky.infosiftr.net/job/wip/job/crane/lastSuccessfulBuild/artifact/crane-$BASHBREW_ARCH$ext" --progress=dot:giga # TODO checksum verification ("checksums.txt") chmod +x "crane$ext" "./crane$ext" version diff --git a/Jenkinsfile.trigger b/Jenkinsfile.trigger index 48a6b9f..2bc3294 100644 --- a/Jenkinsfile.trigger +++ b/Jenkinsfile.trigger @@ -39,7 +39,7 @@ node { pastFailedJobsJson = sh(returnStdout: true, script: '''#!/usr/bin/env bash set -Eeuo pipefail -x - if ! json="$(wget -qO- "$JOB_URL/lastSuccessfulBuild/artifact/pastFailedJobs.json")"; then + if ! json="$(wget --timeout=5 -qO- "$JOB_URL/lastSuccessfulBuild/artifact/pastFailedJobs.json")"; then echo >&2 'failed to get pastFailedJobs.json' json='{}' fi