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

add all supported image versions to .travis.yml #28

Merged
merged 3 commits into from
Aug 18, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
44 changes: 22 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,30 @@ language: bash
dist: trusty

env:
- VERSION=10.0-jdk11
- VERSION=10.0-jdk11-slim
- VERSION=10.0-jdk14
- VERSION=10.0-jdk14-slim
- VERSION=10.0-jre11
- VERSION=10.0-jre11-slim
- VERSION=11.0-jdk11
- VERSION=11.0-jdk11-slim
- VERSION=11.0-jdk14
- VERSION=11.0-jdk14-slim
- VERSION=11.0-jre11
- VERSION=11.0-jre11-slim
- VERSION=9.2-jre8
- VERSION=9.3-jre8
- VERSION=9.4-jdk11
- VERSION=9.4-jdk11-slim
- VERSION=9.4-jdk14
- VERSION=9.4-jdk14-slim
- VERSION=9.4-jdk8
- VERSION=9.4-jdk8-slim
- VERSION=9.4-jre11
- VERSION=9.4-jre11-slim
- VERSION=9.4-jre8
- VERSION=11.0-jre11
- VERSION=11.0-jdk14-slim
- VERSION=11.0-jdk14
- VERSION=11.0-jdk11-slim
- VERSION=11.0-jdk11
- VERSION=10.0-jre11-slim
- VERSION=10.0-jre11
- VERSION=10.0-jdk14-slim
- VERSION=10.0-jdk14
- VERSION=10.0-jdk11-slim
- VERSION=10.0-jdk11
- VERSION=9.4-jre8-slim
gregw marked this conversation as resolved.
Show resolved Hide resolved
- VERSION=9.4-jre8
- VERSION=9.4-jre11-slim
- VERSION=9.4-jre11
- VERSION=9.4-jdk8-slim
- VERSION=9.4-jdk8
- VERSION=9.4-jdk14-slim
- VERSION=9.4-jdk14
- VERSION=9.4-jdk11-slim
- VERSION=9.4-jdk11
- VERSION=9.3-jre8
- VERSION=9.2-jre8

install:
- git clone https://github.com/docker-library/official-images.git ~/official-images
Expand Down
27 changes: 27 additions & 0 deletions generateTravis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

# Generate Travis CI Build Directories
buildDirs=( $(ls | egrep '^[0-9]' | sort -nr) )

cat <<-EOH
---
language: bash

dist: trusty

env:
`printf ' - VERSION=%s\n' "${buildDirs[@]}"`

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}"
- image="jetty:\${VERSION}"

script:
- docker build --pull -t "\$image" .
- ~/official-images/test/run.sh "\$image"
EOH
lachlan-roberts marked this conversation as resolved.
Show resolved Hide resolved
11 changes: 9 additions & 2 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,19 @@ greaterThanOrEqualTo9.4 ()
fi
}

# Update the Travis CI Build Directories
if ! command -v ./generateTravis.sh >/dev/null 2>&1 ; then
echo "WARNING: Run update script from the jetty.docker project directory to update the Travis CI file."
else
./generateTravis.sh > .travis.yml
fi

# Update the docker files and scripts for every directory in paths.
paths=( "$@" )
if [ ${#paths[@]} -eq 0 ]; then
paths=( */ )
paths=( $(ls | egrep '^[0-9]' | sort -nr) )
fi
paths=( "${paths[@]%/}" )
paths=($(echo "${paths[@]}" | grep '^[0-9]'))

MAVEN_METADATA_URL='https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-distribution/maven-metadata.xml'
available=( $( curl -sSL "$MAVEN_METADATA_URL" | grep -Eo '<(version)>[^<]*</\1>' | awk -F'[<>]' '{ print $3 }' | sort -Vr ) )
Expand Down