Commit ea8c2f3d authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] Prepare Makefile

parent 34e68327
......@@ -5,6 +5,36 @@ PATCHLEVEL_BASEIMAGE=2
FULLVERSION_BASEIMAGE=$(MAJOR_BASEIMAGE).$(MINOR_BASEIMAGE).$(PATCHLEVEL_BASEIMAGE)
SHORTVERSION_BASEIMAGE=$(MAJOR_BASEIMAGE).$(MINOR_BASEIMAGE)
NAME_PHP55 = typo3gmbh/php55
MAJOR_PHP55=1
MINOR_PHP55=0
PATCHLEVEL_PHP55=0
FULLVERSION_PHP55=$(MAJOR_PHP55).$(MINOR_PHP55).$(PATCHLEVEL_PHP55)
SHORTVERSION_PHP55=$(MAJOR_PHP55).$(MINOR_PHP55)
NAME_PHP56 = typo3gmbh/php56
MAJOR_PHP56=1
MINOR_PHP56=0
PATCHLEVEL_PHP56=0
FULLVERSION_PHP56=$(MAJOR_PHP56).$(MINOR_PHP56).$(PATCHLEVEL_PHP56)
SHORTVERSION_PHP56=$(MAJOR_PHP56).$(MINOR_PHP56)
NAME_PHP70 = typo3gmbh/php70
MAJOR_PHP70=1
MINOR_PHP70=0
PATCHLEVEL_PHP70=0
FULLVERSION_PHP70=$(MAJOR_PHP70).$(MINOR_PHP70).$(PATCHLEVEL_PHP70)
SHORTVERSION_PHP70=$(MAJOR_PHP70).$(MINOR_PHP70)
NAME_PHP71 = typo3gmbh/php71
MAJOR_PHP71=1
MINOR_PHP71=0
PATCHLEVEL_PHP71=0
FULLVERSION_PHP71=$(MAJOR_PHP71).$(MINOR_PHP71).$(PATCHLEVEL_PHP71)
SHORTVERSION_PHP71=$(MAJOR_PHP71).$(MINOR_PHP71)
NAME_BAMBOO_PHP55 = typo3gmbh/bamboo-remote-agent-php55
MAJOR_BAMBOO_PHP55=1
MINOR_BAMBOO_PHP55=0
......@@ -34,40 +64,62 @@ FULLVERSION_BAMBOO_PHP71=$(MAJOR_BAMBOO_PHP71).$(MINOR_BAMBOO_PHP71).$(PATCHLEVE
SHORTVERSION_BAMBOO_PHP71=$(MAJOR_BAMBOO_PHP71).$(MINOR_BAMBOO_PHP71)
.PHONY: \
all \
build \
build_baseimage \
build_php55 \
build_php56 \
build_php70 \
build_php71 \
build_bamboo_php55 \
build_bamboo_php56 \
build_bamboo_php70 \
build_bamboo_php71 \
release \
release_baseimage \
release_php55 \
release_php56 \
release_php70 \
release_php71 \
release_bamboo_php55 \
release_bamboo_php56 \
release_bamboo_php70 \
release_bamboo_php71 \
clean \
clean_baseimage \
clean_php55 \
clean_php56 \
clean_php70 \
clean_php71 \
clean_bamboo_php55 \
clean_bamboo_php56 \
clean_bamboo_php70 \
clean_bamboo_php71 \
clean_images \
clean_images_baseimage \
clean_images_php55 \
clean_images_php56 \
clean_images_php70 \
clean_images_php71 \
clean_images_bamboo_php55 \
clean_images_bamboo_php56 \
clean_images_bamboo_php70 \
clean_images_bamboo_php71
all: \
build
build: \
build_baseimage \
build_php55 \
build_php56 \
build_php70 \
build_php71 \
build_bamboo_php55 \
build_bamboo_php56 \
build_bamboo_php70 \
......@@ -76,6 +128,10 @@ build: \
release: \
release_baseimage \
release_php55 \
release_php56 \
release_php70 \
release_php71 \
release_bamboo_php55 \
release_bamboo_php56 \
release_bamboo_php70 \
......@@ -84,6 +140,10 @@ release: \
clean: \
clean_baseimage \
clean_php55 \
clean_php56 \
clean_php70 \
clean_php71 \
clean_bamboo_php55 \
clean_bamboo_php56 \
clean_bamboo_php70 \
......@@ -92,6 +152,10 @@ clean: \
clean_images: \
clean_images_baseimage \
clean_images_php55 \
clean_images_php56 \
clean_images_php70 \
clean_images_php71 \
clean_images_bamboo_php55 \
clean_images_bamboo_php56 \
clean_images_bamboo_php70 \
......@@ -122,6 +186,104 @@ clean_images_baseimage:
docker rmi $(NAME_BASEIMAGE):latest || true
build_php55:
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
build_php56:
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
build_php70:
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
build_php71:
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
build_bamboo_php55:
rm -rf build_bamboo-php55
cp -pR bamboo-remote-agent-php55 build_bamboo-php55
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment