From 0fd294ba4a287385749140f8bb517145a7fd84ac Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Thu, 30 Nov 2023 07:04:58 +1000 Subject: [PATCH] save jetty-home artifacts in case of label save-home (#10931) * save jetty-home artifacts in case of label save-home * save home from local repo as it is installed even with cache --------- Signed-off-by: Olivier Lamy --- Jenkinsfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index ec1ea09383d..364797151be 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -128,6 +128,9 @@ def mavenBuild(jdk, cmdline, mvnName) { } } sh "mvn $extraArgs -DsettingsPath=$GLOBAL_MVN_SETTINGS -Dmaven.repo.uri=http://nexus-service.nexus.svc.cluster.local:8081/repository/maven-public/ -ntp -s $GLOBAL_MVN_SETTINGS -Dmaven.repo.local=.repository -Pci -V -B -e -U $cmdline" + if(saveHome()) { + archiveArtifacts artifacts: ".repository/org/eclipse/jetty/jetty-home/**/jetty-home-*", allowEmptyArchive: true, onlyIfSuccessful: false + } } } } @@ -152,4 +155,11 @@ def useBuildCache() { // return false } +def saveHome() { + if (env.BRANCH_NAME ==~ /PR-\d+/) { + return pullRequest.labels.contains("save-home") + } + return false; +} + // vim: et:ts=2:sw=2:ft=groovy