[
https://issues.jenkins-ci.org/browse/JENKINS-14056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163723#comment-163723
]
Balazs Jagri commented on JENKINS-14056:
----------------------------------------
{quote}Please could you tell me what do you mean about referencing an external
Groovy script?{quote}
I need a way to invoke Groovy scripts that are managed globally, e.g. with the
SharedObjects plugin.
{quote}And currently, you can give an absolute path to your Groovy script, so
the file can be shared through many jobs.{quote}
The "Script File Path" field is for shell scripts and its help states that they
cannot contribute environment variables which is another requirement in my case.
{quote}Moreover, there is the SharedObjects Jenkins plugins to share more
advanced objects and injected them in the EnvInject plugin.{quote}
My solution is is to run Groovy scripts defined in the SharedObjects plugin (by
content or path), and have those scripts add environment variables to the job.
> Run Groovy scripts from files and environment variables
> -------------------------------------------------------
>
> Key: JENKINS-14056
> URL: https://issues.jenkins-ci.org/browse/JENKINS-14056
> Project: Jenkins
> Issue Type: New Feature
> Components: envinject
> Reporter: Balazs Jagri
> Assignee: Gregory Boissinot
> Priority: Minor
>
> Currently there is no way to reference external Groovy scripts, they have to
> be typed in on the job configuration page. It may lead to the same script
> being duplicated among many jobs, making it difficult to maintain.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira