From 8fd9cf9242af9ff997f63948daa8c360eb991691 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 18 Oct 2014 01:28:30 +0200 Subject: reproducible: refactor, let jenkins maintain notes.git and trigger the html_notes job on commits --- bin/reproducible_html_notes.sh | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) (limited to 'bin/reproducible_html_notes.sh') 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 "

Notes are stored in notes.git.

" +} + create_pkg_note() { BUG=false rm -f $PAGE @@ -149,7 +137,7 @@ create_pkg_note() { fi write_page " " write_page "" - write_page "Notes are stored in notes.git." + write_meta_note write_page "" write_page_footer } @@ -191,7 +179,7 @@ create_issue() { write_page "" write_page " " write_page "" - write_page "Notes are stored in notes.git." + write_meta_note write_page "" write_page_meta_sign write_page_footer @@ -330,7 +318,7 @@ if $VALID_YAML ; then else write_page "

Broken .yaml files in notes.git could not be parsed, please investigate and fix!

" fi -write_page "

Notes are stored in notes.git.

" +write_meta_note write_page_meta_sign write_page_footer publish_page @@ -352,7 +340,7 @@ if $VALID_YAML ; then else write_page "

Broken .yaml files in notes.git could not be parsed, please investigate and fix!

" fi -write_page "

Notes are stored in notes.git.

" +write_meta_note write_page_footer publish_page -- cgit v1.2.3-70-g09d2