summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Rüger <mrueg@gentoo.org>2014-10-20 21:24:10 +0000
committerManuel Rüger <mrueg@gentoo.org>2014-10-20 21:24:10 +0000
commitdf6f70251023f046d522e4d6b7f6faa9e639a308 (patch)
tree4ff9074249d19dadf8c9283558aa675b73098861 /dev-util/jenkins-bin
parentVersion bump. (diff)
downloadgentoo-2-df6f70251023f046d522e4d6b7f6faa9e639a308.tar.gz
gentoo-2-df6f70251023f046d522e4d6b7f6faa9e639a308.tar.bz2
gentoo-2-df6f70251023f046d522e4d6b7f6faa9e639a308.zip
Initial commit. Original ebuild and initfiles from godin-overlay. Added some minor fixes.
(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key )
Diffstat (limited to 'dev-util/jenkins-bin')
-rw-r--r--dev-util/jenkins-bin/ChangeLog10
-rw-r--r--dev-util/jenkins-bin/files/jenkins-bin.confd62
-rw-r--r--dev-util/jenkins-bin/files/jenkins-bin.init53
-rw-r--r--dev-util/jenkins-bin/jenkins-bin-1.584.ebuild40
-rw-r--r--dev-util/jenkins-bin/metadata.xml12
5 files changed, 177 insertions, 0 deletions
diff --git a/dev-util/jenkins-bin/ChangeLog b/dev-util/jenkins-bin/ChangeLog
new file mode 100644
index 000000000000..c6e200cd5fd9
--- /dev/null
+++ b/dev-util/jenkins-bin/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for dev-util/jenkins-bin
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/jenkins-bin/ChangeLog,v 1.1 2014/10/20 21:24:10 mrueg Exp $
+
+*jenkins-bin-1.584 (20 Oct 2014)
+
+ 20 Oct 2014; Manuel Rüger <mrueg@gentoo.org> +files/jenkins-bin.confd,
+ +files/jenkins-bin.init, +jenkins-bin-1.584.ebuild, +metadata.xml:
+ Initial commit. Original ebuild and initfiles from godin-overlay. Added some
+ minor fixes.
diff --git a/dev-util/jenkins-bin/files/jenkins-bin.confd b/dev-util/jenkins-bin/files/jenkins-bin.confd
new file mode 100644
index 000000000000..f84e3463e359
--- /dev/null
+++ b/dev-util/jenkins-bin/files/jenkins-bin.confd
@@ -0,0 +1,62 @@
+# Config file for /etc/init.d/jenkins
+
+#
+# Directory where Jenkins store its configuration and working
+# files (checkouts, build reports, artifacts, ...).
+#
+JENKINS_HOME="/var/lib/jenkins/home"
+
+#
+# Options to pass to java when running Jenkins.
+#
+JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true"
+
+#
+# Port Jenkins is listening on.
+#
+JENKINS_PORT="8080"
+
+#
+# Debug level for logs -- the higher the value, the more verbose.
+# 5 is INFO.
+#
+JENKINS_DEBUG_LEVEL="5"
+
+#
+# Whether to enable access logging or not.
+#
+JENKINS_ENABLE_ACCESS_LOG="no"
+
+#
+# Maximum number of HTTP worker threads.
+#
+JENKINS_HANDLER_MAX="100"
+
+#
+# Maximum number of idle HTTP worker threads.
+#
+JENKINS_HANDLER_IDLE="20"
+
+#
+# Pass arbitrary arguments to Jenkins.
+# Eg.: --httpListenAddress=127.0.0.1 --prefix=/jenkins
+# Full option list: java -jar jenkins.war --help
+#
+JENKINS_ARGS=""
+
+#
+# User
+#
+JENKINS_USER=jenkins
+
+
+
+#
+# Pid File
+#
+JENKINS_PIDFILE="/var/run/jenkins.pid"
+
+#
+# War File
+#
+JENKINS_WAR="/opt/jenkins/jenkins.war"
diff --git a/dev-util/jenkins-bin/files/jenkins-bin.init b/dev-util/jenkins-bin/files/jenkins-bin.init
new file mode 100644
index 000000000000..f66cb308d460
--- /dev/null
+++ b/dev-util/jenkins-bin/files/jenkins-bin.init
@@ -0,0 +1,53 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+ use dns logger mysql postgresql
+}
+
+checkconfig() {
+ if [ ! -n "$JENKINS_HOME" ] ; then
+ eerror "JENKINS_HOME not configured"
+ return 1
+ fi
+ if [ ! -d "$JENKINS_HOME" ] ; then
+ eerror "JENKINS_HOME directory does not exist: $JENKINS_HOME"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+
+ JAVA_HOME=`java-config --jre-home`
+ COMMAND=$JAVA_HOME/bin/java
+
+ JAVA_PARAMS="$JENKINS_JAVA_OPTIONS -DJENKINS_HOME=$JENKINS_HOME -jar $JENKINS_WAR"
+
+ # Don't use --daemon here, because in this case stop will not work
+ PARAMS="--logfile=/var/log/jenkins/jenkins.log"
+ [ -n "$JENKINS_PORT" ] && PARAMS="$PARAMS --httpPort=$JENKINS_PORT"
+ [ -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
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --quiet --background \
+ --make-pidfile --pidfile $JENKINS_PIDFILE \
+ --user ${JENKINS_USER} \
+ --exec "${COMMAND}" -- $JAVA_PARAMS $PARAMS
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --pidfile $JENKINS_PIDFILE
+ eend $?
+}
diff --git a/dev-util/jenkins-bin/jenkins-bin-1.584.ebuild b/dev-util/jenkins-bin/jenkins-bin-1.584.ebuild
new file mode 100644
index 000000000000..46b1da8c5af4
--- /dev/null
+++ b/dev-util/jenkins-bin/jenkins-bin-1.584.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/jenkins-bin/jenkins-bin-1.584.ebuild,v 1.1 2014/10/20 21:24:10 mrueg Exp $
+
+EAPI=5
+
+inherit user
+
+DESCRIPTION="Extensible continuous integration server"
+HOMEPAGE="http://jenkins-ci.org/"
+LICENSE="MIT"
+SRC_URI="http://mirrors.jenkins-ci.org/war/${PV}/${PN/-bin/}.war -> ${P}.war"
+RESTRICT="mirror"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="media-fonts/dejavu"
+RDEPEND="${DEPEND}
+ >=virtual/jdk-1.5"
+
+S=${WORKDIR}
+
+pkg_setup() {
+ enewgroup jenkins
+ enewuser jenkins -1 /bin/bash /var/lib/jenkins jenkins
+}
+
+src_install() {
+ keepdir /var/run/jenkins /var/log/jenkins
+ keepdir /var/lib/jenkins/home /var/lib/jenkins/backup
+
+ insinto /opt/jenkins
+ newins "${DISTDIR}"/${P}.war ${PN/-bin/}.war
+
+ newinitd "${FILESDIR}"${PN}.init jenkins
+ newconfd "${FILESDIR}"${PN}.confd jenkins
+
+ fowners jenkins:jenkins /var/run/jenkins /var/log/jenkins /var/lib/jenkins /var/lib/jenkins/home /var/lib/jenkins/backup
+}
diff --git a/dev-util/jenkins-bin/metadata.xml b/dev-util/jenkins-bin/metadata.xml
new file mode 100644
index 000000000000..858224bb4838
--- /dev/null
+++ b/dev-util/jenkins-bin/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mrueg@gentoo.org</email>
+ <name>Manuel Rüger</name>
+ </maintainer>
+ <maintainer>
+ <email>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+</pkgmetadata>