[JIRA] (JENKINS-61481) No signature of method: groovy.util.Node.div() when use sandbox

4 views
Skip to first unread message

jrivero@osrfoundation.org (JIRA)

unread,
Mar 14, 2020, 4:39:03 PM3/14/20
to jenkinsc...@googlegroups.com
Jose Luis Rivero created an issue
 
Jenkins / Bug JENKINS-61481
No signature of method: groovy.util.Node.div() when use sandbox
Issue Type: Bug Bug
Assignee: Daniel Spilker
Components: job-dsl-plugin
Created: 2020-03-14 20:38
Environment: Jenkins version 2.204.4
Job-dsl version 1.77
Priority: Minor Minor
Reporter: Jose Luis Rivero

When running the following example using the sandbox option:

job('test')
{
  scm {
    hg("http://test_repo") {
    configure { node ->
      node / browser(class: 'hudson.plugins.mercurial.browser.BitBucket') / "url" << "test"
      }
    }
  }
}

I get the following error:

ERROR: (script, line 6) No signature of method: groovy.util.Node.div() is applicable for argument types: (groovy.util.Node) values: [browser[attributes={class=hudson.plugins.mercurial.browser.BitBucket}; value=[]]]
Possible solutions: is(java.lang.Object), wait(), find(), dump(), any(), wait(long)

The problem is gone when the sandbox is disabled or the piece of code works fine when run in http://job-dsl.herokuapp.com/.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

mail@daniel-spilker.com (JIRA)

unread,
Mar 16, 2020, 3:35:02 PM3/16/20
to jenkinsc...@googlegroups.com
Daniel Spilker updated Bug JENKINS-61481
 

It is mentioned in the Configure Block documentation that the / and << operators do not work in sandbox mode.

As an alternative you can try Dynamic DSL:

job('example') {
  scm {
    mercurialSCM {
      source('http://acme.org/repo')
      browser {
        bitBucket {
          url('http://acme.org/repo')
        }
      }
    }
  }
}
Change By: Daniel Spilker
Status: Open Fixed but Unreleased
Assignee: Daniel Spilker Jose Luis Rivero
Resolution: Not A Defect
Reply all
Reply to author
Forward
0 new messages