From acb84de7835d3a3a98002e52c989747f46e59c08 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Wed, 17 Oct 2012 15:37:21 +0200 Subject: o Adding a jenkins app. --- examples/jenkins-app/pom.xml | 76 ++++++++++++++++++++++ .../src/main/unix/files/root/bin/jenkins | 27 ++++++++ .../src/main/unix/files/root/etc/app.conf | 1 + 3 files changed, 104 insertions(+) create mode 100644 examples/jenkins-app/pom.xml create mode 100644 examples/jenkins-app/src/main/unix/files/root/bin/jenkins create mode 100644 examples/jenkins-app/src/main/unix/files/root/etc/app.conf diff --git a/examples/jenkins-app/pom.xml b/examples/jenkins-app/pom.xml new file mode 100644 index 0000000..2a40ed6 --- /dev/null +++ b/examples/jenkins-app/pom.xml @@ -0,0 +1,76 @@ + + 4.0.0 + + io.trygvis.appsh + appsh-parent + 1.0-SNAPSHOT + + io.trygvis.appsh.examples + jenkins + unix-zip + + + org.jenkins-ci.main + jenkins-war + 1.486 + war + + + + + jenkins + http://repo.jenkins-ci.org/public/ + + + + + + + no.arktekk.unix + unix-maven-plugin + 1.0-alpha-6 + true + + Trygve Laugstol + + + + org.jenkins-ci.main:jenkins-war:war + root/wars/jenkins.war + + + + + + + diff --git a/examples/jenkins-app/src/main/unix/files/root/bin/jenkins b/examples/jenkins-app/src/main/unix/files/root/bin/jenkins new file mode 100644 index 0000000..dbb7d6c --- /dev/null +++ b/examples/jenkins-app/src/main/unix/files/root/bin/jenkins @@ -0,0 +1,27 @@ +#!/bin/bash -e + +set -x + +. $APPSH_BASEDIR/.app/lib/app-conf + +LOGS=$APPSH_INSTANCE_HOME/logs + +mkdir -p $LOGS +logfile=$LOGS/jenkins.out +exec > $logfile 2>&1 + +echo PID=$$ + +ARGS=() + +IFS=" +" +for line in $(get_conf_in_group $APPSH_BASEDIR $APPSH_NAME $APPSH_INSTANCE jenkins) +do + ARGS+=("--$line") +done + +exec java -jar wars/jenkins.war \ + --logfile $APPSH_INSTANCE_HOME/logs/jenkins.log \ + ${ARGS[@]} \ + 2>&1 diff --git a/examples/jenkins-app/src/main/unix/files/root/etc/app.conf b/examples/jenkins-app/src/main/unix/files/root/etc/app.conf new file mode 100644 index 0000000..9dfa29b --- /dev/null +++ b/examples/jenkins-app/src/main/unix/files/root/etc/app.conf @@ -0,0 +1 @@ +app.bin=bin/jenkins -- cgit v1.2.3