-
Improvement
-
Resolution: Unresolved
-
Major
-
Jenkins 2.46.1
Pipeline 2.5
I have a pipeline script that runs parallel builds and captures artifacts from each build. The artifacts all have the same name and path. The pipeline syntax doesn't offer a way to namespace these artifacts or bundle particular builds together so they don't overwrite each other. Here's a snippet of my script that should reproduce the problem.
pipeline {
agent none
stages {
stage("Build/Test") {
steps {
script {
def builds = [:]
for (def config in ["debug", "default", "opt"]) {
def config_inside = "${config}"
builds["${config_inside}"] = {
node ("node001") {
stage("Build Test ${config_inside}") {
sh "$HOME/software/jenkins_scripts/nightly.sh ${config_inside} gnu yes $WORKSPACE"
junit allowEmptyResults: true, testResults: 'test/mpi/summary.junit.xml'
archiveArtifacts 'filtered-make.txt,c.txt,**/config.log,m.txt,mi.txt,test/mpi/summary.junit.xml'
}
}
}
}
}
parallel builds
}
}
}
}
}