mirror of
https://github.com/corda/corda.git
synced 2024-12-21 05:53:23 +00:00
cd4626d8c2
* 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
77 lines
2.1 KiB
Groovy
77 lines
2.1 KiB
Groovy
@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 */
|
|
}
|
|
}
|
|
}
|