From 15fd775e08b05592794a1070df1d0d26a8052328 Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Fri, 5 Oct 2018 13:05:55 -0700 Subject: [PATCH] Fix whitespace, add pgp-happy-eyeballs, and run update.sh --- .travis.yml | 14 ++++++++++---- update.sh | 10 +++++----- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7fb0d71..a457270 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,9 @@ language: bash services: docker env: - - VERSION=6 VARIANT= - VERSION=6.4.1 VARIANT= - VERSION=6.4.0 VARIANT= + - VERSION=6 VARIANT= - VERSION=5 VARIANT= - VERSION=5 VARIANT=alpine @@ -15,12 +15,18 @@ install: before_script: - env | sort - - cd "$VERSION" + - wget -qO- 'https://github.com/tianon/pgp-happy-eyeballs/raw/master/hack-my-builds.sh' | bash + - cd "$VERSION/$VARIANT" - image="elasticsearch:${VERSION}${VARIANT:+-$VARIANT}" script: - - travis_retry docker build -t "$image" "${VARIANT:-.}" - - ~/official-images/test/run.sh "$image" + - | + ( + set -Eeuo pipefail + set -x + docker build -t "$image" . + ~/official-images/test/run.sh "$image" + ) after_script: - docker images diff --git a/update.sh b/update.sh index bb8cebf..7ec6f96 100755 --- a/update.sh +++ b/update.sh @@ -41,11 +41,11 @@ for version in "${versions[@]}"; do # Parse image manifest for sha authToken="$(curl -fsSL 'https://docker-auth.elastic.co/auth?service=token-service&scope=repository:elasticsearch/elasticsearch:pull' | jq -r .token)" - digest="$(curl --head -fsSL -H 'Accept: application/vnd.docker.distribution.manifest.v2+json' -H "Authorization: Bearer $authToken" "https://docker.elastic.co/v2/elasticsearch/elasticsearch/manifests/$plainVersion" | tr -d '\r' | gawk -F ':[[:space:]]+' '$1 == "Docker-Content-Digest" { print $2 }')" - - # Format image reference (image@sha) - upstreamImageDigest="$upstreamImage@$digest" - + digest="$(curl --head -fsSL -H 'Accept: application/vnd.docker.distribution.manifest.v2+json' -H "Authorization: Bearer $authToken" "https://docker.elastic.co/v2/elasticsearch/elasticsearch/manifests/$plainVersion" | tr -d '\r' | gawk -F ':[[:space:]]+' '$1 == "Docker-Content-Digest" { print $2 }')" + + # Format image reference (image@sha) + upstreamImageDigest="$upstreamImage@$digest" + ( set -x sed '