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. --- .gitignore | 1 + pom.xml | 54 ++++++++++++++++++++++++++++++++++++ src/main/unix/files/app.config | 2 ++ src/main/unix/files/root/bin/jenkins | 28 +++++++++++++++++++ 4 files changed, 85 insertions(+) create mode 100644 .gitignore create mode 100644 pom.xml create mode 100644 src/main/unix/files/app.config create mode 100644 src/main/unix/files/root/bin/jenkins diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eb5a316 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +target diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..e8d395f --- /dev/null +++ b/pom.xml @@ -0,0 +1,54 @@ + + 4.0.0 + + io.trygvis + trygvis-parent + 1 + + io.trygvis.appsh.apps + jenkins + 1.500 + unix-zip + + + org.jenkins-ci.main + jenkins-war + 1.500 + war + + + + + jenkins + http://repo.jenkins-ci.org/public/ + + + + + + org.codehaus.mojo.unix + unix-maven-plugin + 1.0-alpha-7-SNAPSHOT + true + + Trygve Laugstol + + + org.jenkins-ci.main:jenkins-war:war + root/wars/jenkins.war + + + + 0755 + + + root/bin/* + hooks/* + + + + + + + + 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