-
Bug
-
Resolution: Duplicate
-
Minor
-
None
Run this pipeline script without a sandbox:
node { noncps() } @NonCPS def noncps() { echo "Calling @NonCPS method System.currentTimeMillis(): ${System.currentTimeMillis()}" echo "Calling cps(): ${cps()}" echo "Calls completed" } def cps() { // should fail return System.currentTimeMillis() }
Expected: fails in the call to cps(), or arguably succeeds and runs the whole pipeline.
Actual: silently buries the exception and terminates the call to noncps(), but marks the job as a success.
Example output:
[Pipeline] node Running on XXXXXXX in XXXXXXX [Pipeline] { [Pipeline] echo Calling @NonCPS method System.currentTimeMillis(): 1476725898097 [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline Finished: SUCCESS
- duplicates
-
JENKINS-31314 Running asynchronous code inside a @NonCPS method should fail cleanly
- Resolved