Issue Type: Bug Bug
Assignee: Daniel Spilker
Components: job-dsl-plugin
Created: 30/Sep/14 10:24 PM
Description:

The EnvInject plugin allows to supply a groovy script under "Build Environment # Inject environment variables to the build process" exactly the same as is already the case further to the top under "Prepare an environment for the run".

Please add the groovy() method to the dsl of buildWrappers { environmentVariables { ... } }. The buildWrappers is critical for me because it's after the scm checkout and I need a reference to the workspace which isn't yet available at the very beginning.

My workaround (in case anyone else runs into this) for now is to use the configure closure on the job along the lines of:

job {
    configure { node ->
        node / buildWrappers / EnvInjectBuildWrapper / info / groovyScriptContent << """
        |
        |// a ton of groovy stuff
        |
        |return [ key : value ]
        |""".stripMargin()
    }
}
Project: Jenkins
Priority: Minor Minor
Reporter: Patrick Huber
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to