-
Bug
-
Resolution: Unresolved
-
Critical
-
None
Hi,
I am using pipeline to create a CI with groovy script and my failed job's currentBuild.result is returning null and currentBuild.currentResult as success.
Can you let me know how can I fix this issue?
My groovy script is as follows:
#!groovy
node('master') {
// This limits build concurrency to 1 per branch
properties([disableConcurrentBuilds()])
env.JAVA_HOME = "${tool 'jdk8'}"
timeout(10 /* minutes */) {
ws("workspace/${env.JOB_NAME}") {
try {
stage('Checkout')
stage('Build')
{ error("Build failed: test") }} finally{
echo "${currentBuild.result}, ${currentBuild.currentResult}"
jiraSendBuildInfo branch: 'feature/NJ-9-featurebranch-for-ci', site: '***atlassian.net'
echo "finished jiraSendBuildInfo"
}