Skip to content

Commit

Permalink
added matrix to nightly deploy. See #3166
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Dietrich <[email protected]>
  • Loading branch information
cdietrich committed Aug 20, 2024
1 parent 6e49b76 commit 86b4631
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions jenkins/nightly-deploy/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,38 @@ pipeline {
success {
archiveArtifacts artifacts: 'build/**'
}
cleanup {
script {
def curResult = currentBuild.currentResult
def lastResult = 'NEW'
if (currentBuild.previousBuild != null) {
lastResult = currentBuild.previousBuild.result
}

if (curResult != 'SUCCESS' || lastResult != 'SUCCESS') {
def color = ''
switch (curResult) {
case 'SUCCESS':
color = '#00FF00'
break
case 'UNSTABLE':
color = '#FFFF00'
break
case 'FAILURE':
color = '#FF0000'
break
default: // e.g. ABORTED
color = '#666666'
}

matrixSendMessage https: true,
hostname: 'matrix.eclipse.org',
accessTokenCredentialsId: "matrix-token",
roomId: '!zbliqcdqsggOFDCUoF:matrix.eclipse.org',
body: "${lastResult} => ${curResult} ${env.BUILD_URL} | ${env.JOB_NAME}#${env.BUILD_NUMBER}",
formattedBody: "<div><font color='${color}'>${lastResult} => ${curResult}</font> | <a href='${env.BUILD_URL}' target='_blank'>${env.JOB_NAME}#${env.BUILD_NUMBER}</a></div>"
}
}
}
}
}

0 comments on commit 86b4631

Please sign in to comment.