From cd4626d8c2b538154530f8074fb2769c1ac77383 Mon Sep 17 00:00:00 2001 From: Ross Nicoll Date: Wed, 22 Jul 2020 08:08:49 +0000 Subject: [PATCH] CORDA-3917 Update to Jackson 2.9.8 (#6493) * Update to Jackson 2.9.8 to address multiple security issues, and update warning note about updates to clarify that it refers to 2.10+. When the note was added 2.9.7 as the highest available version in the 2.9.x series. * Add PR code checks Jenkinsfile --- .ci/dev/pr-code-checks/Jenkinsfile | 76 ++++++++++++++++++++++++++++++ build.gradle | 4 +- 2 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 .ci/dev/pr-code-checks/Jenkinsfile diff --git a/.ci/dev/pr-code-checks/Jenkinsfile b/.ci/dev/pr-code-checks/Jenkinsfile new file mode 100644 index 0000000000..a64813c92f --- /dev/null +++ b/.ci/dev/pr-code-checks/Jenkinsfile @@ -0,0 +1,76 @@ +@Library('corda-shared-build-pipeline-steps') +import static com.r3.build.BuildControl.killAllExistingBuildsForJob + +killAllExistingBuildsForJob(env.JOB_NAME, env.BUILD_NUMBER.toInteger()) + +pipeline { + agent { label 'k8s' } + options { + timestamps() + timeout(time: 3, unit: 'HOURS') + buildDiscarder(logRotator(daysToKeepStr: '14', artifactDaysToKeepStr: '14')) + } + + environment { + PR_CONTEXT_STRING = "PR Code Checks" + } + + stages { + stage('Detekt check') { + steps { + script { + pullRequest.createStatus( + status: 'pending', + context: "${PR_CONTEXT_STRING}", + description: "Running code checks", + targetUrl: "${env.BUILD_URL}") + } + sh "./gradlew --no-daemon clean detekt" + } + } + + stage('Compilation warnings check') { + steps { + sh "./gradlew --no-daemon -Pcompilation.warningsAsErrors=true compileAll" + } + } + + stage('No API change check') { + steps { + sh "./gradlew --no-daemon generateApi" + sh ".ci/check-api-changes.sh" + } + } + + stage('Deploy Nodes') { + steps { + sh "./gradlew --no-daemon jar deployNodes" + } + } + } + + post { + success { + script { + pullRequest.createStatus( + status: 'success', + context: "${PR_CONTEXT_STRING}", + description: 'Code checks passed', + targetUrl: "${env.BUILD_URL}") + } + } + + failure { + script { + pullRequest.createStatus( + status: 'failure', + context: "${PR_CONTEXT_STRING}", + description: 'Code checks failed', + targetUrl: "${env.BUILD_URL}") + } + } + cleanup { + deleteDir() /* clean up our workspace */ + } + } +} diff --git a/build.gradle b/build.gradle index e1b3594f59..00cc0470be 100644 --- a/build.gradle +++ b/build.gradle @@ -61,8 +61,8 @@ buildscript { ext.asm_version = '7.1' ext.artemis_version = '2.6.2' - // TODO Upgrade Jackson only when corda is using kotlin 1.3.10 - ext.jackson_version = '2.9.7' + // TODO Upgrade to Jackson 2.10+ only when corda is using kotlin 1.3.10 + ext.jackson_version = '2.9.8' ext.jetty_version = '9.4.19.v20190610' ext.jersey_version = '2.25' ext.servlet_version = '4.0.1'