Skip to content

Commit

Permalink
Merge pull request #69 from infosiftr/slow-v6
Browse files Browse the repository at this point in the history
Add timeout to wget
  • Loading branch information
tianon authored Aug 7, 2024
2 parents 769fcca + 87ad128 commit bba9660
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion Jenkinsfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile.trigger
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bba9660

Please sign in to comment.