fix(pipeline): update artifact listing command to target specific artifacts and adjust stash includes pattern
Signed-off-by: 孙振宇 <>
This commit is contained in:
parent
205c8446b4
commit
f05e032387
@ -320,7 +320,7 @@ def generateComponentStages(component, configurations) {
|
||||
}
|
||||
component.buildArtifacts.each { artifact ->
|
||||
log.info("Pipeline", "Stashing artifact ${artifact} for ${component.name}...")
|
||||
def artifactList = sh(script: "ls -al", returnStdout: true)
|
||||
def artifactList = sh(script: "ls ${artifact} -al", returnStdout: true)
|
||||
log.info("Pipeline", "Artifacts list: ${artifactList}")
|
||||
def targetPathType = sh(
|
||||
script: """
|
||||
@ -335,7 +335,7 @@ def generateComponentStages(component, configurations) {
|
||||
returnStdout: true
|
||||
)
|
||||
if (artifact == '.' || artifact == './') {
|
||||
stash includes: "./**", name: "${component.name}-root"
|
||||
stash includes: "", name: "${component.name}-root"
|
||||
} else if (targetPathType.trim() == "dir") {
|
||||
stash includes: "${artifact}/**", name: "${component.name}-${artifact}"
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user