Commit 3bd5957e authored by Christian Kuhn's avatar Christian Kuhn
Browse files

Merge pull request #17 in T3COM/bamboo-remote-agent from...

Merge pull request #17 in T3COM/bamboo-remote-agent from feature/INFRA-161-makefile-and-gitignore-works to develop

* commit '49ad70d4':
  [TASK] Tag the baseimage with shortversion after build
  [TASK] Adapt .gitignore to new work dirs
  [TASK] Central Makefile, move all image definitions one dir up
  [TASK] Move up .editorconfig
  [TASK] Refactor README.md
  [TASK] Main LICENSE.txt file move up from baseimage
  [TASK] Central .gitignore file
parents b118917b 49ad70d4
.DS_Store
.vagrant
*.swp
build_baseimage
build_bamboo-php55
build_bamboo-php56
build_bamboo-php70
build_bamboo-php71
.idea
\ No newline at end of file
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
docker tag $(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE) $(NAME_BASEIMAGE):$(SHORTVERSION_BASEIMAGE)
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
# A set of Docker containers for TYPO3 testing infrastructure
## Introduction
This [repository](https://bitbucket.typo3.com/projects/T3COM/repos/baseimage-docker/browse) contains
Docker container build scripts used within the [TYPO3 GmbH](https://typo3.com) infrastructure
to execute the TYPO3 CMS core tests and other build and packaging jobs.
The containers may be used by anyone to execute tests locally in order to have the exact
same environment as the "pre-merge tests" run for the TYPO3 CMS core.
The latest compiled versions of those containers can be pulled from [Docker Hub](https://hub.docker.com/r/typo3gmbh/).
Docker containers can be stacked: An image can use another image below to build its
own stuff on-top of that. This feature is used here.
## baseimage: A minimal Ubuntu base image modified for Docker-friendliness
This is the lowest layer of images put on top of each other.
typo3gmbh/baseimage is a Docker image based off of Phusion's baseimage-docker, but has been
modified to run on Ubuntu 16.04 and removes features deemed unnecessary for a modern baseimage.
baseimage is a special [Docker](https://www.docker.com) image that is configured for
correct use within Docker containers. It is Ubuntu, plus:
* Modifications for Docker-friendliness.
* Administration tools that are especially useful in the context of Docker.
* Mechanisms for easily running multiple processes, [without violating the Docker philosophy](#docker_single_process).
baseimage is a fork from [passenger-docker](https://github.com/phusion/passenger-docker).
## bamboo-remote-agent-phpXY
typo3gmbh/bamboo-remote-agent-phpXY add PHP and other stuff on top of the baseimage. One container
per supported PHP version is built.
\ No newline at end of file
.DS_Store
.vagrant
php55_image
php56_image
php70_image
php71_image
.idea
\ No newline at end of file
NAME = typo3gmbh/bamboo-remote-agent
MAJOR=1
MINOR=0
PATCHLEVEL=1
FULLVERSION=$(MAJOR).$(MINOR).$(PATCHLEVEL)
SHORTVERSION=$(MAJOR).$(MINOR)
.PHONY: \
all \
build \
release \
clean \
clean_images
all: build
build:
rm -rf php55_image
cp -pR image php55_image
echo system.imageVersion=$(FULLVERSION) >> php55_image/config/bamboo/bamboo-capabilities.properties
docker build -t $(NAME)-php55:$(FULLVERSION) --rm php55_image
release:
@if ! docker images $(NAME)-php55 | awk '{ print $$2 }' | grep -q -F $(FULLVERSION); then echo "$(NAME)-php55 version $(FULLVERSION) is not yet built. Please run 'make build'"; false; fi
docker tag $(NAME)-php55:$(FULLVERSION) $(NAME)-php55:$(SHORTVERSION)
docker tag $(NAME)-php55:$(FULLVERSION) $(NAME)-php55:latest
docker push $(NAME)-php55:latest
docker push $(NAME)-php55:$(FULLVERSION)
docker push $(NAME)-php55:$(SHORTVERSION)
clean:
rm -rf php55_image
clean_images:
docker rmi $(NAME)-php55:latest $(NAME)-php55:$(SHORTVERSION) $(NAME)-php55:$(FULLVERSION) || true
\ No newline at end of file
# Docker base images for TYPO3 Bamboo Agent
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