Skip to content

Commit a6ede56

Browse files
authored
Update CI.Jenkinsfile
Post results to teams
1 parent 556f863 commit a6ede56

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

CI.Jenkinsfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,18 @@ node ("docker-light") {
8787
}
8888
}
8989
}
90+
postToTeams(true)
9091
} catch (e) {
9192
currentBuild.result = "FAILED"
93+
postToTeams(false)
9294
throw e
9395
}
9496
}
97+
98+
def postToTeams(boolean success) {
99+
def webhookUrl = "${env.TEAMS_PNC_JENKINS_WEBHOOK_URL}"
100+
def color = success ? "#00FF00" : "#FF0000"
101+
def status = success ? "SUCCESSFUL" : "FAILED"
102+
def message = "*" + status + ":* '${env.JOB_NAME}' - [${env.BUILD_NUMBER}] - ${env.BUILD_URL}"
103+
office365ConnectorSend(webhookUrl: webhookUrl, color: color, message: message, status: status)
104+
}

0 commit comments

Comments
 (0)