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.

          [JENKINS-9622] Add build selector to parameterized trigger

          Alan Harder added a comment -

          Perhaps you can describe your request in more detail.

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

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

          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.

          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>
          

          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>

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

              Created:
              Updated: