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

* INFRA-1728 set correct java version for JDK 11 base image
This commit is contained in:
Connel McGovern 2022-03-15 07:57:57 +00:00 committed by GitHub
parent beaed61028
commit a84c174aad
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 \ RUN apt-get update && apt-get install -y curl apt-transport-https \
ca-certificates \ ca-certificates \
curl \ curl \

View File

@ -33,6 +33,18 @@ def nexusIqStageChoices = [nexusDefaultIqStage].plus(
'operate' 'operate'
].minus([nexusDefaultIqStage])) ].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 { pipeline {
agent { label 'standard' } agent { label 'standard' }
@ -42,6 +54,18 @@ pipeline {
overrideIndexTriggers(false) overrideIndexTriggers(false)
timeout(time: 3, unit: 'HOURS') timeout(time: 3, unit: 'HOURS')
buildDiscarder(logRotator(daysToKeepStr: '14', artifactDaysToKeepStr: '14')) 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 { parameters {

View File

@ -7,6 +7,7 @@
/** /**
* Sense environment * Sense environment
*/ */
boolean isReleaseBranch = (env.BRANCH_NAME =~ /^release\/os\/.*/)
boolean isReleaseTag = (env.TAG_NAME =~ /^release-.*(?<!_JDK11)$/) boolean isReleaseTag = (env.TAG_NAME =~ /^release-.*(?<!_JDK11)$/)
boolean isInternalRelease = (env.TAG_NAME =~ /^internal-release-.*$/) boolean isInternalRelease = (env.TAG_NAME =~ /^internal-release-.*$/)
boolean isReleaseCandidate = (env.TAG_NAME =~ /^(release-.*(RC|HC).*(?<!_JDK11))$/) boolean isReleaseCandidate = (env.TAG_NAME =~ /^(release-.*(RC|HC).*(?<!_JDK11))$/)
@ -39,6 +40,17 @@ def nexusIqStageChoices = [nexusDefaultIqStage].plus(
'operate' 'operate'
].minus([nexusDefaultIqStage])) ].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 * Common Gradle arguments for all Gradle executions
*/ */
@ -61,6 +73,18 @@ pipeline {
parallelsAlwaysFailFast() parallelsAlwaysFailFast()
timeout(time: 6, unit: 'HOURS') timeout(time: 6, unit: 'HOURS')
timestamps() 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 { parameters {