summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2012-10-17 15:37:21 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2012-10-17 15:37:21 +0200
commitacb84de7835d3a3a98002e52c989747f46e59c08 (patch)
tree906f4f686147f8fad7e6a757e97f6aeb47207c91
parenteea29a05abbd9a89a181455ac858173fc3640f93 (diff)
downloadapp.sh-java-acb84de7835d3a3a98002e52c989747f46e59c08.tar.gz
app.sh-java-acb84de7835d3a3a98002e52c989747f46e59c08.tar.bz2
app.sh-java-acb84de7835d3a3a98002e52c989747f46e59c08.tar.xz
app.sh-java-acb84de7835d3a3a98002e52c989747f46e59c08.zip
o Adding a jenkins app.
-rw-r--r--examples/jenkins-app/pom.xml76
-rw-r--r--examples/jenkins-app/src/main/unix/files/root/bin/jenkins27
-rw-r--r--examples/jenkins-app/src/main/unix/files/root/etc/app.conf1
3 files changed, 104 insertions, 0 deletions
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 @@
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>io.trygvis.appsh</groupId>
+ <artifactId>appsh-parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <groupId>io.trygvis.appsh.examples</groupId>
+ <artifactId>jenkins</artifactId>
+ <packaging>unix-zip</packaging>
+ <dependencies>
+ <dependency>
+ <groupId>org.jenkins-ci.main</groupId>
+ <artifactId>jenkins-war</artifactId>
+ <version>1.486</version>
+ <type>war</type>
+ </dependency>
+ </dependencies>
+ <repositories>
+ <repository>
+ <id>jenkins</id>
+ <url>http://repo.jenkins-ci.org/public/</url>
+ </repository>
+ </repositories>
+ <build>
+ <plugins>
+ <!--
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>appassembler-maven-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
+ <execution>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>assemble</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <programs>
+ <program>
+ <name>jenkins</name>
+ <mainClass></mainClass>
+ </program>
+ </programs>
+ </configuration>
+ </plugin>
+ -->
+ <plugin>
+ <groupId>no.arktekk.unix</groupId>
+ <artifactId>unix-maven-plugin</artifactId>
+ <version>1.0-alpha-6</version>
+ <extensions>true</extensions>
+ <configuration>
+ <contact>Trygve Laugstol</contact>
+ <assembly>
+ <!--
+ <copyDirectory>
+ <from>target/appassembler</from>
+ <to>root</to>
+ <excludes>
+ <exclude>**/*.bat</exclude>
+ </excludes>
+ </copyDirectory>
+ -->
+ <copyArtifact>
+ <artifact>org.jenkins-ci.main:jenkins-war:war</artifact>
+ <toFile>root/wars/jenkins.war</toFile>
+ </copyArtifact>
+ </assembly>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
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