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

Pipeline build step does not recognize other build has been started

XMLWordPrintable

      We have one pipeline triggering on demand another pipeline:

      if (buildSources) {
      
          timeoutUtils.timeout(time: 60, unit: 'MINUTES', body: {
      
              String continuousBuildJobName = 'payment-mdirectload-do-master-continuous-build'
              println "continuousBuildJobName=$continuousBuildJobName"
      
              // propagate=true would fail for all results != 'SUCCESS'
              RunWrapper runWrapper = build(job: continuousBuildJobName, wait: true, propagate: false, quietPeriod: 0)
              Run build = runWrapper.rawBuild
              Result buildResult = build.result
              if (buildResult != Result.SUCCESS && buildResult != Result.UNSTABLE) {
                  error "$build.fullDisplayName completed with status '$buildResult'"
              }
      
          }) 
      }

      Randomly the build hangs in not recognizing that the other job has been started.

      So the logs shows e.g. this:

      [Pipeline] build (Building payment-mdirectload-do-master-continuous-build)
      Scheduling project: payment-mdirectload-do-master-continuous-build 

      instead of this:

      [Pipeline] build (Building payment-mdirectload-do-master-continuous-build)
      Scheduling project: payment-mdirectload-do-master-continuous-build
      Starting building: payment-mdirectload-do-master-continuous-build #243 

      That other triggered job is always starting fine.

       

      We expect that it should work fine all the time.

            Unassigned Unassigned
            rincewind77 Maik Ebert
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: