summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2013-11-12 12:56:08 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2013-11-12 12:56:08 +0100
commit0b68e09909463fd6e71bf0de9b3406684566a2a4 (patch)
treeebef40e16ff654eb12b73a99d985207e893def84 /src
downloadjenkins-app-0b68e09909463fd6e71bf0de9b3406684566a2a4.tar.gz
jenkins-app-0b68e09909463fd6e71bf0de9b3406684566a2a4.tar.bz2
jenkins-app-0b68e09909463fd6e71bf0de9b3406684566a2a4.tar.xz
jenkins-app-0b68e09909463fd6e71bf0de9b3406684566a2a4.zip
o Initial import of Jenkins app for app.sh.
Diffstat (limited to 'src')
-rw-r--r--src/main/unix/files/app.config2
-rw-r--r--src/main/unix/files/root/bin/jenkins28
2 files changed, 30 insertions, 0 deletions
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