jenkinsci / hipchat-plugin

HipChat notification plugin for Jenkins
https://plugins.jenkins.io/hipchat/
54 stars 85 forks source link

How to use a message template from a Jenkinsfile? #117

Open scbunn opened 6 years ago

scbunn commented 6 years ago

I would assume the following to work:

hipchatSend color: 'GREEN', failOnError: true, message: "${BUILD_DURATION} ; ${BLUE_OCEAN_URL}", notify: true, room: 'foo', 

but it doesn't.

vkotovv commented 6 years ago

Here is the template I've used, worked for me:

 hipchatSend color: 'RED', room: '<redacted>', failOnError: true, notify: true, 
     message: 'Building <a href=\'${BUILD_URL}\'>${JOB_DISPLAY_NAME} #${BUILD_NUMBER}</a> has FAILED. Time elapsed: ${DURATION}. Check the <a href=\'${BUILD_URL}/console\'>console output</a>.'