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

With Pipeline, "archive" sets build status to failure, on empty, but doesn't report / log anything

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • pipeline
    • Jenkins ver. 2.19.4

      Using the below sample code:

      node {
          println "[currentBuild] ${currentBuild.result}"
          archiveArtifacts "packages/*.*"
          println "[currentBuild] ${currentBuild.result}"
      }
      

      You get the output,

      [Pipeline] node
      Running on master
      [Pipeline] {
      [Pipeline] echo
      [currentBuild] null
      [Pipeline] step
      Archiving artifacts
      [Pipeline] echo
      [currentBuild] FAILURE
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      Finished: FAILURE
      

      And in the pipeline steps,

      Without manual printouts about where something is failing, you get no information about what is failing where, nor why. For something as pivotal as the artifact archiver, part of core Jenkins, having this behaviour is really, really poor and has already cost us days trying to figure out what's going on in our very big, very time consuming build.

          [JENKINS-40538] With Pipeline, "archive" sets build status to failure, on empty, but doesn't report / log anything

          seaders created issue -
          seaders made changes -
          Description Original: Using the below sample code:

          {code:groovy}
          def func1() {
              println "[currentBuild] ${currentBuild.result}"
              archiveArtifacts "packages/*.*"
              println "[currentBuild] ${currentBuild.result}"
          }

          def func2() {
              println "[currentBuild] ${currentBuild.result}"
          }

          node {
              pl = parallel(
                  func1: { func1() },
                  func2: { func2() }
              )
              println "pl: $pl"
          }
          {code}

          You get the output,

          {noformat}
          [Pipeline] node
          Running on master in /Users/Shared/Jenkins/Home/jobs/teststash/workspace
          [Pipeline] {
          [Pipeline] parallel
          [Pipeline] [func1] { (Branch: func1)
          [Pipeline] [func2] { (Branch: func2)
          [Pipeline] [func1] echo
          [func1] [currentBuild] null
          [Pipeline] [func1] step
          [func1] Archiving artifacts
          [Pipeline] [func2] echo
          [func2] [currentBuild] null
          [Pipeline] [func2] }
          [Pipeline] [func1] echo
          [func1] [currentBuild] FAILURE
          [Pipeline] [func1] }
          [Pipeline] // parallel
          [Pipeline] echo
          pl: [func1:null, func2:null]
          [Pipeline] }
          [Pipeline] // node
          [Pipeline] End of Pipeline
          Finished: FAILURE
          {noformat}

          And in the pipeline steps, !Screen Shot 2016-12-19 at 13.37.20.png|thumbnail!

          Without manual printouts about where something is failing, you get no information about what is failing where, nor why. For something as pivotal as the artifact archiver, part of core Jenkins, having this behaviour is really, really poor and has already cost us days trying to figure out what's going on in our very big, very time consuming build.
          New: Using the below sample code:

          {code:java}
          def func1() {
              println "[currentBuild] ${currentBuild.result}"
              archiveArtifacts "packages/*.*"
              println "[currentBuild] ${currentBuild.result}"
          }

          def func2() {
              println "[currentBuild] ${currentBuild.result}"
          }

          node {
              pl = parallel(
                  func1: { func1() },
                  func2: { func2() }
              )
              println "pl: $pl"
          }
          {code}

          You get the output,

          {noformat}
          [Pipeline] node
          Running on master in /Users/Shared/Jenkins/Home/jobs/teststash/workspace
          [Pipeline] {
          [Pipeline] parallel
          [Pipeline] [func1] { (Branch: func1)
          [Pipeline] [func2] { (Branch: func2)
          [Pipeline] [func1] echo
          [func1] [currentBuild] null
          [Pipeline] [func1] step
          [func1] Archiving artifacts
          [Pipeline] [func2] echo
          [func2] [currentBuild] null
          [Pipeline] [func2] }
          [Pipeline] [func1] echo
          [func1] [currentBuild] FAILURE
          [Pipeline] [func1] }
          [Pipeline] // parallel
          [Pipeline] echo
          pl: [func1:null, func2:null]
          [Pipeline] }
          [Pipeline] // node
          [Pipeline] End of Pipeline
          Finished: FAILURE
          {noformat}

          And in the pipeline steps, !Screen Shot 2016-12-19 at 13.37.20.png|thumbnail!

          Without manual printouts about where something is failing, you get no information about what is failing where, nor why. For something as pivotal as the artifact archiver, part of core Jenkins, having this behaviour is really, really poor and has already cost us days trying to figure out what's going on in our very big, very time consuming build.
          seaders made changes -
          Description Original: Using the below sample code:

          {code:java}
          def func1() {
              println "[currentBuild] ${currentBuild.result}"
              archiveArtifacts "packages/*.*"
              println "[currentBuild] ${currentBuild.result}"
          }

          def func2() {
              println "[currentBuild] ${currentBuild.result}"
          }

          node {
              pl = parallel(
                  func1: { func1() },
                  func2: { func2() }
              )
              println "pl: $pl"
          }
          {code}

          You get the output,

          {noformat}
          [Pipeline] node
          Running on master in /Users/Shared/Jenkins/Home/jobs/teststash/workspace
          [Pipeline] {
          [Pipeline] parallel
          [Pipeline] [func1] { (Branch: func1)
          [Pipeline] [func2] { (Branch: func2)
          [Pipeline] [func1] echo
          [func1] [currentBuild] null
          [Pipeline] [func1] step
          [func1] Archiving artifacts
          [Pipeline] [func2] echo
          [func2] [currentBuild] null
          [Pipeline] [func2] }
          [Pipeline] [func1] echo
          [func1] [currentBuild] FAILURE
          [Pipeline] [func1] }
          [Pipeline] // parallel
          [Pipeline] echo
          pl: [func1:null, func2:null]
          [Pipeline] }
          [Pipeline] // node
          [Pipeline] End of Pipeline
          Finished: FAILURE
          {noformat}

          And in the pipeline steps, !Screen Shot 2016-12-19 at 13.37.20.png|thumbnail!

          Without manual printouts about where something is failing, you get no information about what is failing where, nor why. For something as pivotal as the artifact archiver, part of core Jenkins, having this behaviour is really, really poor and has already cost us days trying to figure out what's going on in our very big, very time consuming build.
          New: Using the below sample code:

          {code:java}
          node {
              println "[currentBuild] ${currentBuild.result}"
              archiveArtifacts "packages/*.*"
              println "[currentBuild] ${currentBuild.result}"
          }
          {code}

          You get the output,

          {noformat}
          [Pipeline] node
          Running on master in /Users/Shared/Jenkins/Home/jobs/teststash/workspace
          [Pipeline] {
          [Pipeline] echo
          [currentBuild] null
          [Pipeline] step
          Archiving artifacts
          [Pipeline] echo
          [currentBuild] FAILURE
          [Pipeline] }
          [Pipeline] // node
          [Pipeline] End of Pipeline
          Finished: FAILURE
          {noformat}

          And in the pipeline steps, !Screen Shot 2016-12-19 at 13.37.20.png|thumbnail!

          Without manual printouts about where something is failing, you get no information about what is failing where, nor why. For something as pivotal as the artifact archiver, part of core Jenkins, having this behaviour is really, really poor and has already cost us days trying to figure out what's going on in our very big, very time consuming build.
          seaders made changes -
          Attachment New: Screen Shot 2016-12-19 at 22.56.33.png [ 35225 ]
          seaders made changes -
          Description Original: Using the below sample code:

          {code:java}
          node {
              println "[currentBuild] ${currentBuild.result}"
              archiveArtifacts "packages/*.*"
              println "[currentBuild] ${currentBuild.result}"
          }
          {code}

          You get the output,

          {noformat}
          [Pipeline] node
          Running on master in /Users/Shared/Jenkins/Home/jobs/teststash/workspace
          [Pipeline] {
          [Pipeline] echo
          [currentBuild] null
          [Pipeline] step
          Archiving artifacts
          [Pipeline] echo
          [currentBuild] FAILURE
          [Pipeline] }
          [Pipeline] // node
          [Pipeline] End of Pipeline
          Finished: FAILURE
          {noformat}

          And in the pipeline steps, !Screen Shot 2016-12-19 at 13.37.20.png|thumbnail!

          Without manual printouts about where something is failing, you get no information about what is failing where, nor why. For something as pivotal as the artifact archiver, part of core Jenkins, having this behaviour is really, really poor and has already cost us days trying to figure out what's going on in our very big, very time consuming build.
          New: Using the below sample code:

          {code:java}
          node {
              println "[currentBuild] ${currentBuild.result}"
              archiveArtifacts "packages/*.*"
              println "[currentBuild] ${currentBuild.result}"
          }
          {code}

          You get the output,

          {noformat}
          [Pipeline] node
          Running on master
          [Pipeline] {
          [Pipeline] echo
          [currentBuild] null
          [Pipeline] step
          Archiving artifacts
          [Pipeline] echo
          [currentBuild] FAILURE
          [Pipeline] }
          [Pipeline] // node
          [Pipeline] End of Pipeline
          Finished: FAILURE
          {noformat}

          And in the pipeline steps, !Screen Shot 2016-12-19 at 22.56.33.png|thumbnail!

          Without manual printouts about where something is failing, you get no information about what is failing where, nor why. For something as pivotal as the artifact archiver, part of core Jenkins, having this behaviour is really, really poor and has already cost us days trying to figure out what's going on in our very big, very time consuming build.
          seaders made changes -
          Attachment Original: Screen Shot 2016-12-19 at 22.56.33.png [ 35225 ]
          seaders made changes -
          Attachment Original: Screen Shot 2016-12-19 at 13.37.20.png [ 35222 ]
          seaders made changes -
          Attachment New: Screen Shot 2016-12-19 at 22.56.33.png [ 35226 ]
          Oleg Nenashev made changes -
          Component/s New: pipeline [ 21692 ]
          Component/s Original: core [ 15593 ]
          R. Tyler Croy made changes -
          Link New: This issue duplicates JENKINS-38005 [ JENKINS-38005 ]
          R. Tyler Croy made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

            Unassigned Unassigned
            seaders seaders
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: