-
Bug
-
Resolution: Duplicate
-
Critical
-
Jenkins: 2.168 and 2.167
System related:
awt.toolkit sun.awt.windows.WToolkit
BUILD_TIMESTAMP 2019-03-13 08:59:17 CET
executable-war D:\temp\jenkinsSlave\jenkins.war
file.encoding Cp1252
file.encoding.pkg sun.io
file.separator \
java.awt.graphicsenv sun.awt.Win32GraphicsEnvironment
java.awt.headless true
java.awt.printerjob sun.awt.windows.WPrinterJob
java.class.path D:\temp\jenkinsSlave\jenkins.war
java.class.version 52.0
java.endorsed.dirs C:\Program Files (x86)\Java\jre1.8.0_201\lib\endorsed
java.ext.dirs C:\Program Files (x86)\Java\jre1.8.0_201\lib\ext;C:\WINDOWS\Sun\Java\lib\ext
java.home C:\Program Files (x86)\Java\jre1.8.0_201
java.library.path c:\program files (x86)\common files\oracle\java\javapath;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;c:\program files (x86)\common files\oracle\java\javapath;c:\program files (x86)\common files\etas\3rdparty4.0\;c:\program files (x86)\vector vflash 3.5\bin\;c:\python27\;c:\python27\scripts;c:\program files (x86)\vector vflash 3.1\bin\;c:\program files (x86)\vector vflash 2.7\bin\;c:\testwell\ctc;c:\programdata\oracle\java\javapath;c:\program files (x86)\intel\icls client\;c:\program files\intel\icls client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;C:\WINDOWS\system32\windowspowershell\v1.0\;c:\program files\intel\intel(r) management engine components\dal;c:\program files (x86)\intel\intel(r) management engine components\dal;c:\program files\intel\intel(r) management engine components\ipt;c:\program files (x86)\intel\intel(r) management engine components\ipt;c:\program files\intel\wifi\bin\;c:\program files\common files\intel\wirelesscommon\;c:\program files (x86)\gnu\gnupg\pub;c:\program files (x86)\gitextensions\;d:\work_general\junctions\path_to_mingw\bin;c:\program files\microsoft sql server\110\tools\binn\;c:\program files (x86)\common files\etas\3rdparty1.0;c:\program files\tortoisesvn\bin;c:\program files\git\cmd;c:\program files\tortoisegit\bin;c:\program files\putty\;C:\WINDOWS\system32\openssh\;C:\Program Files (x86)\MATLAB\R2006a\bin;C:\Program Files (x86)\MATLAB\R2006a\bin\win32;D:\work_general\junctions\Silver\bin;D:\Software\python27;C:\Users\fretter\AppData\Local\Microsoft\WindowsApps;D:\Software\apache-ant-1.10.1\bin;D:\work_general\junctions\path_to_mingw\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;;.
java.runtime.name Java(TM) SE Runtime Environment
java.runtime.version 1.8.0_201-b09
java.specification.name Java Platform API Specification
java.specification.vendor Oracle Corporation
java.specification.version 1.8
java.vendor Oracle Corporation
Jenkins related:
pipeline-build-step 2.7 true
pipeline-github-lib 1.0 true
pipeline-graph-analysis 1.9 true
pipeline-input-step 2.9 true
pipeline-milestone-step 1.3.1 true
pipeline-model-api 1.3.6 true
pipeline-model-declarative-agent 1.1.1 true
pipeline-model-definition 1.3.6 true
pipeline-model-extensions 1.3.6 true
pipeline-rest-api 2.10 true
pipeline-stage-step 2.3 true
pipeline-stage-tags-metadata 1.3.6 true
pipeline-stage-view 2.10 true
pipeline-utility-stepsJenkins: 2.168 and 2.167 System related: awt.toolkit sun.awt.windows.WToolkit BUILD_TIMESTAMP 2019-03-13 08:59:17 CET executable-war D:\temp\jenkinsSlave\jenkins.war file.encoding Cp1252 file.encoding.pkg sun.io file.separator \ java.awt.graphicsenv sun.awt.Win32GraphicsEnvironment java.awt.headless true java.awt.printerjob sun.awt.windows.WPrinterJob java.class.path D:\temp\jenkinsSlave\jenkins.war java.class.version 52.0 java.endorsed.dirs C:\Program Files (x86)\Java\jre1.8.0_201\lib\endorsed java.ext.dirs C:\Program Files (x86)\Java\jre1.8.0_201\lib\ext;C:\WINDOWS\Sun\Java\lib\ext java.home C:\Program Files (x86)\Java\jre1.8.0_201 java.library.path c:\program files (x86)\common files\oracle\java\javapath;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;c:\program files (x86)\common files\oracle\java\javapath;c:\program files (x86)\common files\etas\3rdparty4.0\;c:\program files (x86)\vector vflash 3.5\bin\;c:\python27\;c:\python27\scripts;c:\program files (x86)\vector vflash 3.1\bin\;c:\program files (x86)\vector vflash 2.7\bin\;c:\testwell\ctc;c:\programdata\oracle\java\javapath;c:\program files (x86)\intel\icls client\;c:\program files\intel\icls client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;C:\WINDOWS\system32\windowspowershell\v1.0\;c:\program files\intel\intel(r) management engine components\dal;c:\program files (x86)\intel\intel(r) management engine components\dal;c:\program files\intel\intel(r) management engine components\ipt;c:\program files (x86)\intel\intel(r) management engine components\ipt;c:\program files\intel\wifi\bin\;c:\program files\common files\intel\wirelesscommon\;c:\program files (x86)\gnu\gnupg\pub;c:\program files (x86)\gitextensions\;d:\work_general\junctions\path_to_mingw\bin;c:\program files\microsoft sql server\110\tools\binn\;c:\program files (x86)\common files\etas\3rdparty1.0;c:\program files\tortoisesvn\bin;c:\program files\git\cmd;c:\program files\tortoisegit\bin;c:\program files\putty\;C:\WINDOWS\system32\openssh\;C:\Program Files (x86)\MATLAB\R2006a\bin;C:\Program Files (x86)\MATLAB\R2006a\bin\win32;D:\work_general\junctions\Silver\bin;D:\Software\python27;C:\Users\fretter\AppData\Local\Microsoft\WindowsApps;D:\Software\apache-ant-1.10.1\bin;D:\work_general\junctions\path_to_mingw\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;;. java.runtime.name Java(TM) SE Runtime Environment java.runtime.version 1.8.0_201-b09 java.specification.name Java Platform API Specification java.specification.vendor Oracle Corporation java.specification.version 1.8 java.vendor Oracle Corporation Jenkins related: pipeline-build-step 2.7 true pipeline-github-lib 1.0 true pipeline-graph-analysis 1.9 true pipeline-input-step 2.9 true pipeline-milestone-step 1.3.1 true pipeline-model-api 1.3.6 true pipeline-model-declarative-agent 1.1.1 true pipeline-model-definition 1.3.6 true pipeline-model-extensions 1.3.6 true pipeline-rest-api 2.10 true pipeline-stage-step 2.3 true pipeline-stage-tags-metadata 1.3.6 true pipeline-stage-view 2.10 true pipeline-utility-steps
As stated in #4635 from Liam Newman, currentBuild.currentResult should contain the current state. I used this feature and approximately one or two weeks ago this stopped working-> currentResult never returns FAILURE, even when the post section `failure` is processed correctly. Consider the following pipeline:
pipeline { agent { label 'master' } stages{ stage('Failing') { steps{ bat 'exit 1' } post { always { echo "Post-Build result: (currentBuild.result, currentBuild.currentResult):" echo "${currentBuild.result}, ${currentBuild.currentResult}" } } } } post { failure { echo "Post-Pipeline failure (currentBuild.result, currentBuild.currentResult): " echo "${currentBuild.result}, ${currentBuild.currentResult}" } success { echo "Post-Pipeline success (currentBuild.result, currentBuild.currentResult): " echo "${currentBuild.result}, ${currentBuild.currentResult}" } } }
I get this output (trimmed):
Post-Build result: (currentBuild.result, currentBuild.currentResult): null, SUCCESS Post-Pipeline failure (currentBuild.result, currentBuild.currentResult): null, SUCCESS
(currentBuild.result being null is of course expected)
- duplicates
-
JENKINS-56402 Declarative Pipeline shows SUCCESS even though job FAILED
- Reopened