forked from jenkinsci/docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
87 lines (62 loc) · 2.25 KB
/
Makefile
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
75
76
77
78
79
80
81
82
83
84
85
86
87
ROOT_DIR="$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))/"
all: shellcheck build test
shellcheck:
$(ROOT_DIR)/tools/shellcheck -e SC1091 \
jenkins-support \
*.sh
build: build-debian build-alpine build-slim build-jdk11 build-centos build-openj9 build-openj9-jdk11
build-debian:
docker build --file Dockerfile .
build-alpine:
docker build --file Dockerfile-alpine .
build-slim:
docker build --file Dockerfile-slim .
build-jdk11:
docker build --file Dockerfile-jdk11 .
build-centos:
docker build --file Dockerfile-centos .
build-openj9:
docker build --file Dockerfile-openj9 .
build-openj9-jdk11:
docker build --file Dockerfile-openj9-jdk11 .
bats:
# Latest tag is unfortunately 0.4.0 which is quite older than the latest master tip.
# So we clone and reset to this well known current sha:
git clone https://github.com/sstephenson/bats.git ; \
cd bats; \
git reset --hard 03608115df2071fff4eaaff1605768c275e5f81f
prepare-test: bats
git submodule update --init --recursive
test-debian: prepare-test
DOCKERFILE=Dockerfile bats/bin/bats tests
test-alpine: prepare-test
DOCKERFILE=Dockerfile-alpine bats/bin/bats tests
test-slim: prepare-test
DOCKERFILE=Dockerfile-slim bats/bin/bats tests
test-jdk11: prepare-test
DOCKERFILE=Dockerfile-jdk11 bats/bin/bats tests
test-centos: prepare-test
DOCKERFILE=Dockerfile-centos bats/bin/bats tests
test-openj9:
DOCKERFILE=Dockerfile-openj9 bats/bin/bats tests
test-openj9-jdk11:
DOCKERFILE=Dockerfile-openj9-jdk11 bats/bin/bats tests
test: test-debian test-alpine test-slim test-jdk11 test-centos test-openj9 test-openj9-jdk11
test-install-plugins: prepare-test
DOCKERFILE=Dockerfile-alpine bats/bin/bats tests/install-plugins.bats
publish:
./publish.sh ; \
./publish.sh --variant alpine ; \
./publish.sh --variant slim ; \
./publish.sh --variant jdk11 --start-after 2.151 ; \
./publish.sh --variant centos --start-after 2.181 ;
publish-experimental:
./publish-experimental.sh ; \
./publish-experimental.sh --variant alpine ; \
./publish-experimental.sh --variant slim ; \
./publish-experimental.sh --variant openj9 ; \
./publish-experimental.sh --variant openj9-jdk11 ;
clean:
rm -rf tests/test_helper/bats-*; \
rm -rf bats
.PHONY: shellcheck