Makefile 10.9 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=3
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=3
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=3
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=3
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=3
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=3
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=3
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=3
Christian Kuhn's avatar
Christian Kuhn committed
55
56
57
FULLVERSION_PHP72=$(MAJOR_PHP72).$(MINOR_PHP72).$(PATCHLEVEL_PHP72)
SHORTVERSION_PHP72=$(MAJOR_PHP72).$(MINOR_PHP72)

Christian Kuhn's avatar
Christian Kuhn committed
58

59
60
61
NAME_BAMBOO = typo3gmbh/bamboo-remote-agent
MAJOR_BAMBOO=1
MINOR_BAMBOO=0
Christian Kuhn's avatar
Christian Kuhn committed
62
PATCHLEVEL_BAMBOO=3
63
64
FULLVERSION_BAMBOO=$(MAJOR_BAMBOO).$(MINOR_BAMBOO).$(PATCHLEVEL_BAMBOO)
SHORTVERSION_BAMBOO=$(MAJOR_BAMBOO).$(MINOR_BAMBOO)
Christian Kuhn's avatar
Christian Kuhn committed
65

66

Christian Kuhn's avatar
Christian Kuhn committed
67

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


Christian Kuhn's avatar
Christian Kuhn committed
112

113
114
115
116
117
all: \
	build

build: \
	build_baseimage \
118
	build_php \
119
	build_bamboo
120
121

build_php: \
122
123
	build_php53 \
	build_php54 \
Christian Kuhn's avatar
Christian Kuhn committed
124
125
126
127
	build_php55 \
	build_php56 \
	build_php70 \
	build_php71 \
128
129
	build_php72

130
131
release: \
	release_baseimage \
132
133
134
135
	release_php \
	release_bamboo

release_php: \
136
137
	release_php53 \
	release_php54 \
Christian Kuhn's avatar
Christian Kuhn committed
138
139
140
141
	release_php55 \
	release_php56 \
	release_php70 \
	release_php71 \
142
143
	release_php72

144
145
clean: \
	clean_baseimage \
146
147
	clean_php53 \
	clean_php54 \
Christian Kuhn's avatar
Christian Kuhn committed
148
149
150
151
	clean_php55 \
	clean_php56 \
	clean_php70 \
	clean_php71 \
152
	clean_php72 \
153
	clean_bamboo
154
155
156
157


clean_images: \
	clean_images_baseimage \
158
159
	clean_images_php53 \
	clean_images_php54 \
Christian Kuhn's avatar
Christian Kuhn committed
160
161
162
163
	clean_images_php55 \
	clean_images_php56 \
	clean_images_php70 \
	clean_images_php71 \
Christian Kuhn's avatar
Christian Kuhn committed
164
	clean_images_php72 \
165
	clean_images_bamboo
166
167
168
169
170
171


build_baseimage:
	rm -rf build_baseimage
	cp -pR baseimage build_baseimage
	docker build -t $(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE) build_baseimage
172
	docker tag $(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE) $(NAME_BASEIMAGE):$(SHORTVERSION_BASEIMAGE)
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191

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
192

193
build_php53: build_baseimage
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
	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


217
build_php54: build_baseimage
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
	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


241
build_php55: build_baseimage
Christian Kuhn's avatar
Christian Kuhn committed
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
	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


265
build_php56: build_baseimage
Christian Kuhn's avatar
Christian Kuhn committed
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
	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


289
build_php70: build_baseimage
Christian Kuhn's avatar
Christian Kuhn committed
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
	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


313
build_php71: build_baseimage
Christian Kuhn's avatar
Christian Kuhn committed
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
	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


337
build_php72: build_baseimage
Christian Kuhn's avatar
Christian Kuhn committed
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
	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


Christian Kuhn's avatar
Christian Kuhn committed
361

362
363
364
365
build_bamboo: build_baseimage
	rm -rf build_bamboo
	cp -pR bamboo-remote-agent build_bamboo
	docker build -t $(NAME_BAMBOO):$(FULLVERSION_BAMBOO) build_bamboo
366

367
368
369
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
370
	fi
371
372
373
374
375
376
377
378
379
380
381
382
383
	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