mirror of
https://github.com/corda/corda.git
synced 2025-02-23 02:22:41 +00:00
Merge pull request #6727 from corda/INFRA-683-os-45-linear-builds-parallel-stages
INFRA-683: Refactoring of regression Jenkins configuration
This commit is contained in:
commit
87f7323f0e
139
.ci/dev/regression/Jenkinsfile
vendored
139
.ci/dev/regression/Jenkinsfile
vendored
@ -52,10 +52,15 @@ String COMMON_GRADLE_PARAMS = [
|
|||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'standard' }
|
agent { label 'standard' }
|
||||||
|
|
||||||
|
/*
|
||||||
|
* List options in alphabetical order
|
||||||
|
*/
|
||||||
options {
|
options {
|
||||||
timestamps()
|
|
||||||
timeout(time: 6, unit: 'HOURS')
|
|
||||||
buildDiscarder(logRotator(daysToKeepStr: '14', artifactDaysToKeepStr: '14'))
|
buildDiscarder(logRotator(daysToKeepStr: '14', artifactDaysToKeepStr: '14'))
|
||||||
|
parallelsAlwaysFailFast()
|
||||||
|
timeout(time: 6, unit: 'HOURS')
|
||||||
|
timestamps()
|
||||||
}
|
}
|
||||||
|
|
||||||
parameters {
|
parameters {
|
||||||
@ -85,6 +90,11 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stage('Stash') {
|
||||||
|
steps {
|
||||||
|
stash name: 'compiled', useDefaultExcludes: false
|
||||||
|
}
|
||||||
|
}
|
||||||
stage('Sonatype Check') {
|
stage('Sonatype Check') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
@ -104,6 +114,57 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stage('All Tests') {
|
||||||
|
parallel {
|
||||||
|
stage('Another agent') {
|
||||||
|
agent {
|
||||||
|
label 'standard'
|
||||||
|
}
|
||||||
|
options {
|
||||||
|
skipDefaultCheckout true
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
archiveArtifacts artifacts: '**/*.log', fingerprint: false
|
||||||
|
junit testResults: '**/build/test-results/**/*.xml', keepLongStdio: true
|
||||||
|
/*
|
||||||
|
* Copy all JUnit results files into a single top level directory.
|
||||||
|
* This is necessary to stop the allure plugin from hitting out
|
||||||
|
* of memory errors due to being passed many directories with
|
||||||
|
* long paths.
|
||||||
|
*
|
||||||
|
* File names are pre-pended with a prefix when
|
||||||
|
* copied to avoid collisions between files where the same test
|
||||||
|
* classes have run on multiple agents.
|
||||||
|
*/
|
||||||
|
fileOperations([fileCopyOperation(
|
||||||
|
includes: '**/build/test-results/**/*.xml',
|
||||||
|
targetLocation: 'allure-input',
|
||||||
|
flattenFiles: true,
|
||||||
|
renameFiles: true,
|
||||||
|
sourceCaptureExpression: '.*/([^/]+)$',
|
||||||
|
targetNameExpression: 'other-agent-$1')])
|
||||||
|
stash name: 'allure-input', includes: 'allure-input/**', useDefaultExcludes: false
|
||||||
|
}
|
||||||
|
cleanup {
|
||||||
|
deleteDir() /* clean up our workspace */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Unstash') {
|
||||||
|
steps {
|
||||||
|
unstash 'compiled'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Recompile') {
|
||||||
|
steps {
|
||||||
|
sh script: [
|
||||||
|
'./gradlew',
|
||||||
|
COMMON_GRADLE_PARAMS,
|
||||||
|
'jar'
|
||||||
|
].join(' ')
|
||||||
|
}
|
||||||
|
}
|
||||||
stage('Unit Test') {
|
stage('Unit Test') {
|
||||||
steps {
|
steps {
|
||||||
sh script: [
|
sh script: [
|
||||||
@ -113,17 +174,6 @@ pipeline {
|
|||||||
].join(' ')
|
].join(' ')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Integration Test') {
|
|
||||||
steps {
|
|
||||||
sh script: [
|
|
||||||
'./gradlew',
|
|
||||||
COMMON_GRADLE_PARAMS,
|
|
||||||
'integrationTest'
|
|
||||||
].join(' ')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Smoke Test') {
|
stage('Smoke Test') {
|
||||||
steps {
|
steps {
|
||||||
sh script: [
|
sh script: [
|
||||||
@ -133,7 +183,6 @@ pipeline {
|
|||||||
].join(' ')
|
].join(' ')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Slow Integration Test') {
|
stage('Slow Integration Test') {
|
||||||
steps {
|
steps {
|
||||||
sh script: [
|
sh script: [
|
||||||
@ -143,6 +192,42 @@ pipeline {
|
|||||||
].join(' ')
|
].join(' ')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Same agent') {
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
archiveArtifacts artifacts: '**/*.log', fingerprint: false
|
||||||
|
junit testResults: '**/build/test-results/**/*.xml', keepLongStdio: true
|
||||||
|
/*
|
||||||
|
* Copy all JUnit results files into a single top level directory.
|
||||||
|
* This is necessary to stop the allure plugin from hitting out
|
||||||
|
* of memory errors due to being passed many directories with
|
||||||
|
* long paths.
|
||||||
|
*
|
||||||
|
* File names are pre-pended with a prefix when
|
||||||
|
* copied to avoid collisions between files where the same test
|
||||||
|
* classes have run on multiple agents.
|
||||||
|
*/
|
||||||
|
fileOperations([fileCopyOperation(
|
||||||
|
includes: '**/build/test-results/**/*.xml',
|
||||||
|
targetLocation: 'allure-input',
|
||||||
|
flattenFiles: true,
|
||||||
|
renameFiles: true,
|
||||||
|
sourceCaptureExpression: '.*/([^/]+)$',
|
||||||
|
targetNameExpression: 'same-agent-$1')])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Integration Test') {
|
||||||
|
steps {
|
||||||
|
sh script: [
|
||||||
|
'./gradlew',
|
||||||
|
COMMON_GRADLE_PARAMS,
|
||||||
|
'integrationTest'
|
||||||
|
].join(' ')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stage('Deploy Node') {
|
stage('Deploy Node') {
|
||||||
steps {
|
steps {
|
||||||
@ -153,6 +238,10 @@ pipeline {
|
|||||||
].join(' ')
|
].join(' ')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stage('Publish to Artifactory') {
|
stage('Publish to Artifactory') {
|
||||||
when {
|
when {
|
||||||
@ -206,29 +295,9 @@ pipeline {
|
|||||||
|
|
||||||
post {
|
post {
|
||||||
always {
|
always {
|
||||||
archiveArtifacts artifacts: '**/*.log', fingerprint: false
|
|
||||||
archiveArtifacts artifacts: '**/build/reports/tests/**', fingerprint: false
|
|
||||||
junit testResults: '**/build/test-results/**/*.xml', keepLongStdio: true
|
|
||||||
|
|
||||||
script {
|
script {
|
||||||
try {
|
try {
|
||||||
/*
|
unstash 'allure-input'
|
||||||
* Copy all JUnit results files into a single top level directory.
|
|
||||||
* This is necessary to stop the allure plugin from hitting out
|
|
||||||
* of memory errors due to being passed many directories with
|
|
||||||
* long paths.
|
|
||||||
*
|
|
||||||
* File names are pre-pended with the pod number when
|
|
||||||
* copied to avoid collisions between files where the same test
|
|
||||||
* classes have run on multiple pods.
|
|
||||||
*/
|
|
||||||
fileOperations([fileCopyOperation(
|
|
||||||
includes: '**/test-results-xml/**/test-runs/test-reports/**',
|
|
||||||
targetLocation: 'allure-input',
|
|
||||||
flattenFiles: true,
|
|
||||||
renameFiles: true,
|
|
||||||
sourceCaptureExpression: '.*test-results-xml/.*-([\\d]+)/.*/([^/]+)$',
|
|
||||||
targetNameExpression: '$1-$2')])
|
|
||||||
allure includeProperties: false,
|
allure includeProperties: false,
|
||||||
jdk: '',
|
jdk: '',
|
||||||
results: [[path: '**/allure-input']]
|
results: [[path: '**/allure-input']]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user