Skip to content

Commit d4b45f5

Browse files
committed
Auto merge of #1152 - palfrey:retry-curl, r=alexcrichton
Retry all curl operations As the docker pulls from #1148 appear mostly fixed, but we're seeing occasional curl timeouts still (e.g. https://travis-ci.org/rust-lang/libc/jobs/459715534, https://travis-ci.org/rust-lang/libc/jobs/459611627), so this should improve things at least a bit.
2 parents 5058225 + b46b6e2 commit d4b45f5

File tree

13 files changed

+22
-22
lines changed

13 files changed

+22
-22
lines changed

ci/android-install-ndk.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
set -ex
1313

14-
curl -O https://dl.google.com/android/repository/android-ndk-r15b-linux-x86_64.zip
14+
curl --retry 5 -O https://dl.google.com/android/repository/android-ndk-r15b-linux-x86_64.zip
1515
unzip -q android-ndk-r15b-linux-x86_64.zip
1616

1717
case "$1" in

ci/android-install-sdk.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ set -ex
1919
# which apparently magically accepts the licenses.
2020

2121
mkdir sdk
22-
curl https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip -O
22+
curl --retry 5 https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip -O
2323
unzip -d sdk sdk-tools-linux-3859397.zip
2424

2525
case "$1" in

ci/android-sysimage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ main() {
2424
apt-get install --no-install-recommends e2tools
2525

2626
pushd "${td}"
27-
curl -O "${URL}/${name}"
27+
curl --retry 5 -O "${URL}/${name}"
2828
unzip -q "${name}"
2929

3030
local system

ci/docker/aarch64-unknown-linux-musl/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM ubuntu:17.10
33
RUN apt-get update && apt-get install -y --no-install-recommends \
44
gcc make libc6-dev git curl ca-certificates \
55
gcc-aarch64-linux-gnu qemu-user
6-
RUN curl https://www.musl-libc.org/releases/musl-1.1.19.tar.gz | \
6+
RUN curl --retry 5 https://www.musl-libc.org/releases/musl-1.1.19.tar.gz | \
77
tar xzf - && \
88
cd musl-1.1.19 && \
99
CC=aarch64-linux-gnu-gcc \
@@ -12,7 +12,7 @@ RUN curl https://www.musl-libc.org/releases/musl-1.1.19.tar.gz | \
1212
cd .. && \
1313
rm -rf musl-1.1.19
1414
# Install linux kernel headers sanitized for use with musl
15-
RUN curl -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-6.tar.gz | \
15+
RUN curl --retry 5 -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-6.tar.gz | \
1616
tar xzf - && \
1717
cd kernel-headers-3.12.6-6 && \
1818
make ARCH=arm64 prefix=/musl-aarch64 install -j4 && \

ci/docker/arm-unknown-linux-musleabihf/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
44
gcc make libc6-dev git curl ca-certificates \
55
gcc-arm-linux-gnueabihf qemu-user
66

7-
RUN curl https://www.musl-libc.org/releases/musl-1.1.19.tar.gz | tar xzf -
7+
RUN curl --retry 5 https://www.musl-libc.org/releases/musl-1.1.19.tar.gz | tar xzf -
88
WORKDIR /musl-1.1.19
99
RUN CC=arm-linux-gnueabihf-gcc \
1010
CFLAGS="-march=armv6 -marm" \
1111
./configure --prefix=/musl-arm --enable-wrapper=yes
1212
RUN make install -j4
1313

1414
# Install linux kernel headers sanitized for use with musl
15-
RUN curl -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-6.tar.gz | \
15+
RUN curl --retry 5 -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-6.tar.gz | \
1616
tar xzf - && \
1717
cd kernel-headers-3.12.6-6 && \
1818
make ARCH=arm prefix=/musl-arm install -j4 && \

ci/docker/i686-unknown-linux-musl/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ RUN apt-get install -y --no-install-recommends \
1212
# since otherwise the script will fail to find a compiler.
1313
# * We manually unset CROSS_COMPILE when running make; otherwise the makefile
1414
# will call the non-existent binary 'i686-ar'.
15-
RUN curl https://www.musl-libc.org/releases/musl-1.1.19.tar.gz | \
15+
RUN curl --retry 5 https://www.musl-libc.org/releases/musl-1.1.19.tar.gz | \
1616
tar xzf - && \
1717
cd musl-1.1.19 && \
1818
CC=gcc CFLAGS=-m32 ./configure --prefix=/musl-i686 --disable-shared --target=i686 && \
1919
make CROSS_COMPILE= install -j4 && \
2020
cd .. && \
2121
rm -rf musl-1.1.19
2222
# Install linux kernel headers sanitized for use with musl
23-
RUN curl -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-6.tar.gz | \
23+
RUN curl --retry 5 -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-6.tar.gz | \
2424
tar xzf - && \
2525
cd kernel-headers-3.12.6-6 && \
2626
make ARCH=i386 prefix=/musl-i686 install -j4 && \

ci/docker/mips-unknown-linux-musl/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ RUN mkdir /toolchain
88

99
# Note that this originally came from:
1010
# https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/OpenWrt-SDK-ar71xx-generic_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2
11-
RUN curl -L https://s3-us-west-1.amazonaws.com/rust-lang-ci2/libc/OpenWrt-SDK-ar71xx-generic_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \
11+
RUN curl --retry 5 -L https://s3-us-west-1.amazonaws.com/rust-lang-ci2/libc/OpenWrt-SDK-ar71xx-generic_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \
1212
tar xjf - -C /toolchain --strip-components=1
1313

1414
ENV PATH=$PATH:/rust/bin:/toolchain/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.15/bin \

ci/docker/mipsel-unknown-linux-musl/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ RUN mkdir /toolchain
88

99
# Note that this originally came from:
1010
# https://downloads.openwrt.org/snapshots/trunk/malta/generic/OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2
11-
RUN curl -L https://s3-us-west-1.amazonaws.com/rust-lang-ci2/libc/OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \
11+
RUN curl --retry 5 -L https://s3-us-west-1.amazonaws.com/rust-lang-ci2/libc/OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \
1212
tar xjf - -C /toolchain --strip-components=2
1313

1414
ENV PATH=$PATH:/rust/bin:/toolchain/bin \

ci/docker/x86_64-unknown-linux-musl/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ FROM ubuntu:17.10
33
RUN apt-get update
44
RUN apt-get install -y --no-install-recommends \
55
gcc make libc6-dev git curl ca-certificates
6-
RUN curl https://www.musl-libc.org/releases/musl-1.1.19.tar.gz | \
6+
RUN curl --retry 5 https://www.musl-libc.org/releases/musl-1.1.19.tar.gz | \
77
tar xzf - && \
88
cd musl-1.1.19 && \
99
./configure --prefix=/musl-x86_64 && \
1010
make install -j4 && \
1111
cd .. && \
1212
rm -rf musl-1.1.19
1313
# Install linux kernel headers sanitized for use with musl
14-
RUN curl -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-6.tar.gz | \
14+
RUN curl --retry 5 -L https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-6.tar.gz | \
1515
tar xzf - && \
1616
cd kernel-headers-3.12.6-6 && \
1717
make ARCH=x86_64 prefix=/musl-x86_64 install -j4 && \

ci/emscripten.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ exit 1
2929
}
3030

3131
cd /
32-
curl -L https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz | \
32+
curl --retry 5 -L https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz | \
3333
tar -xz
3434

3535
cd /emsdk-portable
@@ -51,6 +51,6 @@ chmod a+rxw -R /emsdk-portable
5151

5252
# node 8 is required to run wasm
5353
cd /
54-
curl -L https://nodejs.org/dist/v8.0.0/node-v8.0.0-linux-x64.tar.xz | \
54+
curl --retry 5 -L https://nodejs.org/dist/v8.0.0/node-v8.0.0-linux-x64.tar.xz | \
5555
tar -xJ
5656

ci/linux-s390x.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ set -ex
55
mkdir -m 777 /qemu
66
cd /qemu
77

8-
curl -LO https://github.com/qemu/qemu/raw/master/pc-bios/s390-ccw.img
9-
curl -LO http://ftp.debian.org/debian/dists/testing/main/installer-s390x/20170828/images/generic/kernel.debian
10-
curl -LO http://ftp.debian.org/debian/dists/testing/main/installer-s390x/20170828/images/generic/initrd.debian
8+
curl --retry 5 -LO https://github.com/qemu/qemu/raw/master/pc-bios/s390-ccw.img
9+
curl --retry 5 -LO http://ftp.debian.org/debian/dists/testing/main/installer-s390x/20170828/images/generic/kernel.debian
10+
curl --retry 5 -LO http://ftp.debian.org/debian/dists/testing/main/installer-s390x/20170828/images/generic/initrd.debian
1111

1212
mv kernel.debian kernel
1313
mv initrd.debian initrd.gz

ci/linux-sparc64.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -ex
55
mkdir -m 777 /qemu
66
cd /qemu
77

8-
curl -LO https://cdimage.debian.org/cdimage/ports/9.0/sparc64/iso-cd/debian-9.0-sparc64-NETINST-1.iso
8+
curl --retry 5 -LO https://cdimage.debian.org/cdimage/ports/9.0/sparc64/iso-cd/debian-9.0-sparc64-NETINST-1.iso
99
7z e debian-9.0-sparc64-NETINST-1.iso boot/initrd.gz
1010
7z e debian-9.0-sparc64-NETINST-1.iso boot/sparc64
1111
mv sparc64 kernel

ci/run.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,21 @@ if [ "$QEMU" != "" ]; then
2121
# image is .gz : download and uncompress it
2222
qemufile="$(echo "${QEMU%.gz}" | sed 's/\//__/g')"
2323
if [ ! -f "${tmpdir}/${qemufile}" ]; then
24-
curl "https://s3-us-west-1.amazonaws.com/rust-lang-ci2/libc/${QEMU}" | \
24+
curl --retry 5 "https://s3-us-west-1.amazonaws.com/rust-lang-ci2/libc/${QEMU}" | \
2525
gunzip -d > "${tmpdir}/${qemufile}"
2626
fi
2727
elif [ -z "${QEMU#*.xz}" ]; then
2828
# image is .xz : download and uncompress it
2929
qemufile="$(echo "${QEMU%.xz}" | sed 's/\//__/g')"
3030
if [ ! -f "${tmpdir}/${qemufile}" ]; then
31-
curl "https://s3-us-west-1.amazonaws.com/rust-lang-ci2/libc/${QEMU}" | \
31+
curl --retry 5 "https://s3-us-west-1.amazonaws.com/rust-lang-ci2/libc/${QEMU}" | \
3232
unxz > "${tmpdir}/${qemufile}"
3333
fi
3434
else
3535
# plain qcow2 image: just download it
3636
qemufile="$(echo "${QEMU}" | sed 's/\//__/g')"
3737
if [ ! -f "${tmpdir}/${qemufile}" ]; then
38-
curl "https://s3-us-west-1.amazonaws.com/rust-lang-ci2/libc/${QEMU}" \
38+
curl --retry 5 "https://s3-us-west-1.amazonaws.com/rust-lang-ci2/libc/${QEMU}" \
3939
> "${tmpdir}/${qemufile}"
4040
fi
4141
fi

0 commit comments

Comments
 (0)