[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] merge changes from updated package
Holger Levsen
gitlab at salsa.debian.org
Sat May 11 15:39:27 BST 2019
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
63159924 by Holger Levsen at 2019-05-11T14:39:11Z
merge changes from updated package
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
1 changed file:
- hosts/jenkins/etc/init.d/jenkins
Changes:
=====================================
hosts/jenkins/etc/init.d/jenkins
=====================================
@@ -26,8 +26,6 @@ DAEMON=/usr/bin/daemon
DAEMON_ARGS="--name=$NAME --inherit --env=JENKINS_HOME=$JENKINS_HOME --output=$JENKINS_LOG --pidfile=$PIDFILE"
JAVA=`type -p java`
-JAVA_ALLOWED_VERSION="18"
-
if [ -n "$UMASK" ]; then
DAEMON_ARGS="$DAEMON_ARGS --umask=$UMASK"
fi
@@ -56,10 +54,12 @@ if [ -z "$JAVA" ]; then
exit 1
fi
+# Which Java versions can be used to run Jenkins
+JAVA_ALLOWED_VERSIONS=( "18" "110" )
# Work out the JAVA version we are working with:
-JAVA_VERSION=$($JAVA -version 2>&1 | sed -n ';s/.* version "\(.*\)\.\(.*\)\..*"/\1\2/p;')
+JAVA_VERSION=$($JAVA -version 2>&1 | sed -n ';s/.* version "\(.*\)\.\(.*\)\..*".*/\1\2/p;')
-if [ "$JAVA_VERSION" = "$JAVA_ALLOWED_VERSION" ]; then
+if [[ ${JAVA_ALLOWED_VERSIONS[*]} =~ "$JAVA_VERSION" ]]; then
echo "Correct java version found" >&2
else
echo "Found an incorrect Java version" >&2
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/631599242103d2094dff07d3d619f879ae71efa0
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/631599242103d2094dff07d3d619f879ae71efa0
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20190511/2de458df/attachment-0001.html>
More information about the Qa-jenkins-scm
mailing list