Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-44148

Add ability to have artifacts with the same name in parallel pipeline stages

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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
                      }
                  }
              }
          }
      }
      

        Attachments

          Activity

          wbland Wesley Bland created issue -
          abayer Andrew Bayer made changes -
          Field Original Value New Value
          Labels pipeline-matrix-equivalency
          denniswjackson Dennis Jackson made changes -
          Summary Add ability to have artifacts with the same name in parallel pipeline satages Add ability to have artifacts with the same name in parallel pipeline stages
          halkeye Gavin Mogan made changes -
          Component/s core [ 15593 ]
          halkeye Gavin Mogan made changes -
          Labels pipeline-matrix-equivalency archiveArtifacts declarative
          halkeye Gavin Mogan made changes -
          Labels archiveArtifacts declarative archiveArtifacts declarative scripted

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            wbland Wesley Bland
            Votes:
            7 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated: