From f05e0323870cc301e1299f43dd311a7b4c025e33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E6=8C=AF=E5=AE=87?= <> Date: Mon, 10 Feb 2025 06:43:33 +0800 Subject: [PATCH] fix(pipeline): update artifact listing command to target specific artifacts and adjust stash includes pattern MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 孙振宇 <> --- first-class-pipeline/vars/executeFreeleapsPipeline.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/first-class-pipeline/vars/executeFreeleapsPipeline.groovy b/first-class-pipeline/vars/executeFreeleapsPipeline.groovy index e550d02e..d36e22fe 100644 --- a/first-class-pipeline/vars/executeFreeleapsPipeline.groovy +++ b/first-class-pipeline/vars/executeFreeleapsPipeline.groovy @@ -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 {