Commit 0c3bcb4b authored by Christian Kuhn's avatar Christian Kuhn
Browse files

Merge branch 'release/1.0.1'

parents a1b8cc7c 0289b6bb
......@@ -2,10 +2,14 @@
.vagrant
*.swp
build_baseimage
build_php53
build_php54
build_php55
build_php56
build_php70
build_php71
build_bamboo-php53
build_bamboo-php54
build_bamboo-php55
build_bamboo-php56
build_bamboo-php70
......
......@@ -6,6 +6,20 @@ FULLVERSION_BASEIMAGE=$(MAJOR_BASEIMAGE).$(MINOR_BASEIMAGE).$(PATCHLEVEL_BASEIMA
SHORTVERSION_BASEIMAGE=$(MAJOR_BASEIMAGE).$(MINOR_BASEIMAGE)
NAME_PHP53 = typo3gmbh/php53
MAJOR_PHP53=1
MINOR_PHP53=0
PATCHLEVEL_PHP53=1
FULLVERSION_PHP53=$(MAJOR_PHP53).$(MINOR_PHP53).$(PATCHLEVEL_PHP53)
SHORTVERSION_PHP53=$(MAJOR_PHP53).$(MINOR_PHP53)
NAME_PHP54 = typo3gmbh/php54
MAJOR_PHP54=1
MINOR_PHP54=0
PATCHLEVEL_PHP54=1
FULLVERSION_PHP54=$(MAJOR_PHP54).$(MINOR_PHP54).$(PATCHLEVEL_PHP54)
SHORTVERSION_PHP54=$(MAJOR_PHP54).$(MINOR_PHP54)
NAME_PHP55 = typo3gmbh/php55
MAJOR_PHP55=1
MINOR_PHP55=0
......@@ -35,6 +49,20 @@ FULLVERSION_PHP71=$(MAJOR_PHP71).$(MINOR_PHP71).$(PATCHLEVEL_PHP71)
SHORTVERSION_PHP71=$(MAJOR_PHP71).$(MINOR_PHP71)
NAME_BAMBOO_PHP53 = typo3gmbh/bamboo-remote-agent-php53
MAJOR_BAMBOO_PHP53=1
MINOR_BAMBOO_PHP53=0
PATCHLEVEL_BAMBOO_PHP53=0
FULLVERSION_BAMBOO_PHP53=$(MAJOR_BAMBOO_PHP53).$(MINOR_BAMBOO_PHP53).$(PATCHLEVEL_BAMBOO_PHP53)
SHORTVERSION_BAMBOO_PHP53=$(MAJOR_BAMBOO_PHP53).$(MINOR_BAMBOO_PHP53)
NAME_BAMBOO_PHP54 = typo3gmbh/bamboo-remote-agent-php54
MAJOR_BAMBOO_PHP54=1
MINOR_BAMBOO_PHP54=0
PATCHLEVEL_BAMBOO_PHP54=0
FULLVERSION_BAMBOO_PHP54=$(MAJOR_BAMBOO_PHP54).$(MINOR_BAMBOO_PHP54).$(PATCHLEVEL_BAMBOO_PHP54)
SHORTVERSION_BAMBOO_PHP54=$(MAJOR_BAMBOO_PHP54).$(MINOR_BAMBOO_PHP54)
NAME_BAMBOO_PHP55 = typo3gmbh/bamboo-remote-agent-php55
MAJOR_BAMBOO_PHP55=1
MINOR_BAMBOO_PHP55=0
......@@ -69,40 +97,56 @@ SHORTVERSION_BAMBOO_PHP71=$(MAJOR_BAMBOO_PHP71).$(MINOR_BAMBOO_PHP71)
all \
build \
build_baseimage \
build_php53 \
build_php54 \
build_php55 \
build_php56 \
build_php70 \
build_php71 \
build_bamboo_php53 \
build_bamboo_php54 \
build_bamboo_php55 \
build_bamboo_php56 \
build_bamboo_php70 \
build_bamboo_php71 \
release \
release_baseimage \
release_php53 \
release_php54 \
release_php55 \
release_php56 \
release_php70 \
release_php71 \
release_bamboo_php53 \
release_bamboo_php54 \
release_bamboo_php55 \
release_bamboo_php56 \
release_bamboo_php70 \
release_bamboo_php71 \
clean \
clean_baseimage \
clean_php53 \
clean_php54 \
clean_php55 \
clean_php56 \
clean_php70 \
clean_php71 \
clean_bamboo_php53 \
clean_bamboo_php54 \
clean_bamboo_php55 \
clean_bamboo_php56 \
clean_bamboo_php70 \
clean_bamboo_php71 \
clean_images \
clean_images_baseimage \
clean_images_php53 \
clean_images_php54 \
clean_images_php55 \
clean_images_php56 \
clean_images_php70 \
clean_images_php71 \
clean_images_bamboo_php53 \
clean_images_bamboo_php54 \
clean_images_bamboo_php55 \
clean_images_bamboo_php56 \
clean_images_bamboo_php70 \
......@@ -116,10 +160,14 @@ all: \
build: \
build_baseimage \
build_php53 \
build_php54 \
build_php55 \
build_php56 \
build_php70 \
build_php71 \
build_bamboo_php53 \
build_bamboo_php54 \
build_bamboo_php55 \
build_bamboo_php56 \
build_bamboo_php70 \
......@@ -128,10 +176,14 @@ build: \
release: \
release_baseimage \
release_php53 \
release_php54 \
release_php55 \
release_php56 \
release_php70 \
release_php71 \
release_bamboo_php53 \
release_bamboo_php54 \
release_bamboo_php55 \
release_bamboo_php56 \
release_bamboo_php70 \
......@@ -140,10 +192,14 @@ release: \
clean: \
clean_baseimage \
clean_php53 \
clean_php54 \
clean_php55 \
clean_php56 \
clean_php70 \
clean_php71 \
clean_bamboo_php53 \
clean_bamboo_php54 \
clean_bamboo_php55 \
clean_bamboo_php56 \
clean_bamboo_php70 \
......@@ -152,10 +208,14 @@ clean: \
clean_images: \
clean_images_baseimage \
clean_images_php53 \
clean_images_php54 \
clean_images_php55 \
clean_images_php56 \
clean_images_php70 \
clean_images_php71 \
clean_images_bamboo_php53 \
clean_images_bamboo_php54 \
clean_images_bamboo_php55 \
clean_images_bamboo_php56 \
clean_images_bamboo_php70 \
......@@ -187,6 +247,54 @@ clean_images_baseimage:
build_php53:
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
build_php54:
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
build_php55:
rm -rf build_php55
cp -pR php55 build_php55
......@@ -284,6 +392,56 @@ clean_images_php71:
build_bamboo_php53:
rm -rf build_bamboo-php53
cp -pR bamboo-remote-agent-php53 build_bamboo-php53
echo system.imageVersion=$(FULLVERSION_BAMBOO_PHP53) >> build_bamboo-php53/config/bamboo/bamboo-capabilities.properties
docker build -t $(NAME_BAMBOO_PHP53):$(FULLVERSION_BAMBOO_PHP53) build_bamboo-php53
release_bamboo_php53:
@if ! docker images $(NAME_BAMBOO_PHP53) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_BAMBOO_PHP53); then \
echo "$(NAME_BAMBOO_PHP53) version $(FULLVERSION_BAMBOO_PHP53) is not yet built. Please run 'make build'"; false; \
fi
docker tag $(NAME_BAMBOO_PHP53):$(FULLVERSION_BAMBOO_PHP53) $(NAME_BAMBOO_PHP53):$(SHORTVERSION_BAMBOO_PHP53)
docker tag $(NAME_BAMBOO_PHP53):$(FULLVERSION_BAMBOO_PHP53) $(NAME_BAMBOO_PHP53):latest
docker push $(NAME_BAMBOO_PHP53):latest
docker push $(NAME_BAMBOO_PHP53):$(FULLVERSION_BAMBOO_PHP53)
docker push $(NAME_BAMBOO_PHP53):$(SHORTVERSION_BAMBOO_PHP53)
clean_bamboo_php53:
rm -rf build_bamboo-php53
clean_images_bamboo_php53:
docker rmi $(NAME_BAMBOO_PHP53):latest || true
docker rmi $(NAME_BAMBOO_PHP53):$(SHORTVERSION_BAMBOO_PHP53) || true
docker rmi $(NAME_BAMBOO_PHP53):$(FULLVERSION_BAMBOO_PHP53) || true
build_bamboo_php54:
rm -rf build_bamboo-php54
cp -pR bamboo-remote-agent-php54 build_bamboo-php54
echo system.imageVersion=$(FULLVERSION_BAMBOO_PHP54) >> build_bamboo-php54/config/bamboo/bamboo-capabilities.properties
docker build -t $(NAME_BAMBOO_PHP54):$(FULLVERSION_BAMBOO_PHP54) build_bamboo-php54
release_bamboo_php54:
@if ! docker images $(NAME_BAMBOO_PHP54) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_BAMBOO_PHP54); then \
echo "$(NAME_BAMBOO_PHP54) version $(FULLVERSION_BAMBOO_PHP54) is not yet built. Please run 'make build'"; false; \
fi
docker tag $(NAME_BAMBOO_PHP54):$(FULLVERSION_BAMBOO_PHP54) $(NAME_BAMBOO_PHP54):$(SHORTVERSION_BAMBOO_PHP54)
docker tag $(NAME_BAMBOO_PHP54):$(FULLVERSION_BAMBOO_PHP54) $(NAME_BAMBOO_PHP54):latest
docker push $(NAME_BAMBOO_PHP54):latest
docker push $(NAME_BAMBOO_PHP54):$(FULLVERSION_BAMBOO_PHP54)
docker push $(NAME_BAMBOO_PHP54):$(SHORTVERSION_BAMBOO_PHP54)
clean_bamboo_php54:
rm -rf build_bamboo-php54
clean_images_bamboo_php54:
docker rmi $(NAME_BAMBOO_PHP54):latest || true
docker rmi $(NAME_BAMBOO_PHP54):$(SHORTVERSION_BAMBOO_PHP54) || true
docker rmi $(NAME_BAMBOO_PHP54):$(FULLVERSION_BAMBOO_PHP54) || true
build_bamboo_php55:
rm -rf build_bamboo-php55
cp -pR bamboo-remote-agent-php55 build_bamboo-php55
......
......@@ -33,7 +33,42 @@ correct use within Docker containers. It is Ubuntu, plus:
baseimage is a fork from [passenger-docker](https://github.com/phusion/passenger-docker).
## phpXY
Images on top of baseimage:
* Single images per PHP version. There is an image coming with PHP 7.0 and an image for PHP 7.1 and so on.
* A mariaDB and (later) possible other DBMS.
* Add various services like a memcache and a redis daemon.
* Add a firefox version that works well with the currently supported acceptance test setup.
Users can start these images to execute unit, functional, acceptance and JS tests in an environment that is identical
to the core testing infrastructure.
Simple usage example:
```
# fetch latest 1.0 version of php70 image
docker pull typo3gmbh/php70:1.0
# start a local image, start processes and get a bash on it, delete everything on container logout
docker run -it --rm typo3gmbh/php70:1.0 /sbin/my_init -- bash
mkdir /srv/tmp && cd /srv/tmp
git clone git://git.typo3.org/Packages/TYPO3.CMS.git .
mkdir -p typo3temp/var/tests/
export HOME=/root DISPLAY=":99" typo3DatabaseName="func" typo3DatabaseUsername="funcu" typo3DatabasePassword="funcp" typo3DatabaseHost="localhost"
composer install
Xvfb :99 &
php -S localhost:8000 >/dev/null 2>&1 &
./bin/selenium-server-standalone >/dev/null 2>&1 &
./bin/codecept run Acceptance -d -c typo3/sysext/core/Build/AcceptanceTests.yml
```
The images allow running mysql in a ramdisk to speed up functional tests and allows to use an already
existing local core or typo3 instance as code source. The details of that will be documented
in an official document later.
## 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
typo3gmbh/bamboo-remote-agent-phpXY add the bamboo test runner on top of the phpXY images for integration in
TYPO3 GmbH testing infrastructure. Users usually don't have to deal with these images.
\ No newline at end of file
FROM typo3gmbh/php53:1.0
MAINTAINER TYPO3 GmbH <info@typo3.com>
ADD . /pd_build
RUN /pd_build/install.sh
CMD ["/sbin/my_init"]
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
# Create bamboo work directory
mkdir -p /srv/bamboo-agent-home
chmod 0775 /srv/bamboo-agent-home
chown bamboo:bamboo /srv/bamboo-agent-home
# Install bamboo remote agent
curl -SL --progress-bar https://bamboo.typo3.com/agentServer/agentInstaller/atlassian-bamboo-agent-installer-5.12.2.1.jar -o /tmp/bamboo-installer.jar
/usr/bin/java -Dbamboo.home=/srv/bamboo-agent-home -jar /tmp/bamboo-installer.jar https://bamboo.typo3.com/agentServer install
chown -R bamboo:bamboo /srv/bamboo-agent-home
rm -f /tmp/bamboo-installer.jar
## Configure properties
cp -a /pd_build/config/bamboo/bamboo-capabilities.properties /srv/bamboo-agent-home/bin
## Enable agent
cp -a /pd_build/runit/bamboo-agent /etc/service/bamboo-agent
export LC_ALL=C
export DEBIAN_FRONTEND=noninteractive
function minimal_apt_get_install()
{
if [[ ! -e /var/lib/apt/lists/lock ]]; then
apt-get update
fi
apt-get install -y --no-install-recommends "$@"
}
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
apt-get clean
rm -rf \
/var/lib/apt/lists/* \
/tmp/* \
/var/tmp/* \
/usr/local/src/* \
/usr/include/php/20151012/ext/apcu/ \
#
rm -rf /pd_build
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
/pd_build/prepare.sh
/pd_build/bamboo-agent.sh
/pd_build/finalize.sh
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
## Create a user for the bamboo agent.
addgroup --gid 9999 bamboo
adduser --uid 9999 --gid 9999 --disabled-password --gecos "Bamboo Remote Agent" bamboo
#!/bin/sh
mkdir -p /var/log/bamboo-agent
exec svlogd -tt /var/log/bamboo-agent
#!/bin/sh
exec 2>&1
exec /sbin/setuser bamboo /srv/bamboo-agent-home/bin/bamboo-agent.sh console
FROM typo3gmbh/php54:1.0
MAINTAINER TYPO3 GmbH <info@typo3.com>
ADD . /pd_build
RUN /pd_build/install.sh
CMD ["/sbin/my_init"]
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
# Create bamboo work directory
mkdir -p /srv/bamboo-agent-home
chmod 0775 /srv/bamboo-agent-home
chown bamboo:bamboo /srv/bamboo-agent-home
# Install bamboo remote agent
curl -SL --progress-bar https://bamboo.typo3.com/agentServer/agentInstaller/atlassian-bamboo-agent-installer-5.12.2.1.jar -o /tmp/bamboo-installer.jar
/usr/bin/java -Dbamboo.home=/srv/bamboo-agent-home -jar /tmp/bamboo-installer.jar https://bamboo.typo3.com/agentServer install
chown -R bamboo:bamboo /srv/bamboo-agent-home
rm -f /tmp/bamboo-installer.jar
## Configure properties
cp -a /pd_build/config/bamboo/bamboo-capabilities.properties /srv/bamboo-agent-home/bin
## Enable agent
cp -a /pd_build/runit/bamboo-agent /etc/service/bamboo-agent
export LC_ALL=C
export DEBIAN_FRONTEND=noninteractive
function minimal_apt_get_install()
{
if [[ ! -e /var/lib/apt/lists/lock ]]; then
apt-get update
fi
apt-get install -y --no-install-recommends "$@"
}
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
apt-get clean
rm -rf \
/var/lib/apt/lists/* \
/tmp/* \
/var/tmp/* \
/usr/local/src/* \
/usr/include/php/20151012/ext/apcu/ \
#
rm -rf /pd_build
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
/pd_build/prepare.sh
/pd_build/bamboo-agent.sh
/pd_build/finalize.sh
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
## Create a user for the bamboo agent.
addgroup --gid 9999 bamboo
adduser --uid 9999 --gid 9999 --disabled-password --gecos "Bamboo Remote Agent" bamboo
#!/bin/sh
mkdir -p /var/log/bamboo-agent
exec svlogd -tt /var/log/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