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

Add build selector to parameterized trigger

    XMLWordPrintable

Details

    Description

      The build selector parameter is available once you install the copy artifact plugin. It would be very useful to pass this parameter from the parent build when triggering.

      Attachments

        Activity

          mindless Alan Harder added a comment -

          Perhaps you can describe your request in more detail.

          mindless Alan Harder added a comment - Perhaps you can describe your request in more detail.
          idanzalz idanzalz added a comment -

          Sure. The copy artifact plugin creates a special type of build parameter called build selector. If you use that parameter for the build, you get a combo box when starting the build that is populated
          with the possible build numbers to copy artifact from.
          This is great, but when you trigger a parameterized build from a different project you can't pass values to that type of parameter (the build selector).
          This is a problem since the build selector is very convenient when triggering jobs manually but I need a way to pass it when I trigger a build a different project also

          idanzalz idanzalz added a comment - Sure. The copy artifact plugin creates a special type of build parameter called build selector. If you use that parameter for the build, you get a combo box when starting the build that is populated with the possible build numbers to copy artifact from. This is great, but when you trigger a parameterized build from a different project you can't pass values to that type of parameter (the build selector). This is a problem since the build selector is very convenient when triggering jobs manually but I need a way to pass it when I trigger a build a different project also

          Agreed this is a necessary feature. Having a solution so that I can trigger builds via a job, and then in the situation of "rebuilding" a failed child job, I'd like to then be able to select the build that the child job should reference for copying artifacts.

          intel352 Jonathan Langevin added a comment - Agreed this is a necessary feature. Having a solution so that I can trigger builds via a job, and then in the situation of "rebuilding" a failed child job, I'd like to then be able to select the build that the child job should reference for copying artifacts.
          phi1010 Phillip Kuhrt added a comment -

          This looks like a text parameter when you print it from a command line or view it in a parameter analysis plugin (Simple Parameterized Builds Report, "Rebuild Last", etc.); you might be able to pass something like this as a workaround:

          <TriggeredBuildSelector plugin="copyartifact@1.38">  <fallbackToLastSuccessful>true</fallbackToLastSuccessful>  <upstreamFilterStrategy>UseNewest</upstreamFilterStrategy>  <allowUpstreamDependencies>true</allowUpstreamDependencies></TriggeredBuildSelector>
          
          phi1010 Phillip Kuhrt added a comment - This looks like a text parameter when you print it from a command line or view it in a parameter analysis plugin (Simple Parameterized Builds Report, "Rebuild Last", etc.); you might be able to pass something like this as a workaround: <TriggeredBuildSelector plugin= "copyartifact@1.38" > <fallbackToLastSuccessful> true </fallbackToLastSuccessful> <upstreamFilterStrategy>UseNewest</upstreamFilterStrategy> <allowUpstreamDependencies> true </allowUpstreamDependencies></TriggeredBuildSelector>

          People

            Unassigned Unassigned
            idanzalz idanzalz
            Votes:
            8 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated: