mirror of https://github.com/zulip/zulip.git
scripts: Pass --retry 3 to curl.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
c2cbc57bc4
commit
fc9f23a85f
|
@ -8,7 +8,7 @@ tmpdir="$(mktemp -d)"
|
|||
trap 'rm -r "$tmpdir"' EXIT
|
||||
cd "$tmpdir"
|
||||
tarball="pgroonga-$version.tar.gz"
|
||||
curl -fLO "https://packages.groonga.org/source/pgroonga/$tarball"
|
||||
curl -fLO --retry 3 "https://packages.groonga.org/source/pgroonga/$tarball"
|
||||
sha256sum -c <<<"$sha256 $tarball"
|
||||
tar -xzf "$tarball"
|
||||
cd "pgroonga-$version"
|
||||
|
|
|
@ -24,7 +24,7 @@ if ! check_version 2>/dev/null; then
|
|||
tmpdir="$(mktemp -d)"
|
||||
trap 'rm -r "$tmpdir"' EXIT
|
||||
cd "$tmpdir"
|
||||
curl_opts=(-fLO)
|
||||
curl_opts=(-fLO --retry 3)
|
||||
if [ -n "${CUSTOM_CA_CERTIFICATES:-}" ]; then
|
||||
curl_opts+=(--cacert "${CUSTOM_CA_CERTIFICATES}")
|
||||
fi
|
||||
|
|
|
@ -18,7 +18,7 @@ if ! check_version; then
|
|||
tmpdir="$(mktemp -d)"
|
||||
trap 'rm -r "$tmpdir"' EXIT
|
||||
cd "$tmpdir"
|
||||
curl -fLO "https://registry.npmjs.org/yarn/-/$tarball"
|
||||
curl -fLO --retry 3 "https://registry.npmjs.org/yarn/-/$tarball"
|
||||
sha256sum -c <<<"$sha256 $tarball"
|
||||
rm -rf /srv/zulip-yarn
|
||||
mkdir /srv/zulip-yarn
|
||||
|
|
|
@ -26,8 +26,8 @@ if [[ ! -e /usr/share/doc/groonga-apt-source/copyright ]]; then
|
|||
} <<<"$os_info"
|
||||
groonga_apt_source_deb="groonga-apt-source-latest-$release.deb"
|
||||
groonga_apt_source_deb_sign="$groonga_apt_source_deb.asc.$pgroonga_apt_sign_key_fingerprint"
|
||||
curl -fLO "https://packages.groonga.org/$distribution/$groonga_apt_source_deb"
|
||||
curl -fLO "https://packages.groonga.org/$distribution/$groonga_apt_source_deb_sign"
|
||||
curl -fLO --retry 3 "https://packages.groonga.org/$distribution/$groonga_apt_source_deb"
|
||||
curl -fLO --retry 3 "https://packages.groonga.org/$distribution/$groonga_apt_source_deb_sign"
|
||||
gpg \
|
||||
--homedir="$tmp_gpg_home" \
|
||||
--verify \
|
||||
|
|
|
@ -25,7 +25,7 @@ cd "$tmpdir"
|
|||
|
||||
# Fetch to a predictable name, not whatever curl guesses from the URL
|
||||
LOCALFILE="archive.tar.gz"
|
||||
curl -fL -o "$LOCALFILE" "$URL"
|
||||
curl -fL --retry 3 -o "$LOCALFILE" "$URL"
|
||||
|
||||
# Check the hash against what was passed in
|
||||
echo "$SHA256 $LOCALFILE" >"$LOCALFILE.sha256"
|
||||
|
|
|
@ -12,7 +12,7 @@ FROM $BASE_IMAGE
|
|||
# Download the release tarball, start rabbitmq server and install the server
|
||||
ARG VERSION
|
||||
RUN cd $(mktemp -d) \
|
||||
&& curl -fLO "https://download.zulip.com/server/zulip-server-$VERSION.tar.gz" \
|
||||
&& curl -fLO --retry 3 "https://download.zulip.com/server/zulip-server-$VERSION.tar.gz" \
|
||||
&& tar -xf "zulip-server-$VERSION.tar.gz" \
|
||||
# Version 3.4 predates ddb9d16132a6336b384bf674c4c950cd75d83e5c and 9d57fa97597ec176a8357d6620ab9e670ee19f4e
|
||||
&& perl -pi -e 's/pgrep -f epmd/which pgrep && pgrep -x epmd/' zulip-server-$VERSION/puppet/zulip/manifests/rabbit.pp \
|
||||
|
|
|
@ -91,7 +91,7 @@ fi
|
|||
# seems to require authentication even for simple lookups of public data,
|
||||
# and that'd be a pain for a simple script like this.
|
||||
pr_url=https://api.github.com/repos/"${repo_fq}"/pulls/"${pr_id}"
|
||||
pr_details="$(curl -fLsS "$pr_url")"
|
||||
pr_details="$(curl -fLsS --retry 3 "$pr_url")"
|
||||
|
||||
pr_jq() {
|
||||
echo "$pr_details" | jq "$@"
|
||||
|
|
|
@ -19,7 +19,7 @@ if [ ! -d "/srv/zulip-aws-tools/v2/$AWS_CLI_VERSION" ]; then
|
|||
(
|
||||
cd /srv/zulip-aws-tools || exit 1
|
||||
rm -rf awscli.zip awscli.zip.sha256 aws/
|
||||
curl -fL "https://awscli.amazonaws.com/awscli-exe-linux-$ARCH-$AWS_CLI_VERSION.zip" -o awscli.zip
|
||||
curl -fL --retry 3 "https://awscli.amazonaws.com/awscli-exe-linux-$ARCH-$AWS_CLI_VERSION.zip" -o awscli.zip
|
||||
echo "$AWS_CLI_SHA awscli.zip" >awscli.zip.sha256
|
||||
sha256sum -c awscli.zip.sha256
|
||||
unzip -q awscli.zip
|
||||
|
|
|
@ -31,7 +31,7 @@ RUN \
|
|||
# managed by systemd start within Docker, which breaks normal
|
||||
# operation of systemd.
|
||||
dpkg-divert --add --rename /bin/systemctl \
|
||||
&& curl -fLsS -o /bin/systemctl 'https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/v1.5.4505/files/docker/systemctl3.py' \
|
||||
&& curl -fLsS --retry 3 -o /bin/systemctl 'https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/v1.5.4505/files/docker/systemctl3.py' \
|
||||
&& echo '93006382a98aadfd2490e521824fc870759732ff80cd012ce0dfc70d4225c803 /bin/systemctl' | sha256sum -c \
|
||||
&& chmod +x /bin/systemctl \
|
||||
&& ln -nsf /bin/true /usr/sbin/policy-rc.d \
|
||||
|
@ -42,7 +42,7 @@ RUN \
|
|||
# Set up the vagrant user and its SSH key (globally public)
|
||||
&& useradd -ms /bin/bash -u "$VAGRANT_UID" vagrant \
|
||||
&& mkdir -m 700 ~vagrant/.ssh \
|
||||
&& curl -fLsS -o ~vagrant/.ssh/authorized_keys 'https://raw.githubusercontent.com/hashicorp/vagrant/be7876d83644aa6bdf7f951592fdc681506bcbe6/keys/vagrant.pub' \
|
||||
&& curl -fLsS --retry 3 -o ~vagrant/.ssh/authorized_keys 'https://raw.githubusercontent.com/hashicorp/vagrant/be7876d83644aa6bdf7f951592fdc681506bcbe6/keys/vagrant.pub' \
|
||||
&& chown -R vagrant: ~vagrant/.ssh \
|
||||
&& echo 'vagrant ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/vagrant
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ if ! check_version 2>/dev/null; then
|
|||
tmpdir="$(mktemp -d)"
|
||||
trap 'rm -r "$tmpdir"' EXIT
|
||||
cd "$tmpdir"
|
||||
curl -fLO "https://github.com/koalaman/shellcheck/releases/download/v$version/$tarball"
|
||||
curl -fLO --retry 3 "https://github.com/koalaman/shellcheck/releases/download/v$version/$tarball"
|
||||
sha256sum -c <<<"${sha256[$arch]} $tarball"
|
||||
tar -xJf "$tarball" --no-same-owner --strip-components=1 -C /usr/local/bin "shellcheck-v$version/shellcheck"
|
||||
check_version
|
||||
|
|
|
@ -24,7 +24,7 @@ if ! check_version 2>/dev/null; then
|
|||
tmpdir="$(mktemp -d)"
|
||||
trap 'rm -r "$tmpdir"' EXIT
|
||||
cd "$tmpdir"
|
||||
curl -fLO "https://github.com/mvdan/sh/releases/download/v$version/$binary"
|
||||
curl -fLO --retry 3 "https://github.com/mvdan/sh/releases/download/v$version/$binary"
|
||||
sha256sum -c <<<"$sha256 $binary"
|
||||
chmod +x "$binary"
|
||||
mv "$binary" /usr/local/bin/shfmt
|
||||
|
|
Loading…
Reference in New Issue