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] <javascript:> [mailto:
> [email protected] <javascript:>] *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] <javascript:>.
> 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/dfaa0b97-a4e2-48aa-b7a2-25fd9d8c6b4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to