Merge branch '2.0.x'

This commit is contained in:
Madhura Bhave 2018-04-11 19:36:35 -07:00
commit 94362d51ec

View File

@ -2,11 +2,11 @@
set -e
pushd git-repo > /dev/null
PREV_SHA=$(git rev-parse HEAD^1)
PREV_SHA=$( git rev-parse HEAD^1 )
popd > /dev/null
PREV_STATUSES=$(curl https://api.github.com/repos/spring-projects/spring-boot/commits/$PREV_SHA/statuses)
PREV_STATES=$(echo $PREV_STATUSES | jq -r --arg BUILD_JOB_NAME "$BUILD_JOB_NAME" '.[] | select(.context == $BUILD_JOB_NAME) | .state')
WAS_PREV_SUCCESSFUL=$(echo $PREV_STATES | grep 'success')
PREV_STATUSES=$( curl https://api.github.com/repos/spring-projects/spring-boot/commits/$PREV_SHA/statuses )
PREV_STATES=$( echo $PREV_STATUSES | jq -r --arg BUILD_JOB_NAME "$BUILD_JOB_NAME" '.[] | select(.context == $BUILD_JOB_NAME) | .state' )
WAS_PREV_SUCCESSFUL=$( echo "$PREV_STATES" | grep 'success' || true )
if [[ $STATE == "success" ]];then
echo "Build SUCCESSFUL ${BUILD_PIPELINE_NAME} / ${BUILD_JOB_NAME}" > email-details/subject