diff --git a/Jenkinsfile b/Jenkinsfile index 873eae18..33535b59 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -966,11 +966,11 @@ void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk1 // See https://www.jenkins.io/doc/pipeline/steps/copyartifact/#copyartifacts-copy-artifacts-from-another-project copyArtifacts( projectName: "/${JOB_NAME}", - selector: lastSuccessful(stable: false), + selector: lastSuccessful(stable: true), filter: '**/*.aar, **/*.jar, **/*.war, **/*.zip', target: 'target/last-successful-artifacts', flatten: true, - optional: true + optional: !params.requireLastBuild ) // Temporarily move surefire-reports before withMaven to avoid duplicate logging of test results sh moveSurefireReportsScript() diff --git a/book/Jenkinsfile b/book/Jenkinsfile index a75dadf5..d4e3908f 100644 --- a/book/Jenkinsfile +++ b/book/Jenkinsfile @@ -947,11 +947,11 @@ void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk1 // See https://www.jenkins.io/doc/pipeline/steps/copyartifact/#copyartifacts-copy-artifacts-from-another-project copyArtifacts( projectName: "/${JOB_NAME}", - selector: lastSuccessful(stable: false), + selector: lastSuccessful(stable: true), filter: '**/*.aar, **/*.jar, **/*.war, **/*.zip', target: 'target/last-successful-artifacts', flatten: true, - optional: true + optional: !params.requireLastBuild ) // Temporarily move surefire-reports before withMaven to avoid duplicate logging of test results sh moveSurefireReportsScript()