]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-dev-build: give the failure script access to the NORMALIZED_* vars
authorAndrew Schoen <aschoen@redhat.com>
Fri, 30 Sep 2016 21:26:34 +0000 (16:26 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Fri, 30 Sep 2016 21:26:34 +0000 (16:26 -0500)
In the build scripts we can write the NORMALIZED_* vars to a property
file so that if the build fails the postbuildscript can use inject those
vars and use them to properly post build info to shaman.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
ceph-dev-build/build/build_deb
ceph-dev-build/build/build_rpm
ceph-dev-build/config/definitions/ceph-dev-build.yml

index 42a28288a6ab976de29fadbc2c8f81de503116e5..e68b9a13b4aeeea8621a394f6b41fbcfef77fe80 100644 (file)
@@ -72,6 +72,14 @@ NORMAL_DISTRO=$distro
 NORMAL_DISTRO_VERSION=$DIST
 NORMAL_ARCH=$ARCH
 
+# Write these values to a file so the failure
+# script can consume them if the build fails
+cat > $WORKSPACE/build_info << EOF
+NORMAL_DISTRO=$distro
+NORMAL_DISTRO_VERSION=$DIST
+NORMAL_ARCH=$ARCH
+EOF
+
 # create build status in shaman
 create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
 
index 8be37435b2a3fa899532aaafcd70d81db7e56718..1babfb5feab7c62eed0cce920add6762078f392f 100644 (file)
@@ -62,6 +62,14 @@ NORMAL_DISTRO=$DISTRO
 NORMAL_DISTRO_VERSION=$RELEASE
 NORMAL_ARCH=$ARCH
 
+# Write these values to a file so the failure
+# script can consume them if the build fails
+cat > $WORKSPACE/build_info << EOF
+NORMAL_DISTRO=$distro
+NORMAL_DISTRO_VERSION=$DIST
+NORMAL_ARCH=$ARCH
+EOF
+
 # create build status in shaman
 create_build_status "started" "ceph" $NORMAL_DISTRO $NORMAL_DISTRO_VERSION $NORMAL_ARCH
 
index dd4a29ac44c5d8bed407444d43df71b6ea7f818b..21325700b6f6c1367a9603a6a832661656220b99 100644 (file)
@@ -83,6 +83,8 @@
           script-only-if-failed: True
           script-only-if-succeeded: False 
           builders:
+            - inject:
+                properties-file: ${WORKSPACE}/build_info
             - shell:
                 !include-raw:
                   - ../../../scripts/build_utils.sh