[JIRA] [script-security-plugin] (JENKINS-33051) Groovy Star-Dot operator not supported in sandbox

1 view
Skip to first unread message

jglick@cloudbees.com (JIRA)

unread,
Mar 11, 2016, 5:14:01 PM3/11/16
to jenkinsc...@googlegroups.com
Jesse Glick updated an issue
 
Jenkins / Bug JENKINS-33051
Groovy Star-Dot operator not supported in sandbox
Change By: Jesse Glick
Summary: Groovy Star-Dot operator  are Not Supported  not supported  in  JenkinsFile  sandbox
Component/s: script-security-plugin
Component/s: workflow-plugin
Labels: multibranch  workflow
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

jglick@cloudbees.com (JIRA)

unread,
Mar 11, 2016, 5:14:01 PM3/11/16
to jenkinsc...@googlegroups.com
Jesse Glick updated an issue
Change By: Jesse Glick
Labels: groovy workflow

graham.burgess@razerzone.com (JIRA)

unread,
May 17, 2018, 7:18:02 PM5/17/18
to jenkinsc...@googlegroups.com
Graham Burgess commented on Bug JENKINS-33051
 
Re: Groovy Star-Dot operator not supported in sandbox

I just hit this bug while building a shared library that really could use the spread operator to spread method params!

This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

graham.burgess@razerzone.com (JIRA)

unread,
May 17, 2018, 7:18:03 PM5/17/18
to jenkinsc...@googlegroups.com
Graham Burgess edited a comment on Bug JENKINS-33051
I just hit this bug while building a shared library that really could use the spread (*) operator to spread method params!

andrew.bayer@gmail.com (JIRA)

unread,
Nov 19, 2018, 10:12:04 AM11/19/18
to jenkinsc...@googlegroups.com
Andrew Bayer updated an issue
 
Change By: Andrew Bayer
Labels: groovy pipeline triaged-2018-11
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

grimsqueaker13@gmail.com (JIRA)

unread,
Nov 29, 2018, 7:17:02 AM11/29/18
to jenkinsc...@googlegroups.com
Daniel Browne commented on Bug JENKINS-33051
 
Re: Groovy Star-Dot operator not supported in sandbox

Also running into this bug. Is there any workaround that has been found?

jglick@cloudbees.com (JIRA)

unread,
Nov 29, 2018, 11:38:02 AM11/29/18
to jenkinsc...@googlegroups.com

Just do not use that operator. You can get an equivalent effect with method calls in the GDK.

grimsqueaker13@gmail.com (JIRA)

unread,
Nov 29, 2018, 3:51:47 PM11/29/18
to jenkinsc...@googlegroups.com

I have a config driven function call where the name of the function and the list of args are passed in. Also all the Groovy and most of the pipeline functionality I know has been learnt from Google today, so I am not entirely sure how to achieve the equivalent effect. I worked around it for now, but it is not pretty. I will go back and change it once this bug is resolved.

grimsqueaker13@gmail.com (JIRA)

unread,
Nov 29, 2018, 3:52:01 PM11/29/18
to jenkinsc...@googlegroups.com

tatu.kairi@eficode.com (JIRA)

unread,
Aug 30, 2019, 4:39:02 AM8/30/19
to jenkinsc...@googlegroups.com

Still an issue. The following does not work in script block:

// Simplified example; In reality, there are a lot of defaultArguments to pass
def defaultArguments = [
    "arg1": "arg1",
    "arg2": "arg2"
]                  
 
 if ( my_condition ) {
    doStuff(*:defaultArguments, foo: "bar")
} else {
    doStuff(*:defaultArguments, foo: "cux")
}
General error during canonicalization: java.lang.UnsupportedOperationException

java.lang.UnsupportedOperationException
	at com.cloudbees.groovy.cps.CpsTransformer.visitSpreadMapExpression(CpsTransformer.java:1207)
        // etc...

 

Reply all
Reply to author
Forward
0 new messages