[JIRA] (JENKINS-55479) Using workspace classes from multiple DSL scripts fails
Title: Message Title Daniel Spilker updated JENKINS-55479 Jenkins / JENKINS-55479 Using workspace classes from multiple DSL scripts fails Change By: Daniel Spilker Status: Fixed but Unreleased Closed Add Comment This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.196609.1547040619000.5324.1583932140179%40Atlassian.JIRA.
[JIRA] (JENKINS-55479) Using workspace classes from multiple DSL scripts fails
Title: Message Title Daniel Spilker updated JENKINS-55479 Jenkins / JENKINS-55479 Using workspace classes from multiple DSL scripts fails Change By: Daniel Spilker Status: Open Fixed but Unreleased Resolution: Fixed Released As: Job DSL 1.72 Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55479) Using workspace classes from multiple DSL scripts fails
Title: Message Title Daniel Spilker commented on JENKINS-55479 Re: Using workspace classes from multiple DSL scripts fails PR: https://github.com/jenkinsci/job-dsl-plugin/pull/1156 I think the problem is that Job DSL re-uses the GroovyShell object, but the Script Security plugin creates a new sandbox for each script. Currently the Script Security does not provide an API to run multiple scripts in the same sandbox. To fix this I had to disable the GroovyShell cache. Running many scripts in sandbox mode will be slower. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55479) Using workspace classes from multiple DSL scripts fails
Title: Message Title Daniel Spilker updated an issue Jenkins / JENKINS-55479 Using workspace classes from multiple DSL scripts fails Change By: Daniel Spilker Component/s: script-security-plugin Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55479) Using workspace classes from multiple DSL scripts fails
Title: Message Title Roman Donchenko created an issue Jenkins / JENKINS-55479 Using workspace classes from multiple DSL scripts fails Issue Type: Bug Assignee: Daniel Spilker Components: job-dsl-plugin Created: 2019-01-09 13:30 Environment: Jenkins 2.150.1 Job DSL plugin 1.71 Priority: Major Reporter: Roman Donchenko Create a pipeline job with the following script: node('master') { writeFile file: 'a.groovy', text: 'new C()' writeFile file: 'b.groovy', text: 'new C()' writeFile file: 'C.groovy', text: 'class C {}' jobDsl targets: 'a.groovy,b.groovy', sandbox: true } Add appropriate authorization to the job and run it. It will fail with output like this: Started by user [...] Running as [...] Running in Durability level: MAX_SURVIVABILITY [Pipeline] node Running on Jenkins in /var/jenkins_home/workspace/test [Pipeline] { [Pipeline] writeFile [Pipeline] writeFile [Pipeline] writeFile [Pipeline] jobDsl Processing DSL script a.groovy Processing DSL script b.groovy [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline ERROR: Scripts not permitted to use new C Finished: FAILURE This only happens if multiple DSL scripts are used. If you change the jobDsl step to