I would like to read the revision number from Jenkins job when the job fails
Revision number:
Job script:
failure {
echo 'JENKINS PIPELINE FAILED'
notifyBitbucket
commitSha1: "${env.SVN_REVISION}",
considerUnstableAsSuccess: false,
credentialsId: 'UFCBitbucket',
disableInprogressNotification: true,
ignoreUnverifiedSSLPeer: true,
includeBuildNumberInKey: false,
prependParentProjectKey: false,
projectKey: '',
stashServerBaseUrl: 'https://bitbucket.url.local:8080'
}
I have trouble with Jenkins environment variable - "${env.SVN_REVISION}". This variable returns null value.
I can not solve this problem. Please help to solve this problem Thanks in advance
