Makefile 8.03 KB
Newer Older
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
NAME_BASEIMAGE = typo3gmbh/baseimage
MAJOR_BASEIMAGE=1
MINOR_BASEIMAGE=0
PATCHLEVEL_BASEIMAGE=1
FULLVERSION_BASEIMAGE=$(MAJOR_BASEIMAGE).$(MINOR_BASEIMAGE).$(PATCHLEVEL_BASEIMAGE)
SHORTVERSION_BASEIMAGE=$(MAJOR_BASEIMAGE).$(MINOR_BASEIMAGE)

NAME_BAMBOO_PHP55 = typo3gmbh/bamboo-remote-agent-php55
MAJOR_BAMBOO_PHP55=1
MINOR_BAMBOO_PHP55=0
PATCHLEVEL_BAMBOO_PHP55=1
FULLVERSION_BAMBOO_PHP55=$(MAJOR_BAMBOO_PHP55).$(MINOR_BAMBOO_PHP55).$(PATCHLEVEL_BAMBOO_PHP55)
SHORTVERSION_BAMBOO_PHP55=$(MAJOR_BAMBOO_PHP55).$(MINOR_BAMBOO_PHP55)

NAME_BAMBOO_PHP56 = typo3gmbh/bamboo-remote-agent-php56
MAJOR_BAMBOO_PHP56=1
MINOR_BAMBOO_PHP56=0
PATCHLEVEL_BAMBOO_PHP56=1
FULLVERSION_BAMBOO_PHP56=$(MAJOR_BAMBOO_PHP56).$(MINOR_BAMBOO_PHP56).$(PATCHLEVEL_BAMBOO_PHP56)
SHORTVERSION_BAMBOO_PHP56=$(MAJOR_BAMBOO_PHP56).$(MINOR_BAMBOO_PHP56)

NAME_BAMBOO_PHP70 = typo3gmbh/bamboo-remote-agent-php70
MAJOR_BAMBOO_PHP70=1
MINOR_BAMBOO_PHP70=0
PATCHLEVEL_BAMBOO_PHP70=13
FULLVERSION_BAMBOO_PHP70=$(MAJOR_BAMBOO_PHP70).$(MINOR_BAMBOO_PHP70).$(PATCHLEVEL_BAMBOO_PHP70)
SHORTVERSION_BAMBOO_PHP70=$(MAJOR_BAMBOO_PHP70).$(MINOR_BAMBOO_PHP70)

NAME_BAMBOO_PHP71 = typo3gmbh/bamboo-remote-agent-php71
MAJOR_BAMBOO_PHP71=1
MINOR_BAMBOO_PHP71=0
PATCHLEVEL_BAMBOO_PHP71=5
FULLVERSION_BAMBOO_PHP71=$(MAJOR_BAMBOO_PHP71).$(MINOR_BAMBOO_PHP71).$(PATCHLEVEL_BAMBOO_PHP71)
SHORTVERSION_BAMBOO_PHP71=$(MAJOR_BAMBOO_PHP71).$(MINOR_BAMBOO_PHP71)


.PHONY: \
	all \
	build \
	build_baseimage \
	build_bamboo_php55 \
	build_bamboo_php56 \
	build_bamboo_php70 \
	build_bamboo_php71 \
	release \
	release_baseimage \
	release_bamboo_php55 \
	release_bamboo_php56 \
	release_bamboo_php70 \
	release_bamboo_php71 \
	clean \
	clean_baseimage \
	clean_bamboo_php55 \
	clean_bamboo_php56 \
	clean_bamboo_php70 \
	clean_bamboo_php71 \
	clean_images \
	clean_images_baseimage \
	clean_images_bamboo_php55 \
	clean_images_bamboo_php56 \
	clean_images_bamboo_php70 \
	clean_images_bamboo_php71


all: \
	build


build: \
	build_baseimage \
	build_bamboo_php55 \
	build_bamboo_php56 \
	build_bamboo_php70 \
	build_bamboo_php71


release: \
	release_baseimage \
	release_bamboo_php55 \
	release_bamboo_php56 \
	release_bamboo_php70 \
	release_bamboo_php71


clean: \
	clean_baseimage \
	clean_bamboo_php55 \
	clean_bamboo_php56 \
	clean_bamboo_php70 \
	clean_bamboo_php71


clean_images: \
	clean_images_baseimage \
	clean_images_bamboo_php55 \
	clean_images_bamboo_php56 \
	clean_images_bamboo_php70 \
	clean_images_bamboo_php71


build_baseimage:
	rm -rf build_baseimage
	cp -pR baseimage build_baseimage
	docker build -t $(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE) build_baseimage
105
	docker tag $(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE) $(NAME_BASEIMAGE):$(SHORTVERSION_BASEIMAGE)
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222

release_baseimage:
	@if ! docker images $(NAME_BASEIMAGE) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_BASEIMAGE); then \
		echo "$(NAME_BASEIMAGE) version $(FULLVERSION_BASEIMAGE) is not yet built. Please run 'make build'"; false; \
	fi
	docker tag $(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE) $(NAME_BASEIMAGE):latest
	docker push $(NAME_BASEIMAGE):latest
	docker push $(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE)
	docker push $(NAME_BASEIMAGE):$(SHORTVERSION_BASEIMAGE)

clean_baseimage:
	rm -rf build_baseimage

clean_images_baseimage:
	docker rmi $(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE) || true
	docker rmi $(NAME_BASEIMAGE):$(SHORTVERSION_BASEIMAGE) || true
	docker rmi $(NAME_BASEIMAGE):latest || true


build_bamboo_php55:
	rm -rf build_bamboo-php55
	cp -pR bamboo-remote-agent-php55 build_bamboo-php55
	echo system.imageVersion=$(FULLVERSION_BAMBOO_PHP55) >> build_bamboo-php55/config/bamboo/bamboo-capabilities.properties
	docker build -t $(NAME_BAMBOO_PHP55):$(FULLVERSION_BAMBOO_PHP55) build_bamboo-php55

release_bamboo_php55:
	@if ! docker images $(NAME_BAMBOO_PHP55) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_BAMBOO_PHP55); then \
		echo "$(NAME_BAMBOO_PHP55) version $(FULLVERSION_BAMBOO_PHP55) is not yet built. Please run 'make build'"; false; \
	fi
	docker tag $(NAME_BAMBOO_PHP55):$(FULLVERSION_BAMBOO_PHP55) $(NAME_BAMBOO_PHP55):$(SHORTVERSION_BAMBOO_PHP55)
	docker tag $(NAME_BAMBOO_PHP55):$(FULLVERSION_BAMBOO_PHP55) $(NAME_BAMBOO_PHP55):latest
	docker push $(NAME_BAMBOO_PHP55):latest
	docker push $(NAME_BAMBOO_PHP55):$(FULLVERSION_BAMBOO_PHP55)
	docker push $(NAME_BAMBOO_PHP55):$(SHORTVERSION_BAMBOO_PHP55)

clean_bamboo_php55:
	rm -rf build_bamboo-php55

clean_images_bamboo_php55:
	docker rmi $(NAME_BAMBOO_PHP55):latest || true
	docker rmi $(NAME_BAMBOO_PHP55):$(SHORTVERSION_BAMBOO_PHP55) || true
	docker rmi $(NAME_BAMBOO_PHP55):$(FULLVERSION_BAMBOO_PHP55) || true


build_bamboo_php56:
	rm -rf build_bamboo-php56
	cp -pR bamboo-remote-agent-php56 build_bamboo-php56
	echo system.imageVersion=$(FULLVERSION_BAMBOO_PHP56) >> build_bamboo-php56/config/bamboo/bamboo-capabilities.properties
	docker build -t $(NAME_BAMBOO_PHP56):$(FULLVERSION_BAMBOO_PHP56) build_bamboo-php56

release_bamboo_php56:
	@if ! docker images $(NAME_BAMBOO_PHP56) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_BAMBOO_PHP56); then \
		echo "$(NAME_BAMBOO_PHP56) version $(FULLVERSION_BAMBOO_PHP56) is not yet built. Please run 'make build'"; false; \
	fi
	docker tag $(NAME_BAMBOO_PHP56):$(FULLVERSION_BAMBOO_PHP56) $(NAME_BAMBOO_PHP56):$(SHORTVERSION_BAMBOO_PHP56)
	docker tag $(NAME_BAMBOO_PHP56):$(FULLVERSION_BAMBOO_PHP56) $(NAME_BAMBOO_PHP56):latest
	docker push $(NAME_BAMBOO_PHP56):latest
	docker push $(NAME_BAMBOO_PHP56):$(FULLVERSION_BAMBOO_PHP56)
	docker push $(NAME_BAMBOO_PHP56):$(SHORTVERSION_BAMBOO_PHP56)

clean_bamboo_php56:
	rm -rf build_bamboo-php56

clean_images_bamboo_php56:
	docker rmi $(NAME_BAMBOO_PHP56):latest || true
	docker rmi $(NAME_BAMBOO_PHP56):$(SHORTVERSION_BAMBOO_PHP56) || true
	docker rmi $(NAME_BAMBOO_PHP56):$(FULLVERSION_BAMBOO_PHP56) || true


build_bamboo_php70:
	rm -rf build_bamboo-php70
	cp -pR bamboo-remote-agent-php70 build_bamboo-php70
	echo system.imageVersion=$(FULLVERSION_BAMBOO_PHP70) >> build_bamboo-php70/config/bamboo/bamboo-capabilities.properties
	docker build -t $(NAME_BAMBOO_PHP70):$(FULLVERSION_BAMBOO_PHP70) build_bamboo-php70

release_bamboo_php70:
	@if ! docker images $(NAME_BAMBOO_PHP70) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_BAMBOO_PHP70); then \
		echo "$(NAME_BAMBOO_PHP70) version $(FULLVERSION_BAMBOO_PHP70) is not yet built. Please run 'make build'"; false; \
	fi
	docker tag $(NAME_BAMBOO_PHP70):$(FULLVERSION_BAMBOO_PHP70) $(NAME_BAMBOO_PHP70):$(SHORTVERSION_BAMBOO_PHP70)
	docker tag $(NAME_BAMBOO_PHP70):$(FULLVERSION_BAMBOO_PHP70) $(NAME_BAMBOO_PHP70):latest
	docker push $(NAME_BAMBOO_PHP70):latest
	docker push $(NAME_BAMBOO_PHP70):$(FULLVERSION_BAMBOO_PHP70)
	docker push $(NAME_BAMBOO_PHP70):$(SHORTVERSION_BAMBOO_PHP70)

clean_bamboo_php70:
	rm -rf build_bamboo-php70

clean_images_bamboo_php70:
	docker rmi $(NAME_BAMBOO_PHP70):latest || true
	docker rmi $(NAME_BAMBOO_PHP70):$(SHORTVERSION_BAMBOO_PHP70) || true
	docker rmi $(NAME_BAMBOO_PHP70):$(FULLVERSION_BAMBOO_PHP70) || true


build_bamboo_php71:
	rm -rf build_bamboo-php71
	cp -pR bamboo-remote-agent-php71 build_bamboo-php71
	echo system.imageVersion=$(FULLVERSION_BAMBOO_PHP71) >> build_bamboo-php71/config/bamboo/bamboo-capabilities.properties
	docker build -t $(NAME_BAMBOO_PHP71):$(FULLVERSION_BAMBOO_PHP71) build_bamboo-php71

release_bamboo_php71:
	@if ! docker images $(NAME_BAMBOO_PHP71) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_BAMBOO_PHP71); then \
		echo "$(NAME_BAMBOO_PHP71) version $(FULLVERSION_BAMBOO_PHP71) is not yet built. Please run 'make build'"; false; \
	fi
	docker tag $(NAME_BAMBOO_PHP71):$(FULLVERSION_BAMBOO_PHP71) $(NAME_BAMBOO_PHP71):$(SHORTVERSION_BAMBOO_PHP71)
	docker tag $(NAME_BAMBOO_PHP71):$(FULLVERSION_BAMBOO_PHP71) $(NAME_BAMBOO_PHP71):latest
	docker push $(NAME_BAMBOO_PHP71):latest
	docker push $(NAME_BAMBOO_PHP71):$(FULLVERSION_BAMBOO_PHP71)
	docker push $(NAME_BAMBOO_PHP71):$(SHORTVERSION_BAMBOO_PHP71)

clean_bamboo_php71:
	rm -rf build_bamboo-php71

clean_images_bamboo_php71:
	docker rmi $(NAME_BAMBOO_PHP71):latest || true
	docker rmi $(NAME_BAMBOO_PHP71):$(SHORTVERSION_BAMBOO_PHP71) || true
	docker rmi $(NAME_BAMBOO_PHP71):$(FULLVERSION_BAMBOO_PHP71) || true