From 0b68e09909463fd6e71bf0de9b3406684566a2a4 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Tue, 12 Nov 2013 12:56:08 +0100 Subject: o Initial import of Jenkins app for app.sh. --- src/main/unix/files/app.config | 2 ++ src/main/unix/files/root/bin/jenkins | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 src/main/unix/files/app.config create mode 100644 src/main/unix/files/root/bin/jenkins (limited to 'src') diff --git a/src/main/unix/files/app.config b/src/main/unix/files/app.config new file mode 100644 index 0000000..347d141 --- /dev/null +++ b/src/main/unix/files/app.config @@ -0,0 +1,2 @@ +jenkins.httpPort=8888 +jenkins.ajp13Port=-1 diff --git a/src/main/unix/files/root/bin/jenkins b/src/main/unix/files/root/bin/jenkins new file mode 100644 index 0000000..750ef66 --- /dev/null +++ b/src/main/unix/files/root/bin/jenkins @@ -0,0 +1,28 @@ +#!/bin/bash -e + +set -u +set -e +set -x + +mkdir -p "$APP_HOME/logs" +exec >> "$APP_HOME/logs/jenkins.out" +exec 2>&1 + +mkdir -p "$APP_HOME/jenkins-home" +JENKINS_HOME="$APP_HOME/jenkins-home" +export JENKINS_HOME + +IFS=" +" + +ARGS=(-jar wars/jenkins.war) + +# Plainly pass any argument in the "jenkins" group to Jenkins. +for line in $(app cat-conf -g jenkins | cut -f 2- -d .) +do + ARGS+=("--$line") +done + +exec java "${ARGS[@]}" \ + --logfile jenkins.log \ + 2>&1 -- cgit v1.2.3