fix(pipeline): update stash naming convention to include component name

Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
zhenyus 2025-02-25 12:50:24 +08:00
parent ad65e1ded9
commit c54fd610b8

View File

@ -450,7 +450,7 @@ spec:
} else if (targetPathType.trim() == "dir") {
def stashName = artifact.replace('/', '-').replace('.', '-')
log.info("Pipeline", "Stashing directory ${artifact} for ${component.name}...")
stash includes: "${artifact}/**", name: "${stashName}-${artifact}"
stash includes: "${artifact}/**", name: "${component.name}-${stashName}"
} else {
stash includes: artifact, name: "${component.name}-${artifact}"
}
@ -534,7 +534,7 @@ spec:
} else {
def stashName = artifact.replace('/', '-').replace('.', '-')
log.info("Pipeline", "Fetch stashed directory ${artifact} for ${component.name}...")
unstash "${stashName}-${artifact}"
unstash "${component.name}-${stashName}"
}
}