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

Logs lost for declarative parallel child job builds

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: _unsorted
    • Labels:
      None
    • Similar Issues:

      Description

      When using declarative pipelines in combination with parallel builds and sub job starting, the build logs are lost.

       

      Example: 

      stage('Check pipelines') {
              parallel {
                  stage('Check Java pipeline') {
                      steps {
                          script {
                              build job:'../dcx-service-template/master',
                              parameters: [string(name: 'SHARED_PIPELINE_BRANCH', value: "${GIT_BRANCH}")]
                          }
                      }
                  }
                  stage('Check NodeJs pipeline') {
                      steps {
                          script {
                              build job:'../jenkins-pipeline-testing-nodejs/master',
                              parameters: [string(name: 'SHARED_PIPELINE_BRANCH', value: "${GIT_BRANCH}")]
                          }
                      }
                  }
              }
          }
      }
      

      This will work and execute properly, but the build logs will disappear after the firrst "build job", which will make it look like this : 

      [...]
      [Pipeline] // stage
      [Pipeline] stage
      [Pipeline] { (Check pipelines)
      [Pipeline] parallel
      [Pipeline] { (Branch: Check Java pipeline)
      [Pipeline] { (Branch: Check NodeJs pipeline)
      [Pipeline] script
      [Pipeline] {
      [Pipeline] script
      [Pipeline] {
      [Pipeline] build (Building ShopDirect » dcx-service-template » master)
      Scheduling project: ShopDirect » dcx-service-template » master
      [Pipeline] build (Building ShopDirect » jenkins-pipeline-testing-nodejs » master)
      
      

      And the logs will stop there instead of displaying the number of the child jobs once they start, and display the following steps logs

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              sdurand Samuel Durand
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: