Skip to content

Commit

Permalink
Merge pull request #3168 from eclipse/cd-matrix-nightly-deploy
Browse files Browse the repository at this point in the history
added matrix to nightly deploy. See #3166
  • Loading branch information
cdietrich authored Aug 20, 2024
2 parents 6e49b76 + 86b4631 commit 1484239
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 1484239

Please sign in to comment.