diff options
author | Holger Levsen <holger@layer-acht.org> | 2016-12-18 16:04:32 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2016-12-18 16:04:51 +0100 |
commit | 095a495873a7a7aef69496f2bb1a48254025839a (patch) | |
tree | 5a841c37be28b6c6282397dfd02c8208c552b246 /bin | |
parent | e8dcc2776189bff83873ad2d60f40069fa8d08a0 (diff) | |
download | jenkins.debian.net-095a495873a7a7aef69496f2bb1a48254025839a.tar.xz |
abort certain jobs if we know they will fail due to certain bugs…
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/common-functions.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/bin/common-functions.sh b/bin/common-functions.sh index 1a3b6e8c..c0fd248b 100755 --- a/bin/common-functions.sh +++ b/bin/common-functions.sh @@ -8,6 +8,22 @@ common_cleanup() { rm -f $TTT } +abort_if_bug_is_still_open() { + local TMPFILE=$(mktemp --tmpdir=/tmp jenkins-bugcheck-XXXXXXX) + bts status $1 fields:done > $TMPFILE || true + # if we get a valid response… + if [ ! -z "$(grep done $TMPFILE)" ] ; then + # if the bug is not done (by some email address containing a @) + if [ -z "$(grep "@" $TMPFILE)" ] ; then + rm $TMPFILE + echo "https://bugs.debian.org/$1 is still open, aborting this job." + exec /srv/jenkins/bin/abort.sh + exit 0 + fi + fi + rm $TMPFILE +} + # # run ourself with the same parameter as we are running # but run a copy from /tmp so that the source can be updated @@ -23,6 +39,12 @@ if [ "${0:0:5}" != "/tmp/" ] ; then echo "Do not run this as root." exit 1 fi + # abort certain jobs if we know they will fail due to certain bugs… + case $JOB_NAME in + edu-packages_sid*|lintian-tests_sid) + abort_if_bug_is_still_open 848422 ;; + *) ;; + esac # mktemp some place for us... TTT=$(mktemp --tmpdir=/tmp jenkins-script-XXXXXXXX) # prepare cleanup |