-
Bug
-
Resolution: Fixed
-
Major
-
I was able to reproduce this problem with a fresh/clean install of Jenkins, on a freshly installed VM, with no additional plugins (other than what it installed automatically)
System Properties
Name ↓
Value
awt.toolkit sun.awt.windows.WToolkit
executable-war C:\bin\Jenkins\jenkins.war
file.encoding Cp1252
file.encoding.pkg sun.io
file.separator \
hudson.lifecycle hudson.lifecycle.WindowsServiceLifecycle
java.awt.graphicsenv sun.awt.Win32GraphicsEnvironment
java.awt.headless true
java.awt.printerjob sun.awt.windows.WPrinterJob
java.class.path C:\bin\Jenkins\jenkins.war
java.class.version 52.0
java.endorsed.dirs C:\bin\Jenkins\jre\lib\endorsed
java.ext.dirs C:\bin\Jenkins\jre\lib\ext;C:\Windows\Sun\Java\lib\ext
java.home C:\bin\Jenkins\jre
java.io.tmpdir C:\Windows\TEMP\
java.library.path C:\bin\Jenkins\jre\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;.
java.runtime.name Java(TM) SE Runtime Environment
java.runtime.version 1.8.0_66-b18
java.specification.name Java Platform API Specification
java.specification.vendor Oracle Corporation
java.specification.version 1.8
java.vendor Oracle Corporation
java.vendor.url http://java.oracle.com/
java.vendor.url.bug http://bugreport.sun.com/bugreport/
java.version 1.8.0_66
java.vm.info mixed mode
java.vm.name Java HotSpot(TM) Client VM
java.vm.specification.name Java Virtual Machine Specification
java.vm.specification.vendor Oracle Corporation
java.vm.specification.version 1.8
java.vm.vendor Oracle Corporation
java.vm.version 25.66-b18
jna.loaded true
jnidispatch.path C:\Windows\TEMP\jna--1498907351\jna2229444743706072211.dll
line.separator
mail.smtp.sendpartial true
mail.smtps.sendpartial true
os.arch x86
os.name Windows NT (unknown)
os.version 10.0
path.separator ;
sun.arch.data.model 32
sun.boot.class.path C:\bin\Jenkins\jre\lib\resources.jar;C:\bin\Jenkins\jre\lib\rt.jar;C:\bin\Jenkins\jre\lib\sunrsasign.jar;C:\bin\Jenkins\jre\lib\jsse.jar;C:\bin\Jenkins\jre\lib\jce.jar;C:\bin\Jenkins\jre\lib\charsets.jar;C:\bin\Jenkins\jre\lib\jfr.jar;C:\bin\Jenkins\jre\classes
sun.boot.library.path C:\bin\Jenkins\jre\bin
sun.cpu.endian little
sun.cpu.isalist
sun.desktop windows
sun.io.unicode.encoding UnicodeLittle
sun.java.command C:\bin\Jenkins\jenkins.war --httpPort=8080 --webroot=C:\bin\Jenkins\war
sun.java.launcher SUN_STANDARD
sun.jnu.encoding Cp1252
sun.management.compiler HotSpot Client Compiler
sun.os.patch.level
svnkit.http.methods Digest,Basic,NTLM,Negotiate
svnkit.ssh2.persistent false
user.country US
user.dir C:\bin\Jenkins
user.home C:\Windows\system32\config\systemprofile
user.language en
user.name TEST-JENKINS$
user.script
user.timezone America/Los_Angeles
user.variant
Environment Variables
Name ↓
Value
ALLUSERSPROFILE C:\ProgramData
APPDATA C:\Windows\system32\config\systemprofile\AppData\Roaming
BASE C:\bin\Jenkins
CommonProgramFiles C:\Program Files (x86)\Common Files
CommonProgramFiles(x86) C:\Program Files (x86)\Common Files
CommonProgramW6432 C:\Program Files\Common Files
COMPUTERNAME TEST-JENKINS
ComSpec C:\Windows\system32\cmd.exe
JENKINS_HOME C:\bin\Jenkins
LOCALAPPDATA C:\Windows\system32\config\systemprofile\AppData\Local
NUMBER_OF_PROCESSORS 6
OS Windows_NT
Path C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE x86
PROCESSOR_ARCHITEW6432 AMD64
PROCESSOR_IDENTIFIER AMD64 Family 21 Model 1 Stepping 2, AuthenticAMD
PROCESSOR_LEVEL 21
PROCESSOR_REVISION 0102
ProgramData C:\ProgramData
ProgramFiles C:\Program Files (x86)
ProgramFiles(x86) C:\Program Files (x86)
ProgramW6432 C:\Program Files
PSModulePath C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC C:\Users\Public
SERVICE_ID Jenkins
SystemDrive C:
SystemRoot C:\Windows
TEMP C:\Windows\TEMP
TMP C:\Windows\TEMP
USERDOMAIN (omitted)
USERNAME TEST-JENKINS$
USERPROFILE C:\Windows\system32\config\systemprofile
windir C:\Windows
WINSW_EXECUTABLE C:\bin\Jenkins\jenkins.exe
WINSW_SERVICE_ID Jenkins
Plugins
Name ↓
Version
Enabled
ace-editor 1.1 true
ant 1.4 true
antisamy-markup-formatter 1.5 true
authentication-tokens 1.3 true
bouncycastle-api 2.16.1 true
branch-api 2.0.8 true
build-timeout 1.18 true
cloudbees-folder 6.0.3 true
credentials 2.1.13 true
credentials-binding 1.11 true
display-url-api 1.1.1 true
docker-commons 1.6 true
docker-workflow 1.10 true
durable-task 1.13 true
email-ext 2.57.2 true
external-monitor-job 1.7 true
git 3.2.0 true
git-client 2.4.1 true
git-server 1.7 true
github 1.26.2 true
github-api 1.85 true
github-branch-source 2.0.5 true
github-organization-folder 1.6 true
gradle 1.26 true
handlebars 1.1.1 true
icon-shim 2.0.3 true
jquery-detached 1.2.1 true
junit 1.20 true
ldap 1.14 true
mailer 1.20 true
mapdb-api 1.0.9.0 true
matrix-auth 1.5 true
matrix-project 1.9 true
momentjs 1.1.1 true
pam-auth 1.3 true
pipeline-build-step 2.5 true
pipeline-github-lib 1.0 true
pipeline-graph-analysis 1.3 true
pipeline-input-step 2.5 true
pipeline-milestone-step 1.3.1 true
pipeline-model-api 1.1.2 true
pipeline-model-declarative-agent 1.1.1 true
pipeline-model-definition 1.1.2 true
pipeline-model-extensions 1.1.2 true
pipeline-rest-api 2.6 true
pipeline-stage-step 2.2 true
pipeline-stage-tags-metadata 1.1.2 true
pipeline-stage-view 2.6 true
plain-credentials 1.4 true
resource-disposer 0.6 true
scm-api 2.1.1 true
script-security 1.27 true
ssh-credentials 1.13 true
ssh-slaves 1.16 true
structs 1.6 true
subversion 2.7.2 true
timestamper 1.8.8 true
token-macro 2.1 true
windows-slaves 1.3.1 true
workflow-aggregator 2.5 true
workflow-api 2.12 true
workflow-basic-steps 2.4 true
workflow-cps 2.29 true
workflow-cps-global-lib 2.7 true
workflow-durable-task-step 2.10 true
workflow-job 2.10 true
workflow-multibranch 2.14 true
workflow-scm-step 2.4 true
workflow-step-api 2.9 true
workflow-support 2.14 true
ws-cleanup 0.32 trueI was able to reproduce this problem with a fresh/clean install of Jenkins, on a freshly installed VM, with no additional plugins (other than what it installed automatically) System Properties Name ↓ Value awt.toolkit sun.awt.windows.WToolkit executable-war C:\bin\Jenkins\jenkins.war file.encoding Cp1252 file.encoding.pkg sun.io file.separator \ hudson.lifecycle hudson.lifecycle.WindowsServiceLifecycle java.awt.graphicsenv sun.awt.Win32GraphicsEnvironment java.awt.headless true java.awt.printerjob sun.awt.windows.WPrinterJob java.class.path C:\bin\Jenkins\jenkins.war java.class.version 52.0 java.endorsed.dirs C:\bin\Jenkins\jre\lib\endorsed java.ext.dirs C:\bin\Jenkins\jre\lib\ext;C:\Windows\Sun\Java\lib\ext java.home C:\bin\Jenkins\jre java.io.tmpdir C:\Windows\TEMP\ java.library.path C:\bin\Jenkins\jre\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;. java.runtime.name Java(TM) SE Runtime Environment java.runtime.version 1.8.0_66-b18 java.specification.name Java Platform API Specification java.specification.vendor Oracle Corporation java.specification.version 1.8 java.vendor Oracle Corporation java.vendor.url http://java.oracle.com/ java.vendor.url.bug http://bugreport.sun.com/bugreport/ java.version 1.8.0_66 java.vm.info mixed mode java.vm.name Java HotSpot(TM) Client VM java.vm.specification.name Java Virtual Machine Specification java.vm.specification.vendor Oracle Corporation java.vm.specification.version 1.8 java.vm.vendor Oracle Corporation java.vm.version 25.66-b18 jna.loaded true jnidispatch.path C:\Windows\TEMP\jna--1498907351\jna2229444743706072211.dll line.separator mail.smtp.sendpartial true mail.smtps.sendpartial true os.arch x86 os.name Windows NT (unknown) os.version 10.0 path.separator ; sun.arch.data.model 32 sun.boot.class.path C:\bin\Jenkins\jre\lib\resources.jar;C:\bin\Jenkins\jre\lib\rt.jar;C:\bin\Jenkins\jre\lib\sunrsasign.jar;C:\bin\Jenkins\jre\lib\jsse.jar;C:\bin\Jenkins\jre\lib\jce.jar;C:\bin\Jenkins\jre\lib\charsets.jar;C:\bin\Jenkins\jre\lib\jfr.jar;C:\bin\Jenkins\jre\classes sun.boot.library.path C:\bin\Jenkins\jre\bin sun.cpu.endian little sun.cpu.isalist sun.desktop windows sun.io.unicode.encoding UnicodeLittle sun.java.command C:\bin\Jenkins\jenkins.war --httpPort=8080 --webroot=C:\bin\Jenkins\war sun.java.launcher SUN_STANDARD sun.jnu.encoding Cp1252 sun.management.compiler HotSpot Client Compiler sun.os.patch.level svnkit.http.methods Digest,Basic,NTLM,Negotiate svnkit.ssh2.persistent false user.country US user.dir C:\bin\Jenkins user.home C:\Windows\system32\config\systemprofile user.language en user.name TEST-JENKINS$ user.script user.timezone America/Los_Angeles user.variant Environment Variables Name ↓ Value ALLUSERSPROFILE C:\ProgramData APPDATA C:\Windows\system32\config\systemprofile\AppData\Roaming BASE C:\bin\Jenkins CommonProgramFiles C:\Program Files (x86)\Common Files CommonProgramFiles(x86) C:\Program Files (x86)\Common Files CommonProgramW6432 C:\Program Files\Common Files COMPUTERNAME TEST-JENKINS ComSpec C:\Windows\system32\cmd.exe JENKINS_HOME C:\bin\Jenkins LOCALAPPDATA C:\Windows\system32\config\systemprofile\AppData\Local NUMBER_OF_PROCESSORS 6 OS Windows_NT Path C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC PROCESSOR_ARCHITECTURE x86 PROCESSOR_ARCHITEW6432 AMD64 PROCESSOR_IDENTIFIER AMD64 Family 21 Model 1 Stepping 2, AuthenticAMD PROCESSOR_LEVEL 21 PROCESSOR_REVISION 0102 ProgramData C:\ProgramData ProgramFiles C:\Program Files (x86) ProgramFiles(x86) C:\Program Files (x86) ProgramW6432 C:\Program Files PSModulePath C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules PUBLIC C:\Users\Public SERVICE_ID Jenkins SystemDrive C: SystemRoot C:\Windows TEMP C:\Windows\TEMP TMP C:\Windows\TEMP USERDOMAIN (omitted) USERNAME TEST-JENKINS$ USERPROFILE C:\Windows\system32\config\systemprofile windir C:\Windows WINSW_EXECUTABLE C:\bin\Jenkins\jenkins.exe WINSW_SERVICE_ID Jenkins Plugins Name ↓ Version Enabled ace-editor 1.1 true ant 1.4 true antisamy-markup-formatter 1.5 true authentication-tokens 1.3 true bouncycastle-api 2.16.1 true branch-api 2.0.8 true build-timeout 1.18 true cloudbees-folder 6.0.3 true credentials 2.1.13 true credentials-binding 1.11 true display-url-api 1.1.1 true docker-commons 1.6 true docker-workflow 1.10 true durable-task 1.13 true email-ext 2.57.2 true external-monitor-job 1.7 true git 3.2.0 true git-client 2.4.1 true git-server 1.7 true github 1.26.2 true github-api 1.85 true github-branch-source 2.0.5 true github-organization-folder 1.6 true gradle 1.26 true handlebars 1.1.1 true icon-shim 2.0.3 true jquery-detached 1.2.1 true junit 1.20 true ldap 1.14 true mailer 1.20 true mapdb-api 1.0.9.0 true matrix-auth 1.5 true matrix-project 1.9 true momentjs 1.1.1 true pam-auth 1.3 true pipeline-build-step 2.5 true pipeline-github-lib 1.0 true pipeline-graph-analysis 1.3 true pipeline-input-step 2.5 true pipeline-milestone-step 1.3.1 true pipeline-model-api 1.1.2 true pipeline-model-declarative-agent 1.1.1 true pipeline-model-definition 1.1.2 true pipeline-model-extensions 1.1.2 true pipeline-rest-api 2.6 true pipeline-stage-step 2.2 true pipeline-stage-tags-metadata 1.1.2 true pipeline-stage-view 2.6 true plain-credentials 1.4 true resource-disposer 0.6 true scm-api 2.1.1 true script-security 1.27 true ssh-credentials 1.13 true ssh-slaves 1.16 true structs 1.6 true subversion 2.7.2 true timestamper 1.8.8 true token-macro 2.1 true windows-slaves 1.3.1 true workflow-aggregator 2.5 true workflow-api 2.12 true workflow-basic-steps 2.4 true workflow-cps 2.29 true workflow-cps-global-lib 2.7 true workflow-durable-task-step 2.10 true workflow-job 2.10 true workflow-multibranch 2.14 true workflow-scm-step 2.4 true workflow-step-api 2.9 true workflow-support 2.14 true ws-cleanup 0.32 true
If a pipeline contains any boolean parameters, AND the pipeline defines any environment variables, then the build fails with a cast exception between boolean and string. The boolean parameters can either be defined in the pipeline script (my Jenkinsfiles had it this way when I encountered the problem), or they can be defined Here's a simple pipeline script that demonstrates the problem and the console output...
Create a new Pipeline job:
- This proejct is parameterized: add a Boolean Parameter with name "TestBooleanParameter", Description "test"
- Definition: Pipeline script
- Script:
pipeline {
agent anyenvironment {
ProjectFile = 'build.proj'
}stages {
stage("Prepare") {
steps {
script {
echo 'Hello world.'
}
}
}
}
}
Console output:
[Pipeline] node
Running on master in C:\bin\Jenkins\workspace\test-boolean-param
[Pipeline] {
[Pipeline] withEnv
[Pipeline] {
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String
at hudson.EnvVars.put(EnvVars.java:74)
at java.util.AbstractMap.putAll(Unknown Source)
at java.util.TreeMap.putAll(Unknown Source)
at hudson.EnvVars.<init>(EnvVars.java:93)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:77)
at org.codehaus.groovy.runtime.callsite.ConstructorSite.callConstructor(ConstructorSite.java:45)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)
at org.jenkinsci.plugins.pipeline.modeldefinition.model.Environment.getCredsMap(Environment.groovy:63)
at org.jenkinsci.plugins.pipeline.modeldefinition.model.Environment$getCredsMap$3.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at org.jenkinsci.plugins.pipeline.modeldefinition.Utils.getEnvCredentials(Utils.groovy:334)
at org.jenkinsci.plugins.pipeline.modeldefinition.Utils$getEnvCredentials$13.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:18)
at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.withCredentialsBlock(jar:file:/C:/bin/Jenkins/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:243)
at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.call(jar:file:/C:/bin/Jenkins/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:78)
at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.inWrappers(jar:file:/C:/bin/Jenkins/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:380)
at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.inWrappers(jar:file:/C:/bin/Jenkins/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:379)
at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.call(jar:file:/C:/bin/Jenkins/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:77)
at org.jenkinsci.plugins.pipeline.modeldefinition.ModelInterpreter.withEnvBlock(jar:file:/C:/bin/Jenkins/plugins/pipeline-model-definition/WEB-INF/lib/pipeline-model-definition.jar!/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy:221)
at __cps.transform__(Native Method)
at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:57)
at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
at sun.reflect.GeneratedMethodAccessor163.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.get(PropertyishBlock.java:76)
at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.fixName(PropertyishBlock.java:66)
at sun.reflect.GeneratedMethodAccessor167.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
at com.cloudbees.groovy.cps.Next.step(Next.java:74)
at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154)
at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:33)
at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:30)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:30)
at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:165)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:328)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:80)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:240)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:228)
at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
at java.util.concurrent.FutureTask.run(Unknown Source)
at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Finished: FAILURE
This problem started this past weekend. I had installed updates for plugins (and Jenkins itself) a day or two prior. After narrowing it down to a simple pipeline script that could demonstrate the problem, I did a fresh install of Jenkins on a new VM today and confirmed it happens there as well.
My original pipeline script on my production Jenkins server is a multibranch project with a Jenkinsfile. One thing that might be worth noting is that if, after a build failed due to this problem, if I edited the Jenkinsfile and removed all booelan parameters defined in it, then committed that and triggered the build, the next build would still fail–it seems the existence of the boolean parameters in the config.xml (based on the previous build) combined with having environment variables causes this error. The next build after that would be fine (the parameters no longer exist in the xml).
I found a workaround (hence why I chose 'minor' for the priority): changing the parameters to be choices instead of boolean seems to work (although it looks like I'll need to either build twice to get rid of the old boolean parameter or go manually edit the xml files to clear them out).
- links to