Makefile 12 KB
Newer Older
1
NAME_BASEIMAGE = typo3gmbh/baseimage
2
MAJOR_BASEIMAGE=3
3
MINOR_BASEIMAGE=0
Christian Kuhn's avatar
Christian Kuhn committed
4
PATCHLEVEL_BASEIMAGE=8
5
6
7
FULLVERSION_BASEIMAGE=$(MAJOR_BASEIMAGE).$(MINOR_BASEIMAGE).$(PATCHLEVEL_BASEIMAGE)
SHORTVERSION_BASEIMAGE=$(MAJOR_BASEIMAGE).$(MINOR_BASEIMAGE)

Christian Kuhn's avatar
Christian Kuhn committed
8

9
NAME_PHP53 = typo3gmbh/php53
Christian Kuhn's avatar
Christian Kuhn committed
10
MAJOR_PHP53=3
11
MINOR_PHP53=0
Christian Kuhn's avatar
Christian Kuhn committed
12
PATCHLEVEL_PHP53=9
13
14
15
16
FULLVERSION_PHP53=$(MAJOR_PHP53).$(MINOR_PHP53).$(PATCHLEVEL_PHP53)
SHORTVERSION_PHP53=$(MAJOR_PHP53).$(MINOR_PHP53)

NAME_PHP54 = typo3gmbh/php54
Christian Kuhn's avatar
Christian Kuhn committed
17
MAJOR_PHP54=3
18
MINOR_PHP54=0
Christian Kuhn's avatar
Christian Kuhn committed
19
PATCHLEVEL_PHP54=9
20
21
22
FULLVERSION_PHP54=$(MAJOR_PHP54).$(MINOR_PHP54).$(PATCHLEVEL_PHP54)
SHORTVERSION_PHP54=$(MAJOR_PHP54).$(MINOR_PHP54)

Christian Kuhn's avatar
Christian Kuhn committed
23
NAME_PHP55 = typo3gmbh/php55
Christian Kuhn's avatar
Christian Kuhn committed
24
MAJOR_PHP55=3
25
MINOR_PHP55=0
Christian Kuhn's avatar
Christian Kuhn committed
26
PATCHLEVEL_PHP55=9
Christian Kuhn's avatar
Christian Kuhn committed
27
28
29
30
FULLVERSION_PHP55=$(MAJOR_PHP55).$(MINOR_PHP55).$(PATCHLEVEL_PHP55)
SHORTVERSION_PHP55=$(MAJOR_PHP55).$(MINOR_PHP55)

NAME_PHP56 = typo3gmbh/php56
Christian Kuhn's avatar
Christian Kuhn committed
31
MAJOR_PHP56=3
Christian Kuhn's avatar
Christian Kuhn committed
32
MINOR_PHP56=0
Christian Kuhn's avatar
Christian Kuhn committed
33
PATCHLEVEL_PHP56=8
Christian Kuhn's avatar
Christian Kuhn committed
34
35
36
37
FULLVERSION_PHP56=$(MAJOR_PHP56).$(MINOR_PHP56).$(PATCHLEVEL_PHP56)
SHORTVERSION_PHP56=$(MAJOR_PHP56).$(MINOR_PHP56)

NAME_PHP70 = typo3gmbh/php70
Christian Kuhn's avatar
Christian Kuhn committed
38
MAJOR_PHP70=3
Christian Kuhn's avatar
Christian Kuhn committed
39
MINOR_PHP70=0
Christian Kuhn's avatar
Christian Kuhn committed
40
PATCHLEVEL_PHP70=9
Christian Kuhn's avatar
Christian Kuhn committed
41
42
43
44
FULLVERSION_PHP70=$(MAJOR_PHP70).$(MINOR_PHP70).$(PATCHLEVEL_PHP70)
SHORTVERSION_PHP70=$(MAJOR_PHP70).$(MINOR_PHP70)

NAME_PHP71 = typo3gmbh/php71
Christian Kuhn's avatar
Christian Kuhn committed
45
MAJOR_PHP71=3
Christian Kuhn's avatar
Christian Kuhn committed
46
MINOR_PHP71=0
Christian Kuhn's avatar
Christian Kuhn committed
47
PATCHLEVEL_PHP71=9
Christian Kuhn's avatar
Christian Kuhn committed
48
49
50
FULLVERSION_PHP71=$(MAJOR_PHP71).$(MINOR_PHP71).$(PATCHLEVEL_PHP71)
SHORTVERSION_PHP71=$(MAJOR_PHP71).$(MINOR_PHP71)

Christian Kuhn's avatar
Christian Kuhn committed
51
NAME_PHP72 = typo3gmbh/php72
52
MAJOR_PHP72=3
Christian Kuhn's avatar
Christian Kuhn committed
53
MINOR_PHP72=0
Christian Kuhn's avatar
Christian Kuhn committed
54
PATCHLEVEL_PHP72=9
Christian Kuhn's avatar
Christian Kuhn committed
55
56
57
FULLVERSION_PHP72=$(MAJOR_PHP72).$(MINOR_PHP72).$(PATCHLEVEL_PHP72)
SHORTVERSION_PHP72=$(MAJOR_PHP72).$(MINOR_PHP72)

58
59
60
NAME_PHP73 = typo3gmbh/php73
MAJOR_PHP73=3
MINOR_PHP73=0
Christian Kuhn's avatar
Christian Kuhn committed
61
PATCHLEVEL_PHP73=4
62
63
64
FULLVERSION_PHP73=$(MAJOR_PHP73).$(MINOR_PHP73).$(PATCHLEVEL_PHP73)
SHORTVERSION_PHP73=$(MAJOR_PHP73).$(MINOR_PHP73)

Christian Kuhn's avatar
Christian Kuhn committed
65

66
67
68
NAME_BAMBOO = typo3gmbh/bamboo-remote-agent
MAJOR_BAMBOO=1
MINOR_BAMBOO=0
Christian Kuhn's avatar
Christian Kuhn committed
69
PATCHLEVEL_BAMBOO=9
70
71
FULLVERSION_BAMBOO=$(MAJOR_BAMBOO).$(MINOR_BAMBOO).$(PATCHLEVEL_BAMBOO)
SHORTVERSION_BAMBOO=$(MAJOR_BAMBOO).$(MINOR_BAMBOO)
Christian Kuhn's avatar
Christian Kuhn committed
72

73

Christian Kuhn's avatar
Christian Kuhn committed
74

75
76
77
78
.PHONY: \
	all \
	build \
	build_baseimage \
79
80
	build_php53 \
	build_php54 \
Christian Kuhn's avatar
Christian Kuhn committed
81
82
83
84
	build_php55 \
	build_php56 \
	build_php70 \
	build_php71 \
Christian Kuhn's avatar
Christian Kuhn committed
85
	build_php72 \
86
	build_php73 \
87
	build_bamboo \
88
89
	release \
	release_baseimage \
90
91
	release_php53 \
	release_php54 \
Christian Kuhn's avatar
Christian Kuhn committed
92
93
94
95
	release_php55 \
	release_php56 \
	release_php70 \
	release_php71 \
Christian Kuhn's avatar
Christian Kuhn committed
96
	release_php72 \
97
	release_php73 \
98
	release_bamboo \
99
100
	clean \
	clean_baseimage \
101
102
	clean_php53 \
	clean_php54 \
Christian Kuhn's avatar
Christian Kuhn committed
103
104
105
106
	clean_php55 \
	clean_php56 \
	clean_php70 \
	clean_php71 \
Christian Kuhn's avatar
Christian Kuhn committed
107
	clean_php72 \
108
	clean_php73 \
109
	clean_bamboo \
110
111
	clean_images \
	clean_images_baseimage \
112
113
	clean_images_php53 \
	clean_images_php54 \
Christian Kuhn's avatar
Christian Kuhn committed
114
115
116
117
	clean_images_php55 \
	clean_images_php56 \
	clean_images_php70 \
	clean_images_php71 \
Christian Kuhn's avatar
Christian Kuhn committed
118
	clean_images_php72 \
119
	clean_images_php73 \
120
	clean_images_bamboo
121
122


Christian Kuhn's avatar
Christian Kuhn committed
123

124
125
126
127
128
all: \
	build

build: \
	build_baseimage \
129
	build_php \
130
	build_bamboo
131
132

build_php: \
133
134
	build_php53 \
	build_php54 \
Christian Kuhn's avatar
Christian Kuhn committed
135
136
137
138
	build_php55 \
	build_php56 \
	build_php70 \
	build_php71 \
139
140
	build_php72 \
	build_php73
141

142
143
release: \
	release_baseimage \
144
145
146
147
	release_php \
	release_bamboo

release_php: \
148
149
	release_php53 \
	release_php54 \
Christian Kuhn's avatar
Christian Kuhn committed
150
151
152
153
	release_php55 \
	release_php56 \
	release_php70 \
	release_php71 \
154
155
	release_php72 \
	release_php73
156

157
158
clean: \
	clean_baseimage \
159
160
	clean_php53 \
	clean_php54 \
Christian Kuhn's avatar
Christian Kuhn committed
161
162
163
164
	clean_php55 \
	clean_php56 \
	clean_php70 \
	clean_php71 \
165
	clean_php72 \
166
	clean_php73 \
167
	clean_bamboo
168
169
170
171


clean_images: \
	clean_images_baseimage \
172
173
	clean_images_php53 \
	clean_images_php54 \
Christian Kuhn's avatar
Christian Kuhn committed
174
175
176
177
	clean_images_php55 \
	clean_images_php56 \
	clean_images_php70 \
	clean_images_php71 \
Christian Kuhn's avatar
Christian Kuhn committed
178
	clean_images_php72 \
179
	clean_images_php73 \
180
	clean_images_bamboo
181
182
183
184
185
186


build_baseimage:
	rm -rf build_baseimage
	cp -pR baseimage build_baseimage
	docker build -t $(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE) build_baseimage
187
	docker tag $(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE) $(NAME_BASEIMAGE):$(SHORTVERSION_BASEIMAGE)
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206

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


Christian Kuhn's avatar
Christian Kuhn committed
207

208
build_php53: build_baseimage
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
	rm -rf build_php53
	cp -pR php53 build_php53
	docker build -t $(NAME_PHP53):$(FULLVERSION_PHP53) build_php53
	docker tag $(NAME_PHP53):$(FULLVERSION_PHP53) $(NAME_PHP53):$(SHORTVERSION_PHP53)

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

clean_php53:
	rm -rf build_php53

clean_images_php53:
	docker rmi $(NAME_PHP53):latest || true
	docker rmi $(NAME_PHP53):$(SHORTVERSION_PHP53) || true
	docker rmi $(NAME_PHP53):$(FULLVERSION_PHP53) || true


232
build_php54: build_baseimage
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
	rm -rf build_php54
	cp -pR php54 build_php54
	docker build -t $(NAME_PHP54):$(FULLVERSION_PHP54) build_php54
	docker tag $(NAME_PHP54):$(FULLVERSION_PHP54) $(NAME_PHP54):$(SHORTVERSION_PHP54)

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

clean_php54:
	rm -rf build_php54

clean_images_php54:
	docker rmi $(NAME_PHP54):latest || true
	docker rmi $(NAME_PHP54):$(SHORTVERSION_PHP54) || true
	docker rmi $(NAME_PHP54):$(FULLVERSION_PHP54) || true


256
build_php55: build_baseimage
Christian Kuhn's avatar
Christian Kuhn committed
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
	rm -rf build_php55
	cp -pR php55 build_php55
	docker build -t $(NAME_PHP55):$(FULLVERSION_PHP55) build_php55
	docker tag $(NAME_PHP55):$(FULLVERSION_PHP55) $(NAME_PHP55):$(SHORTVERSION_PHP55)

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

clean_php55:
	rm -rf build_php55

clean_images_php55:
	docker rmi $(NAME_PHP55):latest || true
	docker rmi $(NAME_PHP55):$(SHORTVERSION_PHP55) || true
	docker rmi $(NAME_PHP55):$(FULLVERSION_PHP55) || true


280
build_php56: build_baseimage
Christian Kuhn's avatar
Christian Kuhn committed
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
	rm -rf build_php56
	cp -pR php56 build_php56
	docker build -t $(NAME_PHP56):$(FULLVERSION_PHP56) build_php56
	docker tag $(NAME_PHP56):$(FULLVERSION_PHP56) $(NAME_PHP56):$(SHORTVERSION_PHP56)

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

clean_php56:
	rm -rf build_php56

clean_images_php56:
	docker rmi $(NAME_PHP56):latest || true
	docker rmi $(NAME_PHP56):$(SHORTVERSION_PHP56) || true
	docker rmi $(NAME_PHP56):$(FULLVERSION_PHP56) || true


304
build_php70: build_baseimage
Christian Kuhn's avatar
Christian Kuhn committed
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
	rm -rf build_php70
	cp -pR php70 build_php70
	docker build -t $(NAME_PHP70):$(FULLVERSION_PHP70) build_php70
	docker tag $(NAME_PHP70):$(FULLVERSION_PHP70) $(NAME_PHP70):$(SHORTVERSION_PHP70)

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

clean_php70:
	rm -rf build_php70

clean_images_php70:
	docker rmi $(NAME_PHP70):latest || true
	docker rmi $(NAME_PHP70):$(SHORTVERSION_PHP70) || true
	docker rmi $(NAME_PHP70):$(FULLVERSION_PHP70) || true


328
build_php71: build_baseimage
Christian Kuhn's avatar
Christian Kuhn committed
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
	rm -rf build_php71
	cp -pR php71 build_php71
	docker build -t $(NAME_PHP71):$(FULLVERSION_PHP71) build_php71
	docker tag $(NAME_PHP71):$(FULLVERSION_PHP71) $(NAME_PHP71):$(SHORTVERSION_PHP71)

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

clean_php71:
	rm -rf build_php71

clean_images_php71:
	docker rmi $(NAME_PHP71):latest || true
	docker rmi $(NAME_PHP71):$(SHORTVERSION_PHP71) || true
	docker rmi $(NAME_PHP71):$(FULLVERSION_PHP71) || true


352
build_php72: build_baseimage
Christian Kuhn's avatar
Christian Kuhn committed
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
	rm -rf build_php72
	cp -pR php72 build_php72
	docker build -t $(NAME_PHP72):$(FULLVERSION_PHP72) build_php72
	docker tag $(NAME_PHP72):$(FULLVERSION_PHP72) $(NAME_PHP72):$(SHORTVERSION_PHP72)

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

clean_php72:
	rm -rf build_php72

clean_images_php72:
	docker rmi $(NAME_PHP72):latest || true
	docker rmi $(NAME_PHP72):$(SHORTVERSION_PHP72) || true
	docker rmi $(NAME_PHP72):$(FULLVERSION_PHP72) || true


376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
build_php73: build_baseimage
	rm -rf build_php73
	cp -pR php73 build_php73
	docker build -t $(NAME_PHP73):$(FULLVERSION_PHP73) build_php73
	docker tag $(NAME_PHP73):$(FULLVERSION_PHP73) $(NAME_PHP73):$(SHORTVERSION_PHP73)

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

clean_php73:
	rm -rf build_php73

clean_images_php73:
	docker rmi $(NAME_PHP73):latest || true
	docker rmi $(NAME_PHP73):$(SHORTVERSION_PHP73) || true
	docker rmi $(NAME_PHP73):$(FULLVERSION_PHP73) || true


Christian Kuhn's avatar
Christian Kuhn committed
400

401
402
403
404
build_bamboo: build_baseimage
	rm -rf build_bamboo
	cp -pR bamboo-remote-agent build_bamboo
	docker build -t $(NAME_BAMBOO):$(FULLVERSION_BAMBOO) build_bamboo
405

406
407
408
release_bamboo:
	@if ! docker images $(NAME_BAMBOO) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_BAMBOO); then \
		echo "$(NAME_BAMBOO) version $(FULLVERSION_BAMBOO) is not yet built. Please run 'make build'"; false; \
Christian Kuhn's avatar
Christian Kuhn committed
409
	fi
410
411
412
413
414
415
416
417
418
419
420
421
422
	docker tag $(NAME_BAMBOO):$(FULLVERSION_BAMBOO) $(NAME_BAMBOO):$(SHORTVERSION_BAMBOO)
	docker tag $(NAME_BAMBOO):$(FULLVERSION_BAMBOO) $(NAME_BAMBOO):latest
	docker push $(NAME_BAMBOO):latest
	docker push $(NAME_BAMBOO):$(FULLVERSION_BAMBOO)
	docker push $(NAME_BAMBOO):$(SHORTVERSION_BAMBOO)

clean_bamboo:
	rm -rf build_bamboo

clean_images_bamboo:
	docker rmi $(NAME_BAMBOO):latest || true
	docker rmi $(NAME_BAMBOO):$(SHORTVERSION_BAMBOO) || true
	docker rmi $(NAME_BAMBOO):$(FULLVERSION_BAMBOO) || true