[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Openshift rhc set-env during git push (prebuild/build step)



if you source the sdk ($OPENSHIFT_CARTRIDGE_SDK_BASH) you can use the "set_env_var" function:

"set_env_var varname value ~/.env/user_vars" should work.

however that just sets up the env var for your next session, so you'll also want to do an export to ensure it's immediately available.

so:

source $OPENSHIFT_CARTRIDGE_SDK_BASH
set_env_var NEWVAR NEWVALUE ~/.env/user_vars
export NEWVAR=NEWVALUE

should accomplish what you want.



Ben Parees | OpenShift

----- Original Message -----
> From: "Andrei Colta" <andrey colta gmail com>
> To: "users" <users lists openshift redhat com>, dev lists openshift redhat com
> Sent: Tuesday, September 30, 2014 8:16:07 AM
> Subject: Openshift rhc set-env during git push (prebuild/build step)
> 
> Hello all,
> 
> I just want to ask, I am trying to add new VARIABLES, and thinking that it
> will be great if this will be done during build step "git push"
> 
> so if I add to
> .openshift/action_hooks/pre_build
> 
> rhc set-env ....
> 
> will it work? or what other options do we have?
> 
> 
> Thanks,
> Andreo
> 
> _______________________________________________
> dev mailing list
> dev lists openshift redhat com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
> 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]