-
Improvement
-
Resolution: Unresolved
-
Critical
I have Authorize Plugin installed and I'm running the build as an admin user (without that it would just fail with ERROR: script not yet approved for use).
I'm trying to run a job-dsl step with files checked out from SCM.
It fails when trying to import another class defined in the same directory:
/var/lib/jenkins/jobs/CFS Pipeline Seed/workspace/avalonPipeline.groovy: 3: unable to resolve class JobBuilder @ line 3, column 1. import JobBuilder ^
There is a JobBuilder.groovy file in the workspace.
I was able to run the job only by disabling "Enable script security for Job DSL scripts" option in the global security settings.
[JENKINS-43726] Allow importing local classes when the build is running as an administrator
Description |
Original:
I have Authorize Plugin installed and I'm running the build as an admin user (without that it would just fail saying the script needs approval). I'm trying to run a job-dsl step with files checked out from SCM. It fails when trying to import another class defined in the same directory: {code:java} /var/lib/jenkins/jobs/CFS Pipeline Seed/workspace/avalonPipeline.groovy: 3: unable to resolve class JobBuilder @ line 3, column 1. import JobBuilder ^{code} There is a {{JobBuilder.groovy}} file in the workspace. I was able to run the job only by disabling "Enable script security for Job DSL scripts" option in the global security settings. |
New:
I have Authorize Plugin installed and I'm running the build as an admin user (without that it would just fail with {{ERROR: script not yet approved for use}}). I'm trying to run a job-dsl step with files checked out from SCM. It fails when trying to import another class defined in the same directory: {code:java} /var/lib/jenkins/jobs/CFS Pipeline Seed/workspace/avalonPipeline.groovy: 3: unable to resolve class JobBuilder @ line 3, column 1. import JobBuilder ^{code} There is a {{JobBuilder.groovy}} file in the workspace. I was able to run the job only by disabling "Enable script security for Job DSL scripts" option in the global security settings. |
Resolution | New: Not A Defect [ 7 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Resolution | Original: Not A Defect [ 7 ] | |
Status | Original: Resolved [ 5 ] | New: Reopened [ 4 ] |
Issue Type | Original: Bug [ 1 ] | New: Improvement [ 4 ] |
Priority | Original: Blocker [ 1 ] | New: Critical [ 2 ] |
Summary | Original: Script security broke importing local classes | New: Allow importing local classes when the build is running as an administrator |
We are affected by both of those issues:
The whitelist problem is fairly annoying because we run Job DSL from the Bitbucket Branch Source Plugin and this means every changes we make is going to require a whitelist change. Any thoughts on how to deal with this?