Skip to content

Commit

Permalink
Merge pull request #182 from infosiftr/whitespace
Browse files Browse the repository at this point in the history
Fix whitespace, add pgp-happy-eyeballs, and run update.sh
  • Loading branch information
tianon authored Oct 8, 2018
2 parents 11f53c4 + 15fd775 commit 3509b94
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
14 changes: 10 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
10 changes: 5 additions & 5 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 '
Expand Down

0 comments on commit 3509b94

Please sign in to comment.