Skip to content
This repository has been archived by the owner on Dec 2, 2021. It is now read-only.

Commit

Permalink
FABCI-205 Build notifications to RocketChat
Browse files Browse the repository at this point in the history
Send the merge build failure notifications to
fabric-evm rocketChat channel.

Change-Id: I375fa66d75d1744dda332bb44087a86f2decbdfa
Signed-off-by: rameshthoomu <rameshbabu.thoomu@gmail.com>
  • Loading branch information
rameshthoomu committed Nov 14, 2018
1 parent 3cdcf48 commit 7a24ab4
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
//
// SPDX-License-Identifier: Apache-2.0
//
timeout(40) {
node ('hyp-x') { // trigger build on x86_64 node
def ROOTDIR = pwd() // workspace dir (/w/workspace/<job_name>
timestamps {
try {
def ROOTDIR = pwd() // workspace dir (/w/workspace/<job_name>)
env.PROJECT_DIR = "gopath/src/github.com/hyperledger"
env.GO_VER = "1.10.4"
env.GOPATH = "$WORKSPACE/gopath"
Expand All @@ -23,11 +26,13 @@ node ('hyp-x') { // trigger build on x86_64 node
cd $PROJECT_DIR
git clone git://cloud.hyperledger.org/mirror/fabric-chaincode-evm && cd fabric-chaincode-evm
git checkout "$GERRIT_BRANCH" && git fetch origin "$GERRIT_REFSPEC" && git checkout FETCH_HEAD
git log -n2 --pretty=oneline --abbrev-commit
'''
}
}
catch (err) {
failure_stage = "Fetch patchset"
currentBuild.result = 'FAILURE'
throw err
}
}
Expand All @@ -40,6 +45,7 @@ node ('hyp-x') { // trigger build on x86_64 node
}
catch (err) {
failure_stage = "Clean Environment - Get Env Info"
currentBuild.result = 'FAILURE'
throw err
}
}
Expand All @@ -57,6 +63,7 @@ node ('hyp-x') { // trigger build on x86_64 node
}
catch (err) {
failure_stage = "basic-checks"
currentBuild.result = 'FAILURE'
throw err
}
}
Expand All @@ -73,6 +80,7 @@ node ('hyp-x') { // trigger build on x86_64 node
}
catch (err) {
failure_stage = "unit-tests"
currentBuild.result = 'FAILURE'
throw err
}
}
Expand All @@ -88,7 +96,17 @@ node ('hyp-x') { // trigger build on x86_64 node
}
catch (err) {
failure_stage = "integration-test"
currentBuild.result = 'FAILURE'
throw err
}
}
} // node block end here
}
} finally {
if (env.JOB_NAME == "fabric-chaincode-evm-merge-master-x86_64") {
if (currentBuild.result == 'FAILURE') { // Other values: SUCCESS, UNSTABLE
rocketSend channel: 'fabric-evm', emoji: ':sob:', message: "Build Notification - STATUS: *${currentBuild.result}* - BRANCH: *${env.GERRIT_BRANCH}* - PROJECT: *${env.PROJECT}* - BUILD_URL - (<${env.BUILD_URL}|Open>)"
}
}
} // finally
} // timestamps
} // node
} // timeout

0 comments on commit 7a24ab4

Please # to comment.