diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-02-18 13:12:02 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-02-18 13:12:02 +0100 |
commit | 5db5ab65a8987cc3c51a78336560a6e986d864e1 (patch) | |
tree | 5a369e7ebcef22b3df9ee759b84ec51928d8e58c /bin | |
parent | 3a85d7d30707cb05567235b537dc049801f5d28f (diff) | |
download | jenkins.debian.net-5db5ab65a8987cc3c51a78336560a6e986d864e1.tar.xz |
reproducible: check whether assumptions are true
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_html_graphs.sh | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/bin/reproducible_html_graphs.sh b/bin/reproducible_html_graphs.sh index e11e42c4..bb364d28 100755 --- a/bin/reproducible_html_graphs.sh +++ b/bin/reproducible_html_graphs.sh @@ -59,11 +59,22 @@ if [ -z $RESULT ] ; then # force regeneration of the image touch -d "$DATE 00:00" ${TABLE[$i]}.png done + # # gather notes stats - # FIXME: hard-coding another job path is meh - NOTES=$(grep -c -v "^ " /var/lib/jenkins/jobs/reproducible_html_notes/workspace/packages.yml) + # + NOTES_GIT_PATH="/var/lib/jenkins/jobs/reproducible_html_notes/workspace" + if [ ! -d ${NOTES_GIT_PATH} ] ; then + echo "Warning: ${NOTES_GIT_PATH} does not exist, has the job been renamed???" + echo "Please investigate and fix!" + exit 1 + elif [ ! -f ${NOTES_GIT_PATH}/packages.yaml ] || [ ! -f ${NOTES_GIT_PATH}/issues.yaml ] ; then + echo "Warning: ${NOTES_GIT_PATH}/packages.yaml or issues.yaml does not exist, something has changed in notes.git it seems." + echo "Please investigate and fix!" + exit 1 + fi + NOTES=$(grep -c -v "^ " ${NOTES_GIT_PATH}/packages.yml) sqlite3 -init ${INIT} ${PACKAGES_DB} "INSERT INTO ${TABLE[4]} VALUES (\"$DATE\", \"$NOTES\")" - ISSUES=$(grep -c -v "^ " /var/lib/jenkins/jobs/reproducible_html_notes/workspace/issues.yml) + ISSUES=$(grep -c -v "^ " ${NOTES_GIT_PATH}/issues.yml) sqlite3 -init ${INIT} ${PACKAGES_DB} "INSERT INTO ${TABLE[5]} VALUES (\"$DATE\", \"$ISSUES\")" fi |