[JIRA] [workflow-plugin] (JENKINS-34261) Multibranch workflow cannot setup job properties

11 views
Skip to first unread message

adrien.lecharpentier@gmail.com (JIRA)

unread,
Apr 14, 2016, 5:10:02 PM4/14/16
to jenkinsc...@googlegroups.com
Adrien Lecharpentier created an issue
 
Jenkins / Bug JENKINS-34261
Multibranch workflow cannot setup job properties
Issue Type: Bug Bug
Assignee: Jesse Glick
Components: workflow-plugin
Created: 2016/Apr/14 9:09 PM
Environment: Jenkins 2.0-beta-2
workflow-multibranch 2.1 && 2.3
Priority: Major Major
Reporter: Adrien Lecharpentier

With a Jenkinsfile containing only

properties [[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '', artifactNumToKeepStr: '2', daysToKeepStr: '', numToKeepStr: '5']]]

I run into

groovy.lang.MissingPropertyException: No such property: properties for class: groovy.lang.Binding
at groovy.lang.Binding.getVariable(Binding.java:63)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onGetProperty(SandboxInterceptor.java:210)
at org.kohsuke.groovy.sandbox.impl.Checker$4.call(Checker.java:241)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:238)
at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.getProperty(SandboxInvoker.java:23)
at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:17)
at WorkflowScript.run(WorkflowScript:1)
at __cps.transform__(Native Method)
at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.get(PropertyishBlock.java:62)
at com.cloudbees.groovy.cps.LValueBlock$GetAdapter.receive(LValueBlock.java:30)
at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.fixName(PropertyishBlock.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
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:58)
at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:154)
at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:19)
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:106)
at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:30)
at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:164)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:277)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$000(CpsThreadGroup.java:77)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:186)
at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:184)
at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:47)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

However the class org.jenkinsci.plugins.workflow.multibranch.JobPropertyStep is loaded as I can import it in a script console and run

import org.jenkinsci.plugins.workflow.multibranch.JobPropertyStep;
JobPropertyStep.class.toString()

without any issue.

Any idea on this one?

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

adrien.lecharpentier@gmail.com (JIRA)

unread,
Apr 14, 2016, 5:19:04 PM4/14/16
to jenkinsc...@googlegroups.com
Adrien Lecharpentier updated an issue
Change By: Adrien Lecharpentier
Environment: Jenkins :  2.0-beta-2  && 1.651.1
workflow-multibranch
:  2.1 && 2.3

adrien.lecharpentier@gmail.com (JIRA)

unread,
Apr 16, 2016, 1:10:01 PM4/16/16
to jenkinsc...@googlegroups.com
Adrien Lecharpentier commented on Bug JENKINS-34261
 
Re: Multibranch workflow cannot setup job properties

Strange thing is that the build fail with the stack trace, but the job is configured with the property.

jglick@cloudbees.com (JIRA)

unread,
Apr 27, 2016, 5:53:02 PM4/27/16
to jenkinsc...@googlegroups.com
Jesse Glick resolved as Duplicate
 

Use

properties([…])
Change By: Jesse Glick
Status: Open Resolved
Resolution: Duplicate
Reply all
Reply to author
Forward
0 new messages