we do it with option #3 except instead of groovy we just use a simple bash script which is nice because every real system pretty much has bash.
On Thursday, August 13, 2015 at 12:37:08 AM UTC-7, Brantone wrote: > > For the time being I ended up going with #1 using workspace.channel, as it > was doing some very minor file modifications, although anything more > complex and I'd probably go back to #3 > #2 ended up being ridiculously hacky because ended up being case of > whack-a-mole to get all the jars into the classpath and nearly found myself > installing entire jenkins server onto the slave to do so. Part of me was > hoping @Grab might solve it, but alas, no dice (per some tickets). > > So, yeah, that's just the way it is :( > > > > On Wednesday, 12 August 2015 04:28:14 UTC-7, rginga wrote: >> >> I have only been able to get #3 to work. But I am not a Groovy expert. I >> would love a solution like #2 if you create one. >> >> >> >> *From:* [email protected] [mailto:[email protected]] *On >> Behalf Of *Brantone >> *Sent:* Tuesday, August 11, 2015 9:11 PM >> *To:* Jenkins Users >> *Subject:* Groovy script vs. system script : file info needed to affect >> build >> >> >> >> I'm well aware of the differences (and headaches) between Groovy script >> and system Groovy script .. my question involves the following scenario: >> >> After an SCM checkout is done on remote slave node, need to grep for a >> string in a specific file, whose value will be used for all downstream >> jobs, preferably added as a parameter to current build then just auto >> passed on. >> >> >> >> >> >> So the options are: >> >> 1.) Use System Groovy script to remote to the slave to grep the file for >> the string, and off and running. >> >> 2.) Use Groovy script to grep for string and hack to include class path >> so ParametersAction can be used to add new StringParameterValue. >> >> 3.) Use Groovy script to grep for string and simply output to file, then >> use EnvInject to read it back in as environment var. >> >> 4.) .... ?? >> >> >> >> Is there a preferred or standard method? Or something I'm not considering >> ... >> >> Cheers >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Jenkins Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-users/b3255169-67fb-42a0-b10d-00ca49d89e21%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jenkinsci-users/b3255169-67fb-42a0-b10d-00ca49d89e21%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/001bc856-48ce-4015-87fd-7246d46172bb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
