]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-build: send failure status to shaman on build failure
authorAndrew Schoen <aschoen@redhat.com>
Tue, 18 Oct 2016 19:37:49 +0000 (14:37 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 18 Oct 2016 19:37:49 +0000 (14:37 -0500)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
ceph-build/build/failure [new file with mode: 0644]
ceph-build/config/definitions/ceph-build.yml

diff --git a/ceph-build/build/failure b/ceph-build/build/failure
new file mode 100644 (file)
index 0000000..6274d32
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash -ex
+
+# note: the failed_build_status call relies on normalized variable names that
+# are infered by the builds themselves. If the build fails before these are
+# set, they will be posted with empty values
+BRANCH=`branch_slash_filter $BRANCH`
+
+# update shaman with the failed build status
+failed_build_status "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
index d9bebfd78cbc4642d73e8ef6190ecd2af9a55825..b296752c8ceae51c1dc6c0eec37754f94bf08d5b 100644 (file)
             - ../../build/setup
             - ../../build/build_rpm
 
+    publishers:
+      - postbuildscript:
+          script-only-if-failed: True
+          script-only-if-succeeded: False
+          builders:
+            - inject:
+                properties-file: ${WORKSPACE}/build_info
+            - shell:
+                !include-raw:
+                  - ../../../scripts/build_utils.sh
+                  - ../../build/failure
+
     wrappers:
       - inject-passwords:
           global: true