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 <olamy@apache.org>
This commit is contained in:
Olivier Lamy 2023-11-30 07:04:58 +10:00 committed by GitHub
parent 82fbf3d4e9
commit 0fd294ba4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

10
Jenkinsfile vendored
View File

@ -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