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

[TASK] Prepare bamboo php54

parent 9d18246f
FROM typo3gmbh/php54:1.0
ADD . /pd_build
RUN /pd_build/
CMD ["/sbin/my_init"]
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 -o /tmp/bamboo-installer.jar
/usr/bin/java -Dbamboo.home=/srv/bamboo-agent-home -jar /tmp/bamboo-installer.jar install
chown -R bamboo:bamboo /srv/bamboo-agent-home
rm -f /tmp/bamboo-installer.jar
## Configure properties
cp -a /pd_build/config/bamboo/ /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
apt-get install -y --no-install-recommends "$@"
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
set -e
source /pd_build/buildconfig
set -x
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
mkdir -p /var/log/bamboo-agent
exec svlogd -tt /var/log/bamboo-agent
exec 2>&1
exec /sbin/setuser bamboo /srv/bamboo-agent-home/bin/ 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