forked from jenkinsci/docker-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (31 loc) · 1.27 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
ROOT:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
IMAGE_NAME:=jenkins4eval/slave
IMAGE_NAME_AGENT:=jenkins4eval/agent
.PHONY: build
build: build-alpine build-debian build-jdk11 build-jdk11-buster
build-alpine:
docker build -t ${IMAGE_NAME}:alpine -t ${IMAGE_NAME_AGENT}:alpine --file Dockerfile-alpine .
build-debian:
docker build -t ${IMAGE_NAME}:test -t ${IMAGE_NAME_AGENT}:test --file Dockerfile .
build-jdk11:
docker build -t ${IMAGE_NAME}:jdk11 -t ${IMAGE_NAME_AGENT}:jdk11 --file Dockerfile-jdk11 .
build-jdk11-buster:
docker build -t ${IMAGE_NAME}:jdk11-buster -t ${IMAGE_NAME_AGENT}:jdk11-buster --file Dockerfile-jdk11-buster .
bats:
# The lastest version is v1.1.0
@if [ ! -d bats-core ]; then git clone https://github.com/bats-core/bats-core.git; fi
@git -C bats-core reset --hard c706d1470dd1376687776bbe985ac22d09780327
.PHONY: test
test: test-alpine test-debian test-jdk11 test-jdk11-buster
.PHONY: test-alpine
test-alpine: bats
@FLAVOR=alpine bats-core/bin/bats tests/tests.bats
.PHONY: test-debian
test-debian: bats
@bats-core/bin/bats tests/tests.bats
.PHONY: test-jdk11
test-jdk11: bats
@FLAVOR=jdk11 bats-core/bin/bats tests/tests.bats
.PHONY: test-jdk11-buster
test-jdk11-buster: bats
@FLAVOR=jdk11-buster bats-core/bin/bats tests/tests.bats