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

build step does not execute a job if the call is not different

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • blueocean-plugin, pipeline
    • None
    • Jenkins ver. 2.179, Jenkins ver. 2.182, and Jenkins ver. 2.150.2
      BO 1.16.0 and BO 1.17.0
      Pipeline: 2.6
      Pipeline: API 2.35
      Pipeline: Build Step 2.9
      Pipeline: Declarative 1.3.9
      Pipeline: Groovy 2.70

      If you launch a job with the build step on a parallel way only the first stage has the link to the downstream job, this should change recently it was working using the parallel step, and it was not working with parallel stages, now both are broken. Digging a little seems like build step does not execute a job if the call is not different, so it is not possible to run the same job N times with the build step on parallel stages, even do in concurrent builds.




      Main job

      pipeline {
        agent { label 'master' }
        stages {
          stage('Parallel step'){
            steps {
                script {
                    def parallelTasks = [:]
                    parallelTasks['pstep-01'] = {build job: 'test-dummy', quietPeriod: 15}
                    parallelTasks['pstep-02'] = {build job: 'test-dummy', quietPeriod: 15}
                    parallelTasks['pstep-03'] = {build job: 'test-dummy', quietPeriod: 15}
                    parallelTasks['pstep-04'] = {build job: 'test-dummy', quietPeriod: 15}
                    parallelTasks['pstep-05'] = {build job: 'test-dummy', quietPeriod: 15}
                    parallelTasks['pstep-06'] = {build job: 'test-dummy', quietPeriod: 15}
                    parallelTasks['pstep-07'] = {build job: 'test-dummy', quietPeriod: 15}
                    parallelTasks['pstep-08'] = {build job: 'test-dummy', quietPeriod: 15}
                    parallel(parallelTasks)
                }
            }
          }
          stage('Parallel stages'){
            parallel {
              stage('ps-01'){
                  steps{
                      build job: 'test-dummy', quietPeriod: 15
                  }
              }
              stage('ps-02'){
                  steps{
                      build job: 'test-dummy', quietPeriod: 15
                  }
              }
              stage('ps-03'){
                  steps{
                      build job: 'test-dummy', quietPeriod: 15
                  }
              }
              stage('ps-04'){
                  steps{
                      build job: 'test-dummy', quietPeriod: 15
                  }
              }
              stage('ps-05'){
                  steps{
                      build job: 'test-dummy', quietPeriod: 15
                  }
              }
              stage('ps-06'){
                  steps{
                      build job: 'test-dummy', quietPeriod: 15
                  }
              }
              stage('ps-07'){
                  steps{
                      build job: 'test-dummy', quietPeriod: 15
                  }
              }
              stage('ps-08'){
                  steps{
                      build job: 'test-dummy', quietPeriod: 15
                  }
              }
            }
          }
        }
      }
      

      test-dummy job, it is configured to keep 100 builds

      node(){
       echo "hello"
      }
      

          [JENKINS-58166] build step does not execute a job if the call is not different

          Ivan Fernandez Calvo created issue -
          Ivan Fernandez Calvo made changes -
          Description Original: If you launch a job with the build step on a parallel way only the first stage has the link to the downstream job, this should change recently it was working using the parallel step, and it was not working with parallel stages, now both are broken.

           !image-2019-06-24-15-43-26-909.png|thumbnail!
           !image-2019-06-24-15-43-39-955.png|thumbnail!
           !image-2019-06-24-15-43-49-073.png|thumbnail!
           !image-2019-06-24-15-43-57-438.png|thumbnail!

          Main job

          {code}
          pipeline {
            agent { label 'master' }
            stages {
              stage('Parallel step'){
                steps {
                    script {
                        def parallelTasks = [:]
                        parallelTasks['pstep-01'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-02'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-03'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-04'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-05'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-06'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-07'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-08'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallel(parallelTasks)
                    }
                }
              }
              stage('Parallel stages'){
                parallel {
                  stage('ps-01'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-02'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-03'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-04'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-05'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-06'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-07'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-08'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                }
              }
            }
          }
          {code}

          test-dummy job

          {code}
          node(){
           echo "hello"
          }
          {code}
          New: If you launch a job with the build step on a parallel way only the first stage has the link to the downstream job, this should change recently it was working using the parallel step, and it was not working with parallel stages, now both are broken.

           !image-2019-06-24-15-43-26-909.png|thumbnail!
           !image-2019-06-24-15-43-39-955.png|thumbnail!
           !image-2019-06-24-15-43-49-073.png|thumbnail!
           !image-2019-06-24-15-43-57-438.png|thumbnail!

          Main job

          {code}
          pipeline {
            agent { label 'master' }
            stages {
              stage('Parallel step'){
                steps {
                    script {
                        def parallelTasks = [:]
                        parallelTasks['pstep-01'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-02'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-03'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-04'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-05'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-06'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-07'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-08'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallel(parallelTasks)
                    }
                }
              }
              stage('Parallel stages'){
                parallel {
                  stage('ps-01'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-02'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-03'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-04'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-05'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-06'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-07'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-08'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                }
              }
            }
          }
          {code}

          test-dummy job, it is configured to keep 100 builds

          {code}
          node(){
           echo "hello"
          }
          {code}
          Ivan Fernandez Calvo made changes -
          Environment Original: Jenkins ver. 2.179
          BO 1.16.0 and BO 1.17.0
          New: Jenkins ver. 2.179 and Jenkins ver. 2.182
          BO 1.16.0 and BO 1.17.0
          Ivan Fernandez Calvo made changes -
          Component/s New: pipeline [ 21692 ]
          Ivan Fernandez Calvo made changes -
          Summary Original: downstream jobs lose the job link New: build step does not execute a job if the call is not different
          Ivan Fernandez Calvo made changes -
          Description Original: If you launch a job with the build step on a parallel way only the first stage has the link to the downstream job, this should change recently it was working using the parallel step, and it was not working with parallel stages, now both are broken.

           !image-2019-06-24-15-43-26-909.png|thumbnail!
           !image-2019-06-24-15-43-39-955.png|thumbnail!
           !image-2019-06-24-15-43-49-073.png|thumbnail!
           !image-2019-06-24-15-43-57-438.png|thumbnail!

          Main job

          {code}
          pipeline {
            agent { label 'master' }
            stages {
              stage('Parallel step'){
                steps {
                    script {
                        def parallelTasks = [:]
                        parallelTasks['pstep-01'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-02'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-03'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-04'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-05'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-06'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-07'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-08'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallel(parallelTasks)
                    }
                }
              }
              stage('Parallel stages'){
                parallel {
                  stage('ps-01'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-02'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-03'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-04'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-05'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-06'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-07'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-08'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                }
              }
            }
          }
          {code}

          test-dummy job, it is configured to keep 100 builds

          {code}
          node(){
           echo "hello"
          }
          {code}
          New: If you launch a job with the build step on a parallel way only the first stage has the link to the downstream job, this should change recently it was working using the parallel step, and it was not working with parallel stages, now both are broken. Digging a little seems like build step does not execute a job if the call is not different, so it is not possible to run the same job N times with the build step on parallel stages, even do in concurrent builds.

           !image-2019-06-24-15-43-26-909.png|thumbnail!
           !image-2019-06-24-15-43-39-955.png|thumbnail!
           !image-2019-06-24-15-43-49-073.png|thumbnail!
           !image-2019-06-24-15-43-57-438.png|thumbnail!

          Main job

          {code}
          pipeline {
            agent { label 'master' }
            stages {
              stage('Parallel step'){
                steps {
                    script {
                        def parallelTasks = [:]
                        parallelTasks['pstep-01'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-02'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-03'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-04'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-05'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-06'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-07'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallelTasks['pstep-08'] = {build job: 'test-dummy', quietPeriod: 15}
                        parallel(parallelTasks)
                    }
                }
              }
              stage('Parallel stages'){
                parallel {
                  stage('ps-01'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-02'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-03'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-04'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-05'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-06'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-07'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                  stage('ps-08'){
                      steps{
                          build job: 'test-dummy', quietPeriod: 15
                      }
                  }
                }
              }
            }
          }
          {code}

          test-dummy job, it is configured to keep 100 builds

          {code}
          node(){
           echo "hello"
          }
          {code}
          Ivan Fernandez Calvo made changes -
          Environment Original: Jenkins ver. 2.179 and Jenkins ver. 2.182
          BO 1.16.0 and BO 1.17.0
          New: Jenkins ver. 2.179, Jenkins ver. 2.182, and Jenkins ver. 2.150.2
          BO 1.16.0 and BO 1.17.0
          Ivan Fernandez Calvo made changes -
          Environment Original: Jenkins ver. 2.179, Jenkins ver. 2.182, and Jenkins ver. 2.150.2
          BO 1.16.0 and BO 1.17.0
          New: Jenkins ver. 2.179, Jenkins ver. 2.182, and Jenkins ver. 2.150.2
          BO 1.16.0 and BO 1.17.0
          Pipeline: 2.6
          Pipeline: API 2.35
          Pipeline: Build Step 2.9
          Pipeline: Declarative 1.3.9
          Pipeline: Groovy 2.70

            Unassigned Unassigned
            ifernandezcalvo Ivan Fernandez Calvo
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: