Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix whitespace, add pgp-happy-eyeballs, and run update.sh #182

Merged
merged 1 commit into from
Oct 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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