From: Andrew Schoen Date: Fri, 30 Sep 2016 21:26:34 +0000 (-0500) Subject: ceph-dev-build: give the failure script access to the NORMALIZED_* vars X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=54e4db707c8552a9182b932cdc6b959d5e25ebf9;p=ceph-build.git ceph-dev-build: give the failure script access to the NORMALIZED_* vars 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 --- diff --git a/ceph-dev-build/build/build_deb b/ceph-dev-build/build/build_deb index 42a28288..e68b9a13 100644 --- a/ceph-dev-build/build/build_deb +++ b/ceph-dev-build/build/build_deb @@ -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 diff --git a/ceph-dev-build/build/build_rpm b/ceph-dev-build/build/build_rpm index 8be37435..1babfb5f 100644 --- a/ceph-dev-build/build/build_rpm +++ b/ceph-dev-build/build/build_rpm @@ -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 diff --git a/ceph-dev-build/config/definitions/ceph-dev-build.yml b/ceph-dev-build/config/definitions/ceph-dev-build.yml index dd4a29ac..21325700 100644 --- a/ceph-dev-build/config/definitions/ceph-dev-build.yml +++ b/ceph-dev-build/config/definitions/ceph-dev-build.yml @@ -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