-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
85 lines (68 loc) · 1.35 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
PHONY :=
BUILD_EXTRA_ARGS :=
REPOSITORY = ghcr.io/city-of-helsinki/drupal-docker-base
PHONY += help
help:
@echo -e "See README.md for usage"
###########
# all #
###########
PHONY += all
all: push-php-dev push-php
###########
# php-dev #
###########
PHONY += push-php-dev
push-php-dev: push-php83-dev push-php84-dev
PHONY += test-php-dev
test-php-dev: test-php83-dev test-php84-dev
#######
# php #
#######
PHONY += test-php
test-php: test-php83 test-php84
PHONY += push-php
push-php: push-php83 push-php84
###########
# 8.3-dev #
###########
PHONY += test-php83-dev
test-php83-dev:
$(call run_tests,php83-dev)
PHONY += push-php83-dev
push-php83-dev:
$(call build_image,php83-dev)
#######
# 8.3 #
#######
PHONY += test-php83
test-php83:
$(call run_tests,php83)
PHONY += push-php83
push-php83: test-php83
$(call build_image,php83)
###########
# 8.4-dev #
###########
PHONY += test-php84-dev
test-php84-dev:
$(call run_tests,php84-dev)
PHONY += push-php84-dev
push-php84-dev: test-php84-dev
$(call build_image,php84-dev)
#######
# 8.4 #
#######
PHONY += test-php84
test-php84:
$(call run_tests,php84)
PHONY += push-php84
push-php84: test-php84
$(call build_image,php84)
define run_tests
docker buildx bake test $(1) test
endef
define build_image
docker buildx bake $(BUILD_EXTRA_ARGS) --no-cache --pull --push -f docker-bake.hcl $(1)
endef
.PHONY: $(PHONY)