Refactoring of regression Jenkins configuration

* removed archiving of Gradle JUnit HTML reports
* collection of JUnit tests moved to stage in parallel branch
This commit is contained in:
Waldemar Zurowski 2020-09-18 08:09:20 +02:00
parent 2064a572ba
commit 1d43471709

View File

@ -126,7 +126,6 @@ pipeline {
post {
always {
archiveArtifacts artifacts: '**/*.log', fingerprint: false
archiveArtifacts artifacts: '**/build/reports/tests/**', fingerprint: false
junit testResults: '**/build/test-results/**/*.xml', keepLongStdio: true
/*
* Copy all JUnit results files into a single top level directory.
@ -196,6 +195,29 @@ pipeline {
}
}
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 {
@ -273,30 +295,9 @@ pipeline {
post {
always {
archiveArtifacts artifacts: '**/*.log', fingerprint: false
archiveArtifacts artifacts: '**/build/reports/tests/**', fingerprint: false
junit testResults: '**/build/test-results/**/*.xml', keepLongStdio: true
unstash 'allure-input'
script {
try {
/*
* 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')])
unstash 'allure-input'
allure includeProperties: false,
jdk: '',
results: [[path: '**/allure-input']]