Skip to content

Commit 8b5e762

Browse files
committed
Merge remote-tracking branch 'origin/release/os/5.3' into merge-release/os/5.2-release/os/5.3-2024-11-28-397
# Conflicts: # components/flow/flow-rest-resource-service-impl/src/main/kotlin/net/corda/flow/rest/impl/v1/FlowRestResourceImpl.kt # gradle.properties # gradle/libs.versions.toml # libs/rest/rest-client/src/main/kotlin/net/corda/rest/client/auth/scheme/AuthenticationScheme.kt # libs/rest/rest-client/src/main/kotlin/net/corda/rest/client/auth/scheme/BasicAuthenticationScheme.kt # libs/rest/rest-client/src/main/kotlin/net/corda/rest/client/auth/scheme/BearerTokenAuthenticationScheme.kt # libs/rest/rest-client/src/main/kotlin/net/corda/rest/client/auth/scheme/NoopAuthenticationScheme.kt # libs/rest/rest-client/src/main/kotlin/net/corda/rest/client/connect/remote/RemoteClient.kt # libs/rest/rest-server-impl/src/integrationTest/kotlin/net/corda/rest/server/impl/AbstractWebsocketTest.kt # libs/rest/rest-server-impl/src/integrationTest/kotlin/net/corda/rest/server/impl/RestServerDurableStreamsRequestsTest.kt # libs/rest/rest-server-impl/src/integrationTest/kotlin/net/corda/rest/server/impl/RestServerOpenApiTest.kt # libs/rest/rest-server-impl/src/integrationTest/kotlin/net/corda/rest/server/impl/RestServerRequestsTest.kt # testing/e2e-test-utilities/src/main/kotlin/net/corda/e2etest/utilities/UnirestHttpsClient.kt # tools/corda-runtime-gradle-plugin/src/integrationTest/kotlin/net/corda/gradle/plugin/queries/QueriesTasksTest.kt # tools/corda-runtime-gradle-plugin/src/main/kotlin/net/corda/gradle/plugin/ProjectUtils.kt # tools/corda-runtime-gradle-plugin/src/main/kotlin/net/corda/gradle/plugin/cordalifecycle/EnvironmentSetupHelper.kt # tools/corda-runtime-gradle-plugin/src/main/kotlin/net/corda/gradle/plugin/cordalifecycle/EnvironmentSetupTasks.kt # tools/corda-runtime-gradle-plugin/src/main/kotlin/net/corda/gradle/plugin/cordapp/DeployCpiHelper.kt # tools/corda-runtime-gradle-plugin/src/main/kotlin/net/corda/gradle/plugin/network/VNodeHelper.kt # tools/corda-runtime-gradle-plugin/src/main/kotlin/net/corda/gradle/plugin/queries/QueryTasksImpl.kt
2 parents e10a302 + fa70322 commit 8b5e762

File tree

1,461 files changed

+47001
-34329
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,461 files changed

+47001
-34329
lines changed

.ci/JenkinsfileCombinedWorkerPluginsSmokeTests

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@Library('corda-shared-build-pipeline-steps@5.2') _
1+
@Library('corda-shared-build-pipeline-steps@5.3') _
22

33
import groovy.transform.Field
44
import com.r3.build.utils.PipelineUtils
@@ -47,6 +47,7 @@ pipeline {
4747
CORDA_DEV_POSTGRES_PASSWORD="${env.POSTGRES_CREDENTIALS_PSW}"
4848
CORDA_DEV_CLUSTER_DB_NAME="${postgresDb}"
4949
CORDA_USE_CACHE = "corda-remotes"
50+
JDBC_URL = "jdbc:postgresql://${postgresHost}:${postgresPort}/${postgresDb}"
5051
KUBECONFIG = credentials("kubernetes-eks-e2e-01-credentials")
5152
CORDA_CLI_USER_HOME = "/tmp/corda-cli-home"
5253
CORDA_GRADLE_SCAN_KEY = credentials('gradle-build-scans-key')
@@ -94,7 +95,7 @@ pipeline {
9495
REST_TLS_PATH = "${env.WORKSPACE}/applications/workers/release/combined-worker/tls/rest/rest_worker.pfx"
9596
VM_PARAMETERS = "-Dco.paralleluniverse.fibers.verifyInstrumentation=true"
9697
LOG4J_PARAMETERS = "-Dlog4j.configurationFile=log4j2-console.xml"
97-
PROGRAM_PARAMETERS = "--instance-id=0 -mbus.busType=DATABASE -spassphrase=password -ssalt=salt -ddatabase.user=u${postgresDb} -ddatabase.pass=password -ddatabase.jdbc.url=jdbc:postgresql://${postgresHost}:${postgresPort}/${postgresDb} -ddatabase.jdbc.directory=${JDBC_PATH} -rtls.keystore.path=${REST_TLS_PATH} -rtls.keystore.password=mySecretPassword"
98+
PROGRAM_PARAMETERS = "--instance-id=0 -mbus.busType=DATABASE -spassphrase=password -ssalt=salt -ddatabase.user=u${postgresDb} -ddatabase.pass=password -ddatabase.jdbc.url=${JDBC_URL} -ddatabase.jdbc.directory=${JDBC_PATH} -rtls.keystore.path=${REST_TLS_PATH} -rtls.keystore.password=mySecretPassword"
9899
WORKING_DIRECTORY = "${env.WORKSPACE}"
99100
}
100101
steps {
@@ -128,7 +129,7 @@ pipeline {
128129
post {
129130
always {
130131
step([$class: 'ClaimPublisher'])
131-
script {
132+
script {
132133
findBuildScans()
133134
pipelineUtils.getPodLogs("postgres")
134135
pipelineUtils.dropPostgresDB(postgresCredentialsId, env.CORDA_DEV_CLUSTER_DB_NAME)

.ci/JenkinsfileCommentRebuild

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
@Library('corda-shared-build-pipeline-steps@5.2') _
1+
@Library('corda-shared-build-pipeline-steps@5.3') _
22

33
import static com.r3.build.BuildControl.cancelQueuedJobByName
44

55
cancelQueuedJobByName(env.JOB_NAME)
66

77
githubCommentBuildTests(
8-
branch: 'release/5.2',
9-
chartVersion: '^5.2.1-alpha',
8+
branch: 'release/5.3',
9+
chartVersion: '^5.3.0-alpha',
1010
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
@Library('[email protected]') _
2+
3+
import com.r3.build.agents.KubernetesAgent
4+
import com.r3.build.enums.BuildEnvironment
5+
import com.r3.build.enums.KubernetesCluster
6+
import com.r3.build.utils.GitUtils
7+
8+
Map config = [
9+
dailyBuildCron: '''\
10+
TZ=Europe/London
11+
H 04 * * 1-5
12+
'''.stripIndent(),
13+
gradleTestAdditionalArgs: '',
14+
gradleTestPerformanceTuning: '-Dscan.tag.corda-runtime-gradle-plugin --build-cache -Si',
15+
gradleTestTarget: ':tools:corda-runtime-gradle-plugin:cordaRuntimeGradlePluginSmokeTest',
16+
enableNotifications: false,
17+
slackChannel: '#corda-corda5-build-notifications',
18+
]
19+
20+
GitUtils gitUtils = new GitUtils(this)
21+
KubernetesAgent k8s = new KubernetesAgent(
22+
BuildEnvironment.AMD64_LINUX_JAVA17,
23+
KubernetesCluster.JenkinsAgents,
24+
3
25+
).withDocker()
26+
27+
pipeline {
28+
agent {
29+
kubernetes {
30+
cloud k8s.buildCluster.cloudName
31+
yaml k8s.JSON
32+
yamlMergeStrategy merge() // important to keep tolerations from the inherited template
33+
label k8s.jenkinsLabel
34+
showRawYaml false
35+
defaultContainer k8s.defaultContainer.name
36+
}
37+
}
38+
39+
triggers {
40+
cron(gitUtils.isReleaseBranch() ? config.dailyBuildCron : '')
41+
}
42+
43+
environment {
44+
ARTIFACTORY_CREDENTIALS = credentials('artifactory-credentials')
45+
CORDA_ARTIFACTORY_PASSWORD = "${env.ARTIFACTORY_CREDENTIALS_PSW}"
46+
CORDA_ARTIFACTORY_USERNAME = "${env.ARTIFACTORY_CREDENTIALS_USR}"
47+
GRADLE_USER_HOME = '/host_tmp/gradle'
48+
}
49+
50+
parameters {
51+
string(name: 'COMMIT_TO_CHECKOUT', defaultValue: '', description: 'Commit ID to check out of SCM - leave blank to take head of current branch')
52+
string(name: 'CORDA_IMAGE_TAG', defaultValue: '', description: 'Tag for Corda images to be used in the test')
53+
}
54+
55+
options {
56+
buildDiscarder(logRotator(daysToKeepStr: '30', artifactDaysToKeepStr: '30'))
57+
timestamps()
58+
}
59+
60+
stages {
61+
stage('check out') {
62+
steps {
63+
script {
64+
gitUtils.checkoutGitRevisionOfTriggeringJob(params.COMMIT_TO_CHECKOUT)
65+
}
66+
}
67+
}
68+
stage('Prep') {
69+
steps {
70+
sh label: 'Check that docker engine is available', script: 'docker info'
71+
sh 'docker login corda-os-docker.software.r3.com -u "${CORDA_ARTIFACTORY_USERNAME}" -p "${CORDA_ARTIFACTORY_PASSWORD}"'
72+
}
73+
}
74+
stage('Test') {
75+
environment {
76+
CORDA_IMAGE_TAG = "${params.CORDA_IMAGE_TAG}"
77+
}
78+
steps {
79+
script {
80+
gradlew(
81+
config.gradleTestTarget,
82+
config.gradleTestPerformanceTuning,
83+
config.gradleTestAdditionalArgs,
84+
)
85+
}
86+
}
87+
post {
88+
always {
89+
junit allowEmptyResults: true, testResults: '**/test-results/**/TEST-*.xml'
90+
}
91+
}
92+
}
93+
}
94+
95+
post {
96+
always {
97+
findBuildScans()
98+
step([$class: 'ClaimPublisher'])
99+
}
100+
failure {
101+
script {
102+
if (config.enableNotifications) {
103+
sendSlackNotifications("danger", "BUILD FAILURE", false, "${config.slackChannel}")
104+
}
105+
}
106+
}
107+
aborted {
108+
script {
109+
if (config.enableNotifications) {
110+
sendSlackNotifications(BuildConstants.SLACK_ABORT_BUILD_COLOR, "BUILD ABORTED - Aborted Builds may be a result of a timeout please investigate", true, "${config.slackChannel}")
111+
}
112+
}
113+
}
114+
}
115+
}
116+
117+
def gradlew(String... args) {
118+
allArgs = args.join(' ')
119+
sh "./gradlew ${allArgs}"
120+
}

.ci/JenkinsfileMergeAutomation

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! groovy
2-
@Library('corda-shared-build-pipeline-steps@5.2') _
2+
@Library('corda-shared-build-pipeline-steps@5.3') _
33

44
/**
55
* Forward merge any changes in current branch to the branch with following version.
@@ -14,13 +14,13 @@
1414
* the branch name of origin branch, it should match the current branch
1515
* and it acts as a fail-safe inside {@code forwardMerger} pipeline
1616
*/
17-
String originBranch = 'release/os/5.1'
17+
String originBranch = 'release/os/5.2'
1818

1919
/**
2020
* the branch name of target branch, it should be the branch with the next version
2121
* after the one in current branch.
2222
*/
23-
String targetBranch = 'release/os/5.2'
23+
String targetBranch = 'release/os/5.3'
2424

2525
/**
2626
* Forward merge any changes between {@code originBranch} and {@code targetBranch}

.ci/JenkinsfileSnykDelta

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@Library('corda-shared-build-pipeline-steps@5.2') _
1+
@Library('corda-shared-build-pipeline-steps@5.3') _
22

33
snykDelta(
44
snykOrgId: 'corda5-snyk-org-id',

.ci/JenkinsfileSonarCloud

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
@Library('[email protected]') _
2+
3+
import com.r3.build.agents.KubernetesAgent
4+
import com.r3.build.enums.BuildEnvironment
5+
import com.r3.build.enums.KubernetesCluster
6+
import com.r3.build.BuildConstants
7+
import com.r3.build.utils.GitUtils
8+
import com.r3.build.utils.SnykUtils
9+
10+
KubernetesAgent k8s = new KubernetesAgent(
11+
BuildEnvironment.AMD64_LINUX_JAVA17,
12+
KubernetesCluster.JenkinsAgents,
13+
1
14+
)
15+
16+
GitUtils gitUtils = new GitUtils(this)
17+
SnykUtils snykUtils = new SnykUtils(this)
18+
19+
pipeline {
20+
agent {
21+
kubernetes {
22+
cloud k8s.buildCluster.cloudName
23+
yaml k8s.JSON
24+
yamlMergeStrategy merge() // important to keep tolerations from the inherited template
25+
idleMinutes 15
26+
podRetention always()
27+
nodeSelector k8s.nodeSelector
28+
label k8s.jenkinsLabel
29+
showRawYaml true
30+
defaultContainer k8s.defaultContainer.name
31+
}
32+
}
33+
34+
environment {
35+
ARTIFACTORY_CREDENTIALS = credentials('artifactory-credentials')
36+
CORDA_ARTIFACTORY_PASSWORD = "${env.ARTIFACTORY_CREDENTIALS_PSW}"
37+
CORDA_ARTIFACTORY_USERNAME = "${env.ARTIFACTORY_CREDENTIALS_USR}"
38+
BUILD_CACHE_CREDENTIALS = credentials('gradle-ent-cache-credentials')
39+
BUILD_CACHE_PASSWORD = "${env.BUILD_CACHE_CREDENTIALS_PSW}"
40+
BUILD_CACHE_USERNAME = "${env.BUILD_CACHE_CREDENTIALS_USR}"
41+
CORDA_GRADLE_SCAN_KEY = credentials('gradle-build-scans-key')
42+
GRADLE_USER_HOME = "/host_tmp/gradle"
43+
SNYK_TOKEN = credentials("r3-snyk-corda5")
44+
SNYK_ORG_ID = credentials("corda5-snyk-org-id")
45+
}
46+
47+
options {
48+
timestamps()
49+
}
50+
51+
triggers {
52+
cron (gitUtils.isReleaseBranch() ? '@midnight' : '')
53+
}
54+
55+
stages {
56+
stage('SonarQube analysis') {
57+
when {
58+
expression { return env.BRANCH_NAME == gitUtils.getDefaultBranch(gitUtils.getRepoName())}
59+
}
60+
steps {
61+
withSonarQubeEnv('SonarCloud') {
62+
sh './gradlew sonar -Si'
63+
}
64+
}
65+
}
66+
stage('Snyk Code analysis') {
67+
steps {
68+
script {
69+
snykUtils.runSnykCode()
70+
}
71+
}
72+
}
73+
}
74+
}

.ci/JenkinsfileStaticAnalysis

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@Library('corda-shared-build-pipeline-steps@5.2') _
1+
@Library('corda-shared-build-pipeline-steps@5.3') _
22

33
staticCodeAnalysisPipeline(
44
snykCodeEnabled : true

.ci/PublishHelmChart/Jenkinsfile_PublishHelmChart

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! groovy
2-
@Library('corda-shared-build-pipeline-steps@5.2') _
2+
@Library('corda-shared-build-pipeline-steps@5.3') _
33

44
import com.r3.build.agents.KubernetesAgent
55
import com.r3.build.enums.BuildEnvironment

.ci/dev/forward-merge/JenkinsInteropMerge

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@Library('corda-shared-build-pipeline-steps@5.2') _
1+
@Library('corda-shared-build-pipeline-steps@5.3') _
22

33
/*
44
* Forward merge any changes in current branch to the branch with following version.

.ci/dev/forward-merge/JenkinsfileMergeAutomation

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! groovy
2-
@Library('corda-shared-build-pipeline-steps@5.2') _
2+
@Library('corda-shared-build-pipeline-steps@5.3') _
33

44
/**
55
* Forward merge any changes in current branch to the branch with following version.
@@ -14,13 +14,13 @@
1414
* the branch name of origin branch, it should match the current branch
1515
* and it acts as a fail-safe inside {@code forwardMerger} pipeline
1616
*/
17-
String originBranch = 'release/os/5.2'
17+
String originBranch = 'release/os/5.3'
1818

1919
/**
2020
* the branch name of target branch, it should be the branch with the next version
2121
* after the one in current branch.
2222
*/
23-
String targetBranch = 'release/os/5.3'
23+
String targetBranch = 'release/os/5.4'
2424

2525
/**
2626
* Forward merge any changes between {@code originBranch} and {@code targetBranch}

.ci/e2eTests/Jenkinsfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
@Library('corda-shared-build-pipeline-steps@5.2') _
1+
@Library('corda-shared-build-pipeline-steps@5.3') _
22

33
endToEndPipeline(
44
assembleAndCompile: false,
55
dailyBuildCron: '',
66
multiCluster: false,
7-
gradleTestTargetsToExecute: ['smokeTest', 'e2eTest'],
7+
gradleTestTargetsToExecute: ['smokeTest'],
88
usePackagedCordaHelmChart: false,
99
// TODO - remove this when J17 is the default in the pipeline
1010
javaVersion: '17'

0 commit comments

Comments
 (0)