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

input disordered when using distributed parallel pipeline

XMLWordPrintable

      I have couple of nodes with different configs. I made a distributed parallel pipeline to run different jobs on them with some boolean input to trigger the job. These input cannot be set separately  according to node names, they only follow the sequence of input step shows up.

      Simple demo is as below:

       

      def prepare_execution(){
         run tests
      }
      
      node('master'){
          runner_to_run = [A,B,C]
          def executions = [:]
          def executions_again = [:]
          for (runner in runner_to_run){
              def runnerid = runner
              String executionname = 'executing: ' + ' on ' + runnerid
              executions[executionname] = {
                  node(runnerid){
                      stage(executionname){
                          prepare_execution()
                      }
                      String executionname2 = 'executing_2nd: ' + ' on '  + runnerid
                      stage(executionname2){
                          run = input(message: 'Run tests again?',parameters: [choice(name: 'RUN', choices: 'Run\nSkip')])
                          if (run == 'Run'){
                              prepare_execution()
                          }
                      }
                  }
              }
          }
          parallel executions
      }
      

      What I want is that when I click 'Run' shows in blueocean output on node A, prepare_execution will run on node A again, BUT what I get now might be click 'RUN' on node A, execution will be on node C. (same result on console)

            Unassigned Unassigned
            aijunluella ella
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: