Merge pull request #6384 from corda/INFRA-357

INFRA-357 4.4 to 4.5 merge + JDK 11 regression build changes for tag publishing
This commit is contained in:
Waldemar Żurowski 2020-06-20 14:33:24 +01:00 committed by GitHub
commit 5bfc693a71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 48 additions and 7 deletions

View File

@ -10,11 +10,7 @@ boolean isReleaseTag = (env.TAG_NAME =~ /^release.*JDK11$/)
pipeline {
agent {
dockerfile {
label 'k8s'
additionalBuildArgs "--build-arg USER=stresstester"
filename '.ci/dev/compatibility/DockerfileJDK11'
}
label 'k8s'
}
options {
timestamps()
@ -79,6 +75,13 @@ pipeline {
}
stage('Publish to Artifactory') {
agent {
dockerfile {
reuseNode true
additionalBuildArgs "--build-arg USER=stresstester"
filename '.ci/dev/compatibility/DockerfileJDK11'
}
}
when {
expression { isReleaseTag }
}

View File

@ -28,6 +28,13 @@ pipeline {
ansiColor('xterm')
timestamps()
timeout(time: 3, unit: 'HOURS')
/*
* a bit awkward to read
* is parameter is true -> push events are *not* ignored
* if parameter is false -> push events *are* ignored
*/
overrideIndexTriggers (!isReleaseBranch)
}
parameters {

View File

@ -17,7 +17,7 @@ killAllExistingBuildsForJob(env.JOB_NAME, env.BUILD_NUMBER.toInteger())
/**
* Sense environment
*/
boolean isTag = (env.TAG_NAME =~ /^release-V(\d+\.\d+)?(\.\d+)?(-.+)?$/)
boolean isReleaseTag = (env.TAG_NAME =~ /^release-.*(?<!_JDK11)$/)
pipeline {
agent { label 'k8s' }
@ -32,6 +32,7 @@ pipeline {
EXECUTOR_NUMBER = "${env.EXECUTOR_NUMBER}"
BUILD_ID = "${env.BUILD_ID}-${env.JOB_NAME}"
ARTIFACTORY_CREDENTIALS = credentials('artifactory-credentials')
ARTIFACTORY_BUILD_NAME = "Corda / Publish / Publish Release to Artifactory".replaceAll("/", "::")
}
stages {
@ -85,6 +86,36 @@ pipeline {
}
}
}
stage('Publish to Artifactory') {
when {
expression { isReleaseTag }
}
steps {
rtServer(
id: 'R3-Artifactory',
url: 'https://software.r3.com/artifactory',
credentialsId: 'artifactory-credentials'
)
rtGradleDeployer(
id: 'deployer',
serverId: 'R3-Artifactory',
repo: 'r3-corda-releases'
)
rtGradleRun(
usesPlugin: true,
useWrapper: true,
switches: '-s --info',
tasks: 'artifactoryPublish',
deployerId: 'deployer',
buildName: env.ARTIFACTORY_BUILD_NAME
)
rtPublishBuildInfo(
serverId: 'R3-Artifactory',
buildName: env.ARTIFACTORY_BUILD_NAME
)
}
}
}
@ -126,7 +157,7 @@ pipeline {
script
{
if (!isTag) {
if (!isReleaseTag) {
// We want to send a summary email, but want to limit to once per day.
// Comparing the dates of the previous and current builds achieves this,
// i.e. we will only send an email for the first build on a given day.