forked from tiandeyu/jenkins-arm64
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
72 lines (52 loc) · 1.83 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
ROOT_DIR="$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))/"
all: shellcheck build test
shellcheck:
# TODO: remove SC1117 exclusion when on shellcheck > 0.5.0
$(ROOT_DIR)/tools/shellcheck -e SC1091 \
-e SC1117 \
jenkins-support \
*.sh
build: build-debian build-alpine build-slim build-jdk11 build-centos
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 .
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: test-debian test-alpine test-slim test-jdk11 test-centos
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 ;
clean:
rm -rf tests/test_helper/bats-*; \
rm -rf bats
.PHONY: shellcheck