summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/reproducible_html_notes.sh36
-rw-r--r--job-cfg/reproducible.yaml43
2 files changed, 53 insertions, 26 deletions
diff --git a/bin/reproducible_html_notes.sh b/bin/reproducible_html_notes.sh
index 202dd083..ee7c16e6 100755
--- a/bin/reproducible_html_notes.sh
+++ b/bin/reproducible_html_notes.sh
@@ -9,34 +9,19 @@ common_init "$@"
# common code defining db access
. /srv/jenkins/bin/reproducible_common.sh
-# FIXME: move to daily cleanup job
-# cp db away for backup purposes
-cp $PACKAGES_DB /var/lib/jenkins/userContent/reproducible.db
-
set +x
init_html
#
-# update git
+# this files are from the git repo cloned by the job-cfg
+# on changes, this job is triggered
#
-
-WORKSPACE=$PWD
-cd /var/lib/jenkins
-if [ -d notes.git ] ; then
- cd notes.git
- git pull
-else
- git clone git://git.debian.org/git/reproducible/notes.git notes.git
-fi
-cd $WORKSPACE
+PACKAGES_YML=$PWD/packages.yml
+ISSUES_YML=$PWD/issues.yml
#
# declare some variables
#
-
-PACKAGES_YML=/var/lib/jenkins/notes.git/packages.yml
-ISSUES_YML=/var/lib/jenkins/notes.git/issues.yml
-
declare -A NOTES_VERSION
declare -A NOTES_ISSUES
declare -A NOTES_BUGS
@@ -47,7 +32,6 @@ declare -A ISSUES_URL
#
# declare some functions only used for dealing with notes
#
-
show_multi_values() {
TMPFILE=$(mktemp)
echo "$@" > $TMPFILE
@@ -113,6 +97,10 @@ issues_loop() {
rm $TTMPFILE
}
+write_meta_note() {
+ write_page "<p>Notes are stored in <a href=\"https://anonscm.debian.org/cgit/reproducible/notes.git\">notes.git</a>.</p>"
+}
+
create_pkg_note() {
BUG=false
rm -f $PAGE
@@ -149,7 +137,7 @@ create_pkg_note() {
fi
write_page "<tr><td colspan=\"3\">&nbsp;</td></tr>"
write_page "<tr><td colspan=\"3\" style=\"text-align:right; font-size:0.9em;\">"
- write_page "Notes are stored in <a href=\"https://anonscm.debian.org/cgit/reproducible/notes.git\">notes.git</a>."
+ write_meta_note
write_page "</td></tr></table>"
write_page_footer
}
@@ -191,7 +179,7 @@ create_issue() {
write_page "</td></tr>"
write_page "<tr><td colspan=\"3\">&nbsp;</td></tr>"
write_page "<tr><td colspan=\"3\" style=\"text-align:right; font-size:0.9em;\">"
- write_page "Notes are stored in <a href=\"https://anonscm.debian.org/cgit/reproducible/notes.git\">notes.git</a>."
+ write_meta_note
write_page "</td></tr></table>"
write_page_meta_sign
write_page_footer
@@ -330,7 +318,7 @@ if $VALID_YAML ; then
else
write_page "<p style=\"font-size:1.5em; color: red;\">Broken .yaml files in notes.git could not be parsed, please investigate and fix!</p>"
fi
-write_page "<p style=\"font-size:0.9em;\">Notes are stored in <a href=\"https://anonscm.debian.org/cgit/reproducible/notes.git\">notes.git</a>.</p>"
+write_meta_note
write_page_meta_sign
write_page_footer
publish_page
@@ -352,7 +340,7 @@ if $VALID_YAML ; then
else
write_page "<p style=\"font-size:1.5em; color: red;\">Broken .yaml files in notes.git could not be parsed, please investigate and fix!</p>"
fi
-write_page "<p style=\"font-size:0.9em;\">Notes are stored in <a href=\"https://anonscm.debian.org/cgit/reproducible/notes.git\">notes.git</a>.</p>"
+write_meta_note
write_page_footer
publish_page
diff --git a/job-cfg/reproducible.yaml b/job-cfg/reproducible.yaml
index 1b830a2a..d1b4313f 100644
--- a/job-cfg/reproducible.yaml
+++ b/job-cfg/reproducible.yaml
@@ -33,6 +33,45 @@
fail-on-error: 'true'
- defaults:
+ name: reproducible_notes
+ project-type: freestyle
+ properties:
+ - sidebar:
+ url: https://jenkins.debian.net/userContent/about.html
+ text: About jenkins.debian.net
+ icon: /userContent/images/debian-swirl-24x24.png
+ - sidebar:
+ url: https://jenkins.debian.net/view/reproducible
+ text: reproducible builds 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: '{my_description}<br>Job configuration source is <a href="http://anonscm.debian.org/cgit/qa/jenkins.debian.net.git/tree/job-cfg/reproducible.yaml">reproducible.yaml</a>.<br>Results are available at the <a href="https://jenkins.debian.net/userContent/reproducible.html">reproducible builds overview</a> pages.'
+ logrotate:
+ daysToKeep: 365
+ numToKeep: 100
+ artifactDaysToKeep: -1
+ artifactNumToKeep: -1
+ builders:
+ - shell: '{my_shell}'
+ publishers:
+ - email:
+ recipients: 'jenkins+debian-reproducible holger@layer-acht.org'
+ - logparser:
+ parse-rules: '/srv/jenkins/logparse/reproducible.rules'
+ unstable-on-warning: 'true'
+ fail-on-error: 'true'
+ scm:
+ - git:
+ url: '{my_gitrepo}'
+ branches:
+ - master
+ triggers:
+ - pollscm: "*/6 * * * *"
+
+- defaults:
name: reproducible_builder
triggers:
- timed: "{my_timed}"
@@ -93,7 +132,7 @@
name: '{name}_html_dd_list'
- job-template:
- defaults: reproducible
+ defaults: reproducible_notes
name: '{name}_html_notes'
- job-template:
@@ -133,7 +172,7 @@
my_shell: '/srv/jenkins/bin/reproducible_html_dd_list.sh'
- '{name}_html_notes':
my_description: 'Generates HTML results (notes) for reproducible builds, triggered by changes to the notes.git repository.'
- my_timed: ''
+ my_gitrepo: 'git://git.debian.org/git/reproducible/notes.git'
my_shell: '/srv/jenkins/bin/reproducible_html_notes.sh'
- '{name}_builder_alpha':
my_description: 'Try to reproducibly build a scheduled package. This is one of several builder jobs.'