You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by kw...@apache.org on 2022/06/28 10:48:27 UTC
[sling-tooling-jenkins] branch master updated: SLING-11401 reduce nesting level for stashing
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-jenkins.git
The following commit(s) were added to refs/heads/master by this push:
new fe128d5 SLING-11401 reduce nesting level for stashing
fe128d5 is described below
commit fe128d5479bb5bc4aa991585600c3294bf581c9e
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Tue Jun 28 12:48:22 2022 +0200
SLING-11401 reduce nesting level for stashing
---
vars/slingOsgiBundleBuild.groovy | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/vars/slingOsgiBundleBuild.groovy b/vars/slingOsgiBundleBuild.groovy
index ade9cb2..e88bd6d 100644
--- a/vars/slingOsgiBundleBuild.groovy
+++ b/vars/slingOsgiBundleBuild.groovy
@@ -172,10 +172,12 @@ def defineStage(def globalConfig, def jobConfig, def jdkVersion, boolean isRefer
archiveArtifacts(artifacts: SlingJenkinsHelper.jsonArrayToCsv(jobConfig.archivePatterns), allowEmptyArchive: true)
}
if ( isReferenceStage && goal == "deploy" && shouldDeploy ) {
- echo "trying to stash in ${pwd()}"
- // Stash the build results from the local deployment directory so we can deploy them on another node
- stash name: 'local-snapshots-dir', includes: 'target/local-snapshots-dir/**'
- echo "successfully stashed in ${pwd()}"
+ dir("target") {
+ echo "trying to stash in ${pwd()}"
+ // Stash the build results from the local deployment directory so we can deploy them on another node
+ stash name: 'local-snapshots-dir', includes: 'local-snapshots-dir/**'
+ echo "successfully stashed in ${pwd()}"
+ }
}
}
@@ -253,8 +255,10 @@ def deployToNexus(def globalConfig) {
deleteDir()
// Nexus deployment needs pom.xml
checkout scm
- // Unstash the previously stashed build results.
- unstash name: 'local-snapshots-dir'
+ dir('target') {
+ // Unstash the previously stashed build results.
+ unstash name: 'local-snapshots-dir'
+ }
// https://www.mojohaus.org/wagon-maven-plugin/merge-maven-repos-mojo.html
static final String WAGON_PLUGIN_GAV = "org.codehaus.mojo:wagon-maven-plugin:2.0.2"
String mavenArguments = "${WAGON_PLUGIN_GAV}:merge-maven-repos -Dwagon.target=https://repository.apache.org/content/repositories/snapshots -Dwagon.targetId=apache.snapshots.https -Dwagon.source=file:${env.WORKSPACE}/target/local-snapshots-dir"