Skip to content

Commit

Permalink
Update withNotify.groovy
Browse files Browse the repository at this point in the history
  • Loading branch information
zepouet authored Mar 3, 2017
1 parent db0eb10 commit e240c8b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions vars/withNotify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ def notifyBuild(String email, String buildStatus = 'STARTED') {
// Default values
def colorName = 'RED'
def colorCode = '#FF0000'
def subject = "${buildStatus}: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'"
def subject = "${buildStatus}: Job '${env.GIT_BRANCH}'"
def summary = "${subject} (${env.BUILD_URL})"
//def details = """STARTED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]':
//Check console output at <a href='${env.BUILD_URL}'>${env.JOB_NAME} [${env.BUILD_NUMBER}]</a>"""
def details = """STARTED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]':
<p>Check Jenkins output at <a href='${env.BUILD_URL}'>${env.GIT_BRANCH}</a></p>
<p>Check CloudUnit application at <a href='http://web-'${env.GIT_BRANCH}'-kis.g2c.cloudunit.io/'>${env.GIT_BRANCH}</a></p>
"""

// Override default values based on build status
if (buildStatus == 'STARTED') {
Expand All @@ -35,7 +37,7 @@ def notifyBuild(String email, String buildStatus = 'STARTED') {

emailext (
subject: subject,
//body: details,
body: details,
to: email
)
}

0 comments on commit e240c8b

Please sign in to comment.