forked from docker-library/openjdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
74 lines (68 loc) · 2.03 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
language: bash
services: docker
matrix:
include:
- os: linux
env: VERSION=13 VARIANT=oracle
- os: linux
env: VERSION=13 VARIANT=alpine
- os: windows
dist: 1803-containers
env: VERSION=13 VARIANT=windows/windowsservercore-1803
- os: linux
env: VERSION=12 VARIANT=oracle
- os: windows
dist: 1803-containers
env: VERSION=12 VARIANT=windows/windowsservercore-1803
- os: linux
env: VERSION=11
- os: linux
env: VERSION=11 VARIANT=slim
- os: linux
env: VERSION=8
- os: linux
env: VERSION=8 VARIANT=slim
- os: linux
env: VERSION=8 VARIANT=alpine
- os: windows
dist: 1803-containers
env: VERSION=8 VARIANT=windows/windowsservercore-1803
- os: linux
env: VERSION=7
- os: linux
env: VERSION=7 VARIANT=slim
- os: linux
env: VERSION=7 VARIANT=alpine
install:
- git clone https://github.com/docker-library/official-images.git ~/official-images
before_script:
- env | sort
- cd "$VERSION"
- imageBase="openjdk:$VERSION"
- imageSuffix="${VARIANT:+-$(basename "$VARIANT")}"
script:
- |
(
set -Eeuo pipefail
set -x
docker build -t "$imageBase-jdk$imageSuffix" "jdk${VARIANT:+/$VARIANT}"
if [ "$TRAVIS_OS_NAME" = 'windows' ]; then
# TODO make the tests run successfully on Windows too!
docker run --rm "$imageBase-jdk$imageSuffix" javac -version
docker run --rm "$imageBase-jdk$imageSuffix" java -version
else
~/official-images/test/run.sh "$imageBase-jdk$imageSuffix"
fi
if [ -d "jre${VARIANT:+/$VARIANT}" ]; then
docker build -t "$imageBase-jre$imageSuffix" "jre${VARIANT:+/$VARIANT}"
if [ "$TRAVIS_OS_NAME" = 'windows' ]; then
# TODO make the tests run successfully on Windows too!
docker run --rm "$imageBase-jre$imageSuffix" java -version
else
~/official-images/test/run.sh "$imageBase-jre$imageSuffix"
fi
fi
)
after_script:
- docker images
# vim:set et ts=2 sw=2: