[Declarative Pipeline] default params not working after checkout

554 views
Skip to first unread message

Dan Tran

unread,
Jan 2, 2017, 9:21:46 PM1/2/17
to Jenkins Users
Hi

My Jenkinsfile has a few parameters with default values and are fed into  maven step  via -Dxxx=${param.yyy}

the Maven job bails right after the first invocation after checkout from git but work on subsequent 'build with parameters'

here is the error: 

[Pipeline] End of Pipeline
groovy.lang.MissingPropertyException: No such property: source for class: groovy.lang.Binding
	at groovy.lang.Binding.getVariable(Binding.java:63)
	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onGetProperty(SandboxInterceptor.java:224)
	at org.kohsuke.groovy.sandbox.impl.Checker$4.call(Checker.java:241)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:238)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:221)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:221)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:221)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:221)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:221)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:221)
	at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.getProperty(SandboxInvoker.java:28)
	at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20)
	at WorkflowScript.run(WorkflowScript:31)


anyone sees this? should I open a bug?

Thanks

-Dan

Andrew Bayer

unread,
Jan 3, 2017, 12:14:32 AM1/3/17
to jenkins...@googlegroups.com
This is using param.xyz? That should be getting the default value - if it's not, definitely open a JIRA. 

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a97e0720-3a81-4bdf-99d8-ec342729249f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dan Tran

unread,
Jan 3, 2017, 9:35:38 PM1/3/17
to Jenkins Users
false alarm, one of my -Dxxx=${params.yyy} did not use 'params.' (ie ${yyy}) The error could have been better.
Reply all
Reply to author
Forward
0 new messages