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

Pipeline/Timeout: "timeout" with a "withEnv" insite don't time out

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • pipeline
    • None
    • Jenkins 2.9
      Pipeline 2.1

      The following code ends regular after 5 seconds, but I expect a fail after 3 seconds.

      node {
          timeout(time: 3, unit: 'SECONDS') {
              withEnv(["JAVA_1_6_HOME=JDK 1.6"]) {
                  sh "sleep 5"
              }
          }
      }
      

      Log:

      Started by user anonymous
      [Pipeline] node
      Running on jenkins-dc01-lx-cedba63f-3b32-4286-b784-4af03f3a44b3 in /home/jenkins/workspace/test
      [Pipeline] {
      [Pipeline] timeout
      [Pipeline] {
      [Pipeline] withEnv
      [Pipeline] {
      [Pipeline] sh
      [test] Running shell script
      + sleep 5
      [Pipeline] }
      [Pipeline] // withEnv
      [Pipeline] }
      [Pipeline] // timeout
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      Finished: SUCCESS
      

          [JENKINS-36010] Pipeline/Timeout: "timeout" with a "withEnv" insite don't time out

          M V created issue -
          M V made changes -
          Link New: This issue is related to JENKINS-34677 [ JENKINS-34677 ]
          Michael Barrientos made changes -
          Link New: This issue duplicates JENKINS-34637 [ JENKINS-34637 ]
          Michael Barrientos made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 172649 ] New: JNJira + In-Review [ 199299 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-general [ 21692 ]
          Andrew Bayer made changes -
          Component/s Original: workflow-plugin [ 18820 ]

            jglick Jesse Glick
            martin_v M V
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: