INFRA-1735 Teams notification's for C4 (#7108)

* INFRA-1728 set correct java version for JDK 11 base image
This commit is contained in:
Connel McGovern 2022-03-15 07:58:36 +00:00 committed by GitHub
parent e00bd93478
commit 8da0e718a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 49 additions and 1 deletions

View File

@ -1,4 +1,4 @@
FROM azul/zulu-openjdk:11
FROM azul/zulu-openjdk:11.0.14
RUN apt-get update && apt-get install -y curl apt-transport-https \
ca-certificates \
curl \

View File

@ -33,6 +33,18 @@ def nexusIqStageChoices = [nexusDefaultIqStage].plus(
'operate'
].minus([nexusDefaultIqStage]))
/**
* define an empty teamsWebHookURL and if it is a Release Branch
* then set it for the Corda 4 Jenkins Connector
*/
boolean isReleaseBranch = (env.BRANCH_NAME =~ /^release\/os\/.*/)
def teamsWebHookURL = ""
if (isReleaseBranch){
withCredentials([string(credentialsId: 'ms-teams-webhook', variable: 'webhook_url')]) {
teamsWebHookURL = "$webhook_url"
}
}
pipeline {
agent { label 'standard' }
@ -42,6 +54,18 @@ pipeline {
overrideIndexTriggers(false)
timeout(time: 3, unit: 'HOURS')
buildDiscarder(logRotator(daysToKeepStr: '14', artifactDaysToKeepStr: '14'))
office365ConnectorWebhooks([[
name : "Corda 4 Jenkins Connector",
notifyBackToNormal : true,
startNotification : false,
notifyFailure : true,
notifySuccess : true,
notifyNotBuilt : false,
notifyAborted : false,
notifyRepeatedFailure: true,
notifyUnstable : true,
url : "${teamsWebHookURL}"
]])
}
parameters {

View File

@ -7,6 +7,7 @@
/**
* Sense environment
*/
boolean isReleaseBranch = (env.BRANCH_NAME =~ /^release\/os\/.*/)
boolean isReleaseTag = (env.TAG_NAME =~ /^release-.*(?<!_JDK11)$/)
boolean isInternalRelease = (env.TAG_NAME =~ /^internal-release-.*$/)
boolean isReleaseCandidate = (env.TAG_NAME =~ /^(release-.*(RC|HC).*(?<!_JDK11))$/)
@ -39,6 +40,17 @@ def nexusIqStageChoices = [nexusDefaultIqStage].plus(
'operate'
].minus([nexusDefaultIqStage]))
/**
* define an empty teamsWebHookURL and if it is a Release Branch
* then set it for the Corda 4 Jenkins Connector
*/
def teamsWebHookURL = ""
if (isReleaseBranch || isReleaseTag){
withCredentials([string(credentialsId: 'ms-teams-webhook', variable: 'webhook_url')]) {
teamsWebHookURL = "$webhook_url"
}
}
/**
* Common Gradle arguments for all Gradle executions
*/
@ -61,6 +73,18 @@ pipeline {
parallelsAlwaysFailFast()
timeout(time: 6, unit: 'HOURS')
timestamps()
office365ConnectorWebhooks([[
name : "Corda 4 Jenkins Connector",
notifyBackToNormal : true,
startNotification : false,
notifyFailure : true,
notifySuccess : true,
notifyNotBuilt : false,
notifyAborted : false,
notifyRepeatedFailure: true,
notifyUnstable : true,
url : "${teamsWebHookURL}"
]])
}
parameters {