summaryrefslogtreecommitdiff
path: root/jenkins
diff options
context:
space:
mode:
authorJose V Beneyto <jose.beneyto@eslife.es>2015-02-20 15:19:55 +0000
committerJose V Beneyto <jose.beneyto@eslife.es>2015-02-20 15:20:08 +0000
commit5a1977d4a572f549ce51fc5e091efb6e901aa3ca (patch)
treea50ce7868cd9bbcba2c872d90e035cf43b6a09a4 /jenkins
parentadf2b4151eb1e22b05912136978a692a2716a9b5 (diff)
downloadcontrib-5a1977d4a572f549ce51fc5e091efb6e901aa3ca.tar.gz
contrib-5a1977d4a572f549ce51fc5e091efb6e901aa3ca.tar.xz
jenkins: initial import
Diffstat (limited to 'jenkins')
-rw-r--r--jenkins/.footprint16
-rw-r--r--jenkins/.md5sum3
-rw-r--r--jenkins/Pkgfile18
-rw-r--r--jenkins/jenkins.conf142
-rw-r--r--jenkins/jenkins.rc47
-rw-r--r--jenkins/pre-install10
6 files changed, 236 insertions, 0 deletions
diff --git a/jenkins/.footprint b/jenkins/.footprint
new file mode 100644
index 000000000..444a6ffe9
--- /dev/null
+++ b/jenkins/.footprint
@@ -0,0 +1,16 @@
+drwxr-xr-x root/root etc/
+drwxr-xr-x root/root etc/rc.d/
+-rwxr-xr-x root/root etc/rc.d/jenkins
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/etc/
+-rw-r--r-- root/root usr/etc/jenkins.conf
+drwxr-xr-x root/root usr/lib/
+drwxr-xr-x root/root usr/lib/jenkins/
+-r--r--r-- root/root usr/lib/jenkins/jenkins.war
+drwxr-xr-x root/root var/
+drwxr-xr-x root/root var/cache/
+drwxr-xr-x jenkins/jenkins var/cache/jenkins/
+drwxr-xr-x root/root var/lib/
+drwxr-xr-x jenkins/jenkins var/lib/jenkins/
+drwxr-xr-x root/root var/log/
+drwxr-xr-x jenkins/jenkins var/log/jenkins/
diff --git a/jenkins/.md5sum b/jenkins/.md5sum
new file mode 100644
index 000000000..24a4c94e4
--- /dev/null
+++ b/jenkins/.md5sum
@@ -0,0 +1,3 @@
+9a39a724f6de3fb4da9d01c672a05345 jenkins.conf
+f9667704d220576e2ff3f30b74982c99 jenkins.rc
+2a2c23c24b0295e52a28c56ed8abcdfb jenkins.war
diff --git a/jenkins/Pkgfile b/jenkins/Pkgfile
new file mode 100644
index 000000000..60b06dc8b
--- /dev/null
+++ b/jenkins/Pkgfile
@@ -0,0 +1,18 @@
+# Description: An extensible open source continuous integration server
+# URL: http://jenkins-ci.org/
+# Maintainer: Jose V Beneyto, sepen at crux dot nu
+# Packager: Jose V Beneyto, sepen at crux dot nu
+# Depends on: jdk
+
+name=jenkins
+version=1.599
+release=1
+source=(http://mirrors.jenkins-ci.org/war/$version/$name.war \
+ $name.rc $name.conf)
+
+build() {
+ install -D -m 0444 $name.war $PKG/usr/lib/$name/$name.war
+ install -D -m 0644 $name.conf $PKG/usr/etc/$name.conf
+ install -D -m 0755 $name.rc $PKG/etc/rc.d/$name
+ install -d -m 0755 -o $name -g $name $PKG/var/{cache,lib,log}/$name
+}
diff --git a/jenkins/jenkins.conf b/jenkins/jenkins.conf
new file mode 100644
index 000000000..caa240d71
--- /dev/null
+++ b/jenkins/jenkins.conf
@@ -0,0 +1,142 @@
+## Path: Development/Jenkins
+## Description: Configuration for the Jenkins continuous build server
+## Type: string
+## Default: "/var/lib/jenkins"
+## ServiceRestart: jenkins
+#
+# Directory where Jenkins store its configuration and working
+# files (checkouts, build reports, artifacts, ...).
+#
+JENKINS_HOME="/var/lib/jenkins"
+
+## Type: string
+## Default: "jenkins"
+## ServiceRestart: jenkins
+#
+# Unix user account that runs the Jenkins daemon
+# Be careful when you change this, as you need to update
+# permissions of $JENKINS_HOME and /var/log/jenkins.
+#
+JENKINS_USER="jenkins"
+
+## Type: string
+## Default: "-Djava.awt.headless=true"
+## ServiceRestart: jenkins
+#
+# Options to pass to java when running Jenkins.
+#
+JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Dorg.apache.commons.jelly.tags.fmt.timeZone=Europe/Madrid"
+
+## Type: integer(0:65535)
+## Default: 8080
+## ServiceRestart: jenkins
+#
+# Port Jenkins is listening on.
+# Set to -1 to disable
+#
+JENKINS_PORT="8080"
+
+## Type: string
+## Default: ""
+## ServiceRestart: jenkins
+#
+# IP address Jenkins listens on for HTTP requests.
+# Default is all interfaces (0.0.0.0).
+#
+JENKINS_LISTEN_ADDRESS=""
+
+## Type: integer(0:65535)
+## Default: ""
+## ServiceRestart: jenkins
+#
+# HTTPS port Jenkins is listening on.
+# Default is disabled.
+#
+JENKINS_HTTPS_PORT=""
+
+## Type: string
+## Default: ""
+## ServiceRestart: jenkins
+#
+# Path to the keystore in JKS format (as created by the JDK 'keytool').
+# Default is disabled.
+#
+JENKINS_HTTPS_KEYSTORE=""
+
+## Type: string
+## Default: ""
+## ServiceRestart: jenkins
+#
+# Password to access the keystore defined in JENKINS_HTTPS_KEYSTORE.
+# Default is disabled.
+#
+JENKINS_HTTPS_KEYSTORE_PASSWORD=""
+
+## Type: string
+## Default: ""
+## ServiceRestart: jenkins
+#
+# IP address Jenkins listens on for HTTPS requests.
+# Default is disabled.
+#
+JENKINS_HTTPS_LISTEN_ADDRESS=""
+
+## Type: integer(0:65535)
+## Default: 8009
+## ServiceRestart: jenkins
+#
+# Ajp13 Port Jenkins is listening on.
+# Set to -1 to disable
+#
+JENKINS_AJP_PORT="-1"
+
+## Type: string
+## Default: ""
+## ServiceRestart: jenkins
+#
+# IP address Jenkins listens on for Ajp13 requests.
+# Default is all interfaces (0.0.0.0).
+#
+JENKINS_AJP_LISTEN_ADDRESS=""
+
+## Type: integer(1:9)
+## Default: 5
+## ServiceRestart: jenkins
+#
+# Debug level for logs -- the higher the value, the more verbose.
+# 5 is INFO.
+#
+JENKINS_DEBUG_LEVEL="5"
+
+## Type: yesno
+## Default: no
+## ServiceRestart: jenkins
+#
+# Whether to enable access logging or not.
+#
+JENKINS_ENABLE_ACCESS_LOG="no"
+
+## Type: integer
+## Default: 100
+## ServiceRestart: jenkins
+#
+# Maximum number of HTTP worker threads.
+#
+JENKINS_HANDLER_MAX="100"
+
+## Type: integer
+## Default: 20
+## ServiceRestart: jenkins
+#
+# Maximum number of idle HTTP worker threads.
+#
+JENKINS_HANDLER_IDLE="20"
+
+## Type: string
+## Default: ""
+## ServiceRestart: jenkins
+#
+# Pass arbitrary arguments to Jenkins.
+# Full option list: java -jar jenkins.war --help
+#
+JENKINS_ARGS=""
diff --git a/jenkins/jenkins.rc b/jenkins/jenkins.rc
new file mode 100644
index 000000000..cd6fbf8b4
--- /dev/null
+++ b/jenkins/jenkins.rc
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+JENKINS_WAR="/usr/lib/jenkins/jenkins.war"
+JENKINS_CONFIG="/usr/etc/jenkins.conf"
+JENKINS_PID_FILE="/var/run/jenkins.pid"
+
+[ -f "$JENKINS_CONFIG" ] && . "$JENKINS_CONFIG"
+
+JAVA_CMD="/usr/bin/java $JENKINS_JAVA_OPTIONS -DJENKINS_HOME=$JENKINS_HOME -jar $JENKINS_WAR"
+PARAMS="--daemon --logfile=/var/log/jenkins/jenkins.log --webroot=/var/cache/jenkins"
+[ -n "$JENKINS_PORT" ] && PARAMS="$PARAMS --httpPort=$JENKINS_PORT"
+[ -n "$JENKINS_LISTEN_ADDRESS" ] && PARAMS="$PARAMS --httpListenAddress=$JENKINS_LISTEN_ADDRESS"
+[ -n "$JENKINS_HTTPS_PORT" ] && PARAMS="$PARAMS --httpsPort=$JENKINS_HTTPS_PORT"
+[ -n "$JENKINS_HTTPS_KEYSTORE" ] && PARAMS="$PARAMS --httpsKeyStore=$JENKINS_HTTPS_KEYSTORE"
+[ -n "$JENKINS_HTTPS_KEYSTORE_PASSWORD" ] && PARAMS="$PARAMS --httpsKeyStorePassword='$JENKINS_HTTPS_KEYSTORE_PASSWORD'"
+[ -n "$JENKINS_HTTPS_LISTEN_ADDRESS" ] && PARAMS="$PARAMS --httpsListenAddress=$JENKINS_HTTPS_LISTEN_ADDRESS"
+[ -n "$JENKINS_AJP_PORT" ] && PARAMS="$PARAMS --ajp13Port=$JENKINS_AJP_PORT"
+[ -n "$JENKINS_AJP_LISTEN_ADDRESS" ] && PARAMS="$PARAMS --ajp13ListenAddress=$JENKINS_AJP_LISTEN_ADDRESS"
+[ -n "$JENKINS_DEBUG_LEVEL" ] && PARAMS="$PARAMS --debug=$JENKINS_DEBUG_LEVEL"
+[ -n "$JENKINS_HANDLER_STARTUP" ] && PARAMS="$PARAMS --handlerCountStartup=$JENKINS_HANDLER_STARTUP"
+[ -n "$JENKINS_HANDLER_MAX" ] && PARAMS="$PARAMS --handlerCountMax=$JENKINS_HANDLER_MAX"
+[ -n "$JENKINS_HANDLER_IDLE" ] && PARAMS="$PARAMS --handlerCountMaxIdle=$JENKINS_HANDLER_IDLE"
+[ -n "$JENKINS_ARGS" ] && PARAMS="$PARAMS $JENKINS_ARGS"
+
+if [ "$JENKINS_ENABLE_ACCESS_LOG" = "yes" ]; then
+ PARAMS="$PARAMS --accessLoggerClassName=winstone.accesslog.SimpleAccessLogger --simpleAccessLogger.format=combined --simpleAccessLogger.file=/var/log/jenkins/access_log"
+fi
+
+case $1 in
+ start)
+ /usr/bin/su -c "$JAVA_CMD $PARAMS >/dev/null" jenkins
+ /usr/bin/pgrep -a java | grep jenkins | cut -d' ' -f1 >$JENKINS_PID_FILE
+ ;;
+ stop)
+ kill -9 $(cat $JENKINS_PID_FILE) 2>/dev/null
+ ;;
+ restart)
+ $0 stop
+ sleep 2
+ $0 start
+ ;;
+ *)
+ echo "Usage: $0 [start|stop|restart]"
+ ;;
+esac
+
+# End of file
diff --git a/jenkins/pre-install b/jenkins/pre-install
new file mode 100644
index 000000000..8a4595c08
--- /dev/null
+++ b/jenkins/pre-install
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+user="jenkins"
+group="jenkins"
+home="/var/lib/$user"
+
+/usr/bin/getent group $group >/dev/null || /usr/sbin/groupadd $group
+/usr/bin/getent passwd $user >/dev/null || /usr/sbin/useradd -s /sbin/nologin -d $home -g $group $user
+
+# End of file

Generated by cgit