From 4d79deb0a2a96cdb17b343f3889e6ea74a68ce43 Mon Sep 17 00:00:00 2001 From: "AO Industries, Inc" Date: Fri, 8 Sep 2023 03:08:38 +0000 Subject: [PATCH] copyArtifacts changes: only use stable, required when params.requireLastBuild --- Jenkinsfile | 4 ++-- book/Jenkinsfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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()