ghprb
ghprb copied to clipboard
Environment variables appended to each command
Hi Is there a way to disable adding of environment variables to each command executed? I'm using grails and it seems that parameters that contain spaces are currently problematic (https://jira.grails.org/browse/GRAILS-11351)
grails "-DghprbPullTitle=Pull title" clean --plain-output
|Loading Grails 2.3.6
|Configuring classpath
|Running pre-compiled script
|Script 'Title' not found, did you mean:
1) Init
2) Clean
3) Compile
4) CleanAll
5) ClearProxy_
Please make a selection or enter Q to quit:
So ideally I would like to disable injection of those variables.
There is no way currently, but I am going to be updating how the configuration works, and I could see about adding something afterwards.
@DavidTanner I am running into this exact issue. Do you know when this feature might be ready?
Thanks!
I submitted a PR https://github.com/jenkinsci/grails-plugin/pull/12 to work around this by suppressing the -D build environment variables.
I am using the Github pull request builder plugin https://wiki.jenkins-ci.org/display/JENKINS/GitHub+pull+request+builder+plugin to run test-app and was running into the same issues as others. I am not using any of the variables that the ghprb plugin passes in so I added an option to suppress -D build environment variables. When this option is checked none of the -D variables are passed to grails allowing the build with grails plugin to run the targets as expected.
If you want to test it out to see if it works for you, you can download it from here http://jmoses.co/data/grails.hpi and install it manually http://stackoverflow.com/questions/14950408/how-to-install-a-plugin-in-jenkins-manually
@jonaldomo Thanks for that fix. This issue started happening for me today (we have been messing around with installing and updating some plugins). Your patched grails.hpi fixed it 🙌