language: bash
services: docker

env:
  - VERSION=0-rc VARIANT=stretch ARCH=
  - VERSION=0-rc VARIANT=stretch ARCH=i386
  - VERSION=0 VARIANT=stretch ARCH=
  - VERSION=0 VARIANT=stretch ARCH=i386
  - VERSION=0 VARIANT=jessie ARCH=
  - VERSION=0 VARIANT=jessie ARCH=i386

install:
  - git clone https://github.com/docker-library/official-images.git ~/official-images

before_script:
  - env | sort
  - cd "$VERSION/$VARIANT"
  - image="julia:$VARIANT"
  - |
    if [ -n "$ARCH" ]; then
        from="$(awk '$1 == toupper("FROM") { print $2 }' Dockerfile)"
        docker pull "$ARCH/$from"
        docker tag "$ARCH/$from" "$from"
    fi

script:
  - travis_retry docker build -t "$image" .
  - ~/official-images/test/run.sh "$image"

after_script:
  - docker images

# vim:set et ts=2 sw=2:

language: bash
services: docker

env:
  - VERSION=0-rc VARIANT=stretch ARCH=
  - VERSION=0-rc VARIANT=stretch ARCH=i386
  - VERSION=0 VARIANT=stretch ARCH=
  - VERSION=0 VARIANT=stretch ARCH=i386
  - VERSION=0 VARIANT=jessie ARCH=
  - VERSION=0 VARIANT=jessie ARCH=i386

install:
  - git clone https://github.com/docker-library/official-images.git ~/official-images

before_script:
  - env | sort
  - wget -qO- 'https://github.com/tianon/pgp-happy-eyeballs/raw/master/hack-my-builds.sh' | bash
  - cd "$VERSION/$VARIANT"
  - image="julia:$VARIANT"
  - |
    if [ -n "$ARCH" ]; then
        from="$(awk '$1 == toupper("FROM") { print $2 }' Dockerfile)"
        docker pull "$ARCH/$from"
        docker tag "$ARCH/$from" "$from"
    fi

script:
  - |
    (
      set -Eeuo pipefail
      set -x
      docker build -t "$image" .
      ~/official-images/test/run.sh "$image"
    )

after_script:
  - docker images

# vim:set et ts=2 sw=2:

Add "pgp-happy-eyeballs" in Travis to help cut down on gpg-related issues
Add "pgp-happy-eyeballs" in Travis to help cut down on gpg-related issues
