mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +00:00
Merge branch 'release/os/4.10' into cc/merge/os-4.10-os-4.11/03-may-2023
Fwd-merge from OS 4.11.
This commit is contained in:
commit
cca09fef58
@ -19,34 +19,6 @@ killAllExistingBuildsForJob(env.JOB_NAME, env.BUILD_NUMBER.toInteger())
|
||||
*/
|
||||
boolean isReleaseTag = (env.TAG_NAME =~ /^release.*JDK11$/)
|
||||
|
||||
/*
|
||||
** calculate the stage for NexusIQ evaluation
|
||||
** * build for snapshots
|
||||
** * stage-release: for release candidates and for health checks
|
||||
** * release: for GA release
|
||||
*/
|
||||
def nexusDefaultIqStage = "build"
|
||||
if (isReleaseTag) {
|
||||
switch (env.TAG_NAME) {
|
||||
case ~/.*-RC\d+(-.*)?/: nexusDefaultIqStage = "stage-release"; break;
|
||||
case ~/.*-HC\d+(-.*)?/: nexusDefaultIqStage = "stage-release"; break;
|
||||
default: nexusDefaultIqStage = "release"
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* make sure calculated default value of NexusIQ stage is first in the list
|
||||
* thus making it default for the `choice` parameter
|
||||
*/
|
||||
def nexusIqStageChoices = [nexusDefaultIqStage].plus(
|
||||
[
|
||||
'develop',
|
||||
'build',
|
||||
'stage-release',
|
||||
'release',
|
||||
'operate'
|
||||
].minus([nexusDefaultIqStage]))
|
||||
|
||||
/**
|
||||
* Common Gradle arguments for all Gradle executions
|
||||
*/
|
||||
@ -84,10 +56,6 @@ pipeline {
|
||||
timestamps()
|
||||
}
|
||||
|
||||
parameters {
|
||||
choice choices: nexusIqStageChoices, description: 'NexusIQ stage for code evaluation', name: 'nexusIqStage'
|
||||
}
|
||||
|
||||
/*
|
||||
* List environment variables in alphabetical order
|
||||
*/
|
||||
@ -119,27 +87,6 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
stage('Sonatype Check') {
|
||||
steps {
|
||||
dir(sameAgentFolder) {
|
||||
script {
|
||||
sh "./gradlew --no-daemon properties | grep -E '^(version|group):' >version-properties"
|
||||
/* every build related to Corda X.Y (GA, RC, HC, patch or snapshot) uses the same NexusIQ application */
|
||||
def version = sh(returnStdout: true, script: "grep ^version: version-properties | sed -e 's/^version: \\([0-9]\\+\\(\\.[0-9]\\+\\)\\+\\).*\$/\\1/'").trim()
|
||||
def groupId = sh(returnStdout: true, script: "grep ^group: version-properties | sed -e 's/^group: //'").trim()
|
||||
def artifactId = 'corda'
|
||||
nexusAppId = "${groupId}-${artifactId}-${version}"
|
||||
}
|
||||
nexusPolicyEvaluation(
|
||||
failBuildOnNetworkError: false,
|
||||
iqApplication: selectedApplication(nexusAppId), // application *has* to exist before a build starts!
|
||||
iqScanPatterns: [[scanPattern: 'node/capsule/build/libs/corda*.jar']],
|
||||
iqStage: params.nexusIqStage
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('All Tests') {
|
||||
parallel {
|
||||
stage('Another agent') {
|
||||
|
@ -14,25 +14,6 @@ import static com.r3.build.BuildControl.killAllExistingBuildsForJob
|
||||
|
||||
killAllExistingBuildsForJob(env.JOB_NAME, env.BUILD_NUMBER.toInteger())
|
||||
|
||||
/*
|
||||
** calculate the stage for NexusIQ evaluation
|
||||
** * build for snapshots
|
||||
*/
|
||||
def nexusDefaultIqStage = "build"
|
||||
|
||||
/**
|
||||
* make sure calculated default value of NexusIQ stage is first in the list
|
||||
* thus making it default for the `choice` parameter
|
||||
*/
|
||||
def nexusIqStageChoices = [nexusDefaultIqStage].plus(
|
||||
[
|
||||
'develop',
|
||||
'build',
|
||||
'stage-release',
|
||||
'release',
|
||||
'operate'
|
||||
].minus([nexusDefaultIqStage]))
|
||||
|
||||
pipeline {
|
||||
agent { label 'standard' }
|
||||
|
||||
@ -44,10 +25,6 @@ pipeline {
|
||||
buildDiscarder(logRotator(daysToKeepStr: '14', artifactDaysToKeepStr: '14'))
|
||||
}
|
||||
|
||||
parameters {
|
||||
choice choices: nexusIqStageChoices, description: 'NexusIQ stage for code evaluation', name: 'nexusIqStage'
|
||||
}
|
||||
|
||||
triggers {
|
||||
cron '@midnight'
|
||||
}
|
||||
@ -61,27 +38,6 @@ pipeline {
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Sonatype Check') {
|
||||
steps {
|
||||
authenticateGradleWrapper()
|
||||
sh "./gradlew --no-daemon clean jar"
|
||||
script {
|
||||
sh "./gradlew --no-daemon properties | grep -E '^(version|group):' >version-properties"
|
||||
/* every build related to Corda X.Y (GA, RC, HC, patch or snapshot) uses the same NexusIQ application */
|
||||
def version = sh (returnStdout: true, script: "grep ^version: version-properties | sed -e 's/^version: \\([0-9]\\+\\(\\.[0-9]\\+\\)\\+\\).*\$/\\1/'").trim()
|
||||
def groupId = sh (returnStdout: true, script: "grep ^group: version-properties | sed -e 's/^group: //'").trim()
|
||||
def artifactId = 'corda'
|
||||
nexusAppId = "${groupId}-${artifactId}-${version}"
|
||||
}
|
||||
nexusPolicyEvaluation (
|
||||
failBuildOnNetworkError: false,
|
||||
iqApplication: selectedApplication(nexusAppId), // application *has* to exist before a build starts!
|
||||
iqScanPatterns: [[scanPattern: 'node/capsule/build/libs/corda*.jar']],
|
||||
iqStage: params.nexusIqStage
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
stage('Publish to Artifactory') {
|
||||
steps {
|
||||
rtServer (
|
||||
|
@ -124,6 +124,7 @@ buildscript {
|
||||
ext.docker_java_version = constants.getProperty("dockerJavaVersion")
|
||||
ext.commons_configuration2_version = constants.getProperty("commonsConfiguration2Version")
|
||||
ext.commons_text_version = constants.getProperty("commonsTextVersion")
|
||||
ext.snake_yaml_version = constants.getProperty("snakeYamlVersion")
|
||||
if (JavaVersion.current().isJava8()) {
|
||||
ext.fontawesomefx_commons_version = constants.getProperty("fontawesomefxCommonsJava8Version")
|
||||
ext.fontawesomefx_fontawesome_version = constants.getProperty("fontawesomefxFontawesomeJava8Version")
|
||||
@ -464,6 +465,9 @@ allprojects {
|
||||
details.useVersion commons_text_version
|
||||
}
|
||||
}
|
||||
if (details.requested.group == 'org.yaml' && details.requested.name == 'snakeyaml') {
|
||||
details.useVersion snake_yaml_version
|
||||
}
|
||||
}
|
||||
|
||||
dependencySubstitution {
|
||||
|
@ -30,6 +30,7 @@ disruptorVersion=3.4.2
|
||||
typesafeConfigVersion=1.3.4
|
||||
jsr305Version=3.0.2
|
||||
artifactoryPluginVersion=4.16.1
|
||||
snakeYamlVersion=1.33
|
||||
caffeineVersion=2.9.3
|
||||
metricsVersion=4.1.0
|
||||
metricsNewRelicVersion=1.1.1
|
||||
@ -51,7 +52,7 @@ capsuleVersion=1.0.3
|
||||
asmVersion=7.1
|
||||
artemisVersion=2.19.1
|
||||
# TODO Upgrade Jackson only when corda is using kotlin 1.3.10
|
||||
jacksonVersion=2.13.3
|
||||
jacksonVersion=2.13.5
|
||||
jacksonKotlinVersion=2.9.7
|
||||
jettyVersion=9.4.19.v20190610
|
||||
jerseyVersion=2.25
|
||||
|
@ -8,6 +8,7 @@ import net.corda.core.flows.*
|
||||
import net.corda.core.identity.Party
|
||||
import net.corda.core.internal.concurrent.transpose
|
||||
import net.corda.core.messaging.startFlow
|
||||
import net.corda.core.node.services.StatesNotAvailableException
|
||||
import net.corda.core.node.services.queryBy
|
||||
import net.corda.core.node.services.vault.QueryCriteria
|
||||
import net.corda.core.transactions.TransactionBuilder
|
||||
@ -70,7 +71,11 @@ class ScheduledFlowIntegrationTests {
|
||||
val state = results.states.firstOrNull() ?: return
|
||||
require(!state.state.data.processed) { "Cannot spend an already processed state" }
|
||||
val lock = UUID.randomUUID()
|
||||
serviceHub.vaultService.softLockReserve(lock, NonEmptySet.of(state.ref))
|
||||
try {
|
||||
serviceHub.vaultService.softLockReserve(lock, NonEmptySet.of(state.ref))
|
||||
} catch (e: StatesNotAvailableException) {
|
||||
return
|
||||
}
|
||||
val notary = state.state.notary
|
||||
val outputState = SpentState(identity, ourIdentity, state.state.data.destination)
|
||||
val builder = TransactionBuilder(notary)
|
||||
|
@ -4,6 +4,7 @@ import co.paralleluniverse.fibers.Suspendable
|
||||
import net.corda.core.contracts.*
|
||||
import net.corda.core.flows.*
|
||||
import net.corda.core.identity.Party
|
||||
import net.corda.core.node.services.StatesNotAvailableException
|
||||
import net.corda.core.transactions.TransactionBuilder
|
||||
import net.corda.core.utilities.NonEmptySet
|
||||
import net.corda.testing.contracts.DummyContract
|
||||
@ -25,7 +26,11 @@ class ScheduledFlow(private val stateRef: StateRef) : FlowLogic<Unit>() {
|
||||
}
|
||||
require(!scheduledState.processed) { "State should not have been previously processed" }
|
||||
val lock = UUID.randomUUID()
|
||||
serviceHub.vaultService.softLockReserve(lock, NonEmptySet.of(state.ref))
|
||||
try {
|
||||
serviceHub.vaultService.softLockReserve(lock, NonEmptySet.of(state.ref))
|
||||
} catch (e: StatesNotAvailableException) {
|
||||
return
|
||||
}
|
||||
val notary = state.state.notary
|
||||
val newStateOutput = scheduledState.copy(processed = true)
|
||||
val builder = TransactionBuilder(notary)
|
||||
|
@ -81,10 +81,10 @@ include 'tools:checkpoint-agent'
|
||||
include 'samples:attachment-demo:contracts'
|
||||
include 'samples:attachment-demo:workflows'
|
||||
include 'samples:trader-demo:workflows-trader'
|
||||
include 'samples:irs-demo'
|
||||
include 'samples:irs-demo:cordapp:contracts-irs'
|
||||
include 'samples:irs-demo:cordapp:workflows-irs'
|
||||
include 'samples:irs-demo:web'
|
||||
// include 'samples:irs-demo'
|
||||
// include 'samples:irs-demo:cordapp:contracts-irs'
|
||||
// include 'samples:irs-demo:cordapp:workflows-irs'
|
||||
// include 'samples:irs-demo:web'
|
||||
include 'samples:simm-valuation-demo'
|
||||
include 'samples:simm-valuation-demo:flows'
|
||||
include 'samples:simm-valuation-demo:contracts-states'
|
||||
|
Loading…
Reference in New Issue
Block a user