summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2012-11-20 02:31:16 +0100
committerHolger Levsen <holger@layer-acht.org>2012-11-20 02:31:16 +0100
commitef9ed61ff77b33718a24d0601c63313ec8eb4373 (patch)
tree108915f462460a57829f640ed3848c0c2d0ce440
parent5d4bcb4808b78fe989b9c955d7ab23e0075a60b4 (diff)
downloadjenkins.debian.net-ef9ed61ff77b33718a24d0601c63313ec8eb4373.tar.xz
add support for building language variants of the manual from po files. and add first such job
-rwxr-xr-xbin/d-i_manual.sh27
-rwxr-xr-xbin/email2irc.sh2
-rw-r--r--job-cfg/d-i.yaml55
-rwxr-xr-xupdate_jdn.sh2
4 files changed, 83 insertions, 3 deletions
diff --git a/bin/d-i_manual.sh b/bin/d-i_manual.sh
index 4ecdba59..ba50b3d8 100755
--- a/bin/d-i_manual.sh
+++ b/bin/d-i_manual.sh
@@ -40,6 +40,17 @@ pdebuild_package() {
#
cd manual
pdebuild --use-pdebuild-internal
+ cd ..
+}
+
+po2xml() {
+ cd manual
+ ./scripts/merge_xml $1
+ ./scripts/update_pot
+ ./scripts/update_po $1
+ ./scripts/revert_pot
+ ./scripts/create_xml $1
+ cd ..
}
build_language() {
@@ -57,6 +68,13 @@ build_language() {
make languages=$1 architectures=$ARCH destination=../../$FORMAT/ formats=$FORMAT
fi
done
+ cd ../..
+ svn revert manual -R
+}
+
+po_cleanup() {
+ echo "Cleanup generated files:"
+ rm -rv manual/$1 manual/integrated
}
init_workspace
@@ -64,6 +82,7 @@ init_workspace
# if $1 is not given, build the whole manual,
# else just the language $1 in format $2
#
+# FIXME: use variable names
if [ "$1" = "" ] ; then
pdebuild_package
else
@@ -71,5 +90,11 @@ else
echo "Error: need format too."
exit 1
fi
- build_language $1 $2
+ if [ "$3" = "" ] ; then
+ build_language $1 $2
+ else
+ po2xml $1
+ build_language $1 $2
+ po_cleanup $1
+ fi
fi
diff --git a/bin/email2irc.sh b/bin/email2irc.sh
index 83c4edfc..3c02a71f 100755
--- a/bin/email2irc.sh
+++ b/bin/email2irc.sh
@@ -53,4 +53,4 @@ else
echo -e "----------\nbad luck\n-----------" >> /var/lib/jenkins/email_log
fi
-
+# FIXME /var/lib/jenkins/email_log will grow and grow
diff --git a/job-cfg/d-i.yaml b/job-cfg/d-i.yaml
index f040fb6d..6167c18e 100644
--- a/job-cfg/d-i.yaml
+++ b/job-cfg/d-i.yaml
@@ -73,6 +73,55 @@
recipients: jenkins+debian-boot holger@layer-acht.org
- defaults:
+ name: d-i-manual-html-po2xml
+ project-type: freestyle
+ logrotate:
+ daysToKeep: 90
+ numToKeep: 50
+ artifactDaysToKeep: -1
+ artifactNumToKeep: -1
+ properties:
+ - sidebar:
+ url: http://jenkins.debian.net/userContent/about.html
+ text: About jenkins.debian.net
+ icon: /userContent/images/debian-swirl-24x24.png
+ - sidebar:
+ url: http://jenkins.debian.net/view/d-i_manual/
+ text: debian-installer manual jobs
+ icon: /userContent/images/debian-jenkins-24x24.png
+ - sidebar:
+ url: http://www.profitbricks.com
+ text: Sponsored by Profitbricks
+ icon: /userContent/images/profitbricks-24x24.png
+ description: 'Builds the {languagename} html version of the installation-guide for all architectures. Triggered by SVN commits to <code>svn://svn.debian.org/svn/d-i/trunk/manual/{lang}/<code>. After successful build <a href="http://jenkins.debian.net/job/d-i_manual_{lang}_html">d-i_manual_{lang}_pdf</a> is triggered. {do_not_edit}'
+ scm:
+ - svn:
+ url: svn://svn.debian.org/svn/d-i/trunk
+ basedir: .
+ workspaceupdater: update
+ includedRegions: '/trunk/manual/po/{lang}/.*'
+ excludedRegions: ''
+ excludedUsers: ''
+ excludedRevprop: ''
+ excludedCommitMessages: ''
+ viewvc-url: http://anonscm.debian.org/viewvc/d-i/trunk
+ builders:
+ - shell: '/srv/jenkins/bin/d-i_manual.sh {lang} html po2xml'
+ triggers:
+ - pollscm: "*/30 * * * *"
+ - logparser:
+ rulespath: '/srv/jenkins/logparse/debian.rules'
+ unstable_on_warning: 'true'
+ fail_on_error: 'true'
+ - htmlpublisher:
+ name: 'd-i_manual_{lang}.html'
+ directory: 'html'
+ indexfiles: ''
+ keepall: False
+ - email:
+ recipients: jenkins+debian-boot holger@layer-acht.org
+
+- defaults:
name: d-i-manual-pdf
project-type: freestyle
logrotate:
@@ -244,6 +293,9 @@
defaults: d-i-manual-html
name: '{name}_manual_pt_BR_html'
- job-template:
+ defaults: d-i-manual-html-po2xml
+ name: '{name}_manual_pt_html'
+- job-template:
defaults: d-i-manual-pdf
name: '{name}_manual_ca_pdf'
- job-template:
@@ -646,6 +698,9 @@
- '{name}_manual_pt_BR_html':
lang: 'pt_BR'
languagename: 'Brazilian Portuguese'
+ - '{name}_manual_pt_html':
+ lang: 'pt'
+ languagename: 'Portuguese'
- '{name}_manual_ca_pdf':
lang: 'ca'
languagename: 'Catalan'
diff --git a/update_jdn.sh b/update_jdn.sh
index 3250621a..fdafbd49 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -25,7 +25,7 @@ done
#
sudo apt-get install vim screen less etckeeper moreutils curl mtr-tiny dstat devscripts bash-completion shorewall shorewall6 cron-apt apt-listchanges munin calamaris visitors \
build-essential python-setuptools \
- debootstrap sudo figlet graphviz apache2 python-yaml python-pip mr subversion subversion-tools vnstat webcheck procmail libjson-rpc-perl
+ debootstrap sudo figlet graphviz apache2 python-yaml python-pip mr subversion subversion-tools vnstat webcheck procmail libjson-rpc-perl poxml
explain "Packages installed."
#