[Qa-jenkins-scm] [jenkins.debian.net] 01/01: d-i: pass non_{po, pdf}_langs as params to aid checking manuals

Holger Levsen holger at layer-acht.org
Wed Jan 25 10:56:10 UTC 2017


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit fc52c12a31b7abe3c7033462156dbab514210c82
Author: Philip Hands <phil at hands.com>
Date:   Wed Jan 25 11:50:18 2017 +0100

    d-i: pass non_{po,pdf}_langs as params to aid checking manuals
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 bin/d-i_check_jobs.sh | 18 +++++++++++++-----
 job-cfg/d-i.yaml.py   |  2 +-
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/bin/d-i_check_jobs.sh b/bin/d-i_check_jobs.sh
index 49f0ef2..90978b9 100755
--- a/bin/d-i_check_jobs.sh
+++ b/bin/d-i_check_jobs.sh
@@ -7,6 +7,11 @@ DEBUG=false
 . /srv/jenkins/bin/common-functions.sh
 common_init "$@"
 
+# 1st param is a : separated list of the non_po_langs
+NON_PO_LANGS=$1 ; shift
+# 2nd param is a : separated list of the non_pdf_langs
+NON_PDF_LANGS=$1 ; shift
+
 #
 # define some variables
 #
@@ -138,11 +143,14 @@ for DIRECTORY in * ; do
 		continue
 	else
 		for FORMAT in pdf html ; do
-			if [ $FORMAT = pdf ] ; then
-				# Some languages are unsupported in PDF
-				case $DIRECTORY in
-					el|ja|vi|zh_CN|zh_TW) continue ;;
-				esac
+			# Some languages are unsupported in PDF
+			if [ $FORMAT = pdf ] && 
+			   expr match ${NON_PDF_LANGS} ".*\b${$DIRECTORY}\b" >/dev/null ; then
+				continue ;;
+			fi
+			# we add a _po2xml suffix for all but the NON_PO_LANGS
+			if ! expr match ${NON_PO_LANGS} ".*\b${$DIRECTORY}\b" >/dev/null ; then
+				FORMAT=${FORMAT}_po2xml
 			fi
 			if [ ! -d ~jenkins/jobs/${DI_MANUAL_JOB_PATTERN}${DIRECTORY}_${FORMAT} ] ; then
 				echo "Warning: No build job '${DI_MANUAL_JOB_PATTERN}${DIRECTORY}_${FORMAT}'."
diff --git a/job-cfg/d-i.yaml.py b/job-cfg/d-i.yaml.py
index 574c94e..f34413b 100755
--- a/job-cfg/d-i.yaml.py
+++ b/job-cfg/d-i.yaml.py
@@ -395,7 +395,7 @@ data.append(
         'name': '{name}_check_jenkins_jobs',
         'description': 'Checks daily for missing jenkins jobs. {do_not_edit}',
         'triggers': [{'timed': '23 0 * * *'}],
-        'builders': [{'shell': '/srv/jenkins/bin/d-i_check_jobs.sh'}],
+        'builders': [{'shell': '{0} "{1}" "{2}"'.format('/srv/jenkins/bin/d-i_check_jobs.sh', ':'.join(non_po_langs), ':'.join(non_pdf_langs))}],
         'publishers': [
             {'logparser': {'parse-rules': '/srv/jenkins/logparse/debian.rules',
                            'unstable-on-warning': 'true',

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list