diff --git a/first-class-pipeline/vars/executeFreeleapsPipeline.groovy b/first-class-pipeline/vars/executeFreeleapsPipeline.groovy index 0548386f..8c2ee1cb 100644 --- a/first-class-pipeline/vars/executeFreeleapsPipeline.groovy +++ b/first-class-pipeline/vars/executeFreeleapsPipeline.groovy @@ -448,7 +448,9 @@ spec: log.info("Pipeline", "Stashing root directory for ${component.name}...") stash includes: "", name: "${component.name}-root" } else if (targetPathType.trim() == "dir") { - stash includes: "${artifact}/**", name: "${component.name}-${artifact}" + def stashName = artifact.replace('/', '-').replace('.', '-') + log.info("Pipeline", "Stashing directory ${artifact} for ${component.name}...") + stash includes: "${artifact}/**", name: "${stashName}-${artifact}" } else { stash includes: artifact, name: "${component.name}-${artifact}" } @@ -530,7 +532,9 @@ spec: if (artifact == '.' || artifact == './') { unstash "${component.name}-root" } else { - unstash "${component.name}-${artifact}" + def stashName = artifact.replace('/', '-').replace('.', '-') + log.info("Pipeline", "Fetch stashed directory ${artifact} for ${component.name}...") + unstash "${stashName}-${artifact}" } }