From 1d43471709f72b5798ae57c7f490fd4784f0a641 Mon Sep 17 00:00:00 2001 From: Waldemar Zurowski Date: Fri, 18 Sep 2020 08:09:20 +0200 Subject: [PATCH] Refactoring of regression Jenkins configuration * removed archiving of Gradle JUnit HTML reports * collection of JUnit tests moved to stage in parallel branch --- .ci/dev/regression/Jenkinsfile | 47 +++++++++++++++++----------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/.ci/dev/regression/Jenkinsfile b/.ci/dev/regression/Jenkinsfile index 7efc7a3b72..f773438b4b 100644 --- a/.ci/dev/regression/Jenkinsfile +++ b/.ci/dev/regression/Jenkinsfile @@ -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']]