Details
-
Bug
-
Status: Resolved (View Workflow)
-
Critical
-
Resolution: Fixed
-
None
-
Jenkins 1.651.1, up-to-date pipeline and workflow plugins (list attached), IBM JRE 1.7.0, Linux
Description
Pipeline/ workflow DSL: timeout() does not work as expected when a withEnv() is introduced inside the (same) timeout + node blocks and over the (same) shell command.
Specifically, without the withEnv block, the timeout actually interrupts the shell command.
With the withEnv block, the timeout does not interrupt the shell command; yet, the build still ends reporting that it was interrupted/ aborted.
Attachments
Issue Links
- is duplicated by
-
JENKINS-34677 Pipeline/Timeout/Xvnc: "timeout" with a ""wrap" inside don't time out.
-
- Resolved
-
-
JENKINS-36010 Pipeline/Timeout: "timeout" with a "withEnv" insite don't time out
-
- Resolved
-
-
JENKINS-32545 failFast has no effect when withCredentials is used
-
- Resolved
-
- relates to
-
JENKINS-26148 Incorrect implementation of RetryStepExecution.stop
-
- Closed
-
-
JENKINS-39072 timeout step should include more logging/diagnostics information
-
- Resolved
-
- links to
Code changed in jenkins
User: Jesse Glick
Path:
pom.xml
src/main/java/org/jenkinsci/plugins/workflow/cps/CpsBodyExecution.java
src/main/java/org/jenkinsci/plugins/workflow/cps/CpsStepContext.java
src/test/java/org/jenkinsci/plugins/workflow/cps/CpsBodyExecutionTest.java
http://jenkins-ci.org/commit/workflow-cps-plugin/6933a4925a47b07206eaf059484b37c069aebe62
Log:
[FIXED JENKINS-34637] CpsBodyExecution.cancel was failing to interrupt the innermost execution, and block-scoped StepExecution.stop does not generally kill its body (
JENKINS-26148).getCurrentExecutions was also in direct violation of its Javadoc, though it does not appear to have ever been called, much less tested.