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

Re: Passing Environment variables to "oc new-app"



Nice Clayton! Of Course! 

Did notice an issue though. The first build has the environment parameters, but if I “rebuild” from the web UI, the second build does not. Not a huge deal, but you may want to keep an eye out. I’ll create an issue later tonight. Need to finish the POC first.

-Nick




On 1/25/16, 5:15 PM, "Clayton Coleman" <ccoleman redhat com> wrote:

>You can always create a build first, then create the deployment.
>
>oc new-build <argument to build> --env
>oc new-app <output image from build>
>
>You'll want to wait for the first build to complete before running
>new-app (so you get the metadata from the build image).
>
>On Mon, Jan 25, 2016 at 3:02 PM, Nick Baker <nbaker pentaho com> wrote:
>> That’s perfectly reasonable. It would be nice if there was a separate one to
>> pass to builds.
>>
>> Thanks,
>> -Nick
>>
>> From: Ben Parees <bparees redhat com>
>> Date: Monday, January 25, 2016 at 2:59 PM
>> To: Nicholas Baker <nbaker pentaho com>
>> Cc: "users lists openshift redhat com" <users lists openshift redhat com>
>> Subject: Re: Passing Environment variables to "oc new-app"
>>
>> i believe oc new-app -e only sets the env variables on the deploymentconfigs
>> it creates, not the buildconfig.  This is (weakly) implied by the help text:
>> -e, --env=[]: Specify key value pairs of environment variables to set into
>> each container.
>>
>> in that it refers to setting variables on containers, not builds.
>>
>>
>> On Mon, Jan 25, 2016 at 2:25 PM, Nick Baker <nbaker pentaho com> wrote:
>>>
>>> Hey All,
>>>
>>> I’m having trouble passing environment variables to new-app performing an
>>> s2i.
>>>
>>> The following works:
>>>
>>> s2i build -e "MAVEN_ARGS=install karaf:assembly karaf:archive -DskipTests
>>> -e " git://github.com/CodeOnCoffee/camel-hello-world fabric8/s2i-k
>>> araf dhirajsb/camel-hello-world --loglevel=4
>>>
>>>
>>>
>>> But calling oc new-app does not seem to pass through the varaibles:
>>>
>>> oc new-app --env="MAVEN_ARGS=install karaf:assembly karaf:archive
>>> -DskipTests -e"
>>> fabric8/s2i-karaf~git://github.com/CodeOnCoffee/camel-hello-world
>>>
>>> oc new-app --env=MAVEN_ARGS="install karaf:assembly karaf:archive
>>> -DskipTests -e"
>>> fabric8/s2i-karaf~git://github.com/CodeOnCoffee/camel-hello-world
>>>
>>>
>>> Any help appreciated!
>>> Nick
>>>
>>> _______________________________________________
>>> users mailing list
>>> users lists openshift redhat com
>>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>>
>>
>>
>>
>> --
>> Ben Parees | OpenShift
>>
>>
>> _______________________________________________
>> users mailing list
>> users lists openshift redhat com
>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>


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