Commit 0289b6bb authored by Christian Kuhn's avatar Christian Kuhn
Browse files

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

Merge pull request #21 in T3COM/bamboo-remote-agent from feature/INFRA-163-php53-and-php54 to develop

* commit '2579d6e1':
  [TASK] Bump versions
  [TASK] Add nodejs on php53 and php54 - no reason to skip that
  [TASK] Prepare bamboo php54
  [BUGFIX] From php version reference
  [BUGFIX] Remove rodent download
  [TASK] Kickstart php54
  [TASK] Makefile php53 bamboo tagets
  [TASK] Add bamboo agent php53
  [TASK] php53 remove more stuff to keep image small
  [TASK] php53 apt-get remove -y
  [TASK] php53 remove package list
  [TASK] Remove php53 dev packages again
  [TASK] Reformat finalize.sh
  [TASK] Extend .gitignore
  [TASK] Compile php53
  [TASK] Remove nodjs from 53 and 54
  [TASK] Prepare php54 and php53 Makefile
  [TASK] Kickstart php 5.3 branch
parents b7207122 2579d6e1
......@@ -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
......
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
#!/bin/sh
exec 2>&1
exec /sbin/setuser bamboo /srv/bamboo-agent-home/bin/bamboo-agent.sh console
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