Open igloocube opened 6 years ago
Ok so message: 'Duration: ${BUILD_DURATION}',
with single quotes works but not with env variables though.
How can you combine the 2? I've tried this for example:
message: 'Duration: ${BUILD_DURATION} ${env.CHANGE_AUTHOR} $env.CHANGE_AUTHOR'
Prints:
Duration: 4 sec ${env.CHANGE_AUTHOR} $env.CHANGE_AUTHOR
I've found you can join/concatenate like so, is there no better way?
message: 'Duration: ${BUILD_DURATION}' + " Display name: ${env.BUILD_DISPLAY_NAME}",
Hi, put mine too (ENV
and TAGS
are build parameters):
message = 'Succeeded <a href="${BLUE_OCEAN_URL}">#${BUILD_NUMBER}</a> - ' +
"Deployment on <b>${ENV.toUpperCase()}</b> environment with tags <b>${TAGS ?: 'none'}</b></br>" +
'Time elapsed: ${BUILD_DURATION}. Check the <a href="${BUILD_URL}/console">console output'
Then I use this string variable in hipchatSend
.
Results in:
groovy.lang.MissingPropertyException: No such property: BUILD_DURATION for class: groovy.lang.Binding