Thanks. So you are saying whatever environment variable we set as a part of
dockerfile, are no longer will be available in build step ?
i am considering that build environment as docker container

please suggest

Regards
irfan


On Wed, Oct 28, 2015 at 2:24 PM, Baptiste Mathus <[email protected]> wrote:

> Hi Irfan,
>
> IMO, don't expect env vars be passed from Jenkins to the container. In my
> mind, expecting this in a Docker container is actually incorrect. Docker is
> about isolation and reproducibility.
> See Nicolas comment in the issue btw, he says something like that.
>
> Btw, IIUC, you're expecting to find the same JDK version inside the
> container and the one used to run Jenkins, which isn't something you can
> expect too.
>
> My 2 cents
>
> 2015-10-28 9:21 GMT+01:00 Irfan Sayed <[email protected]>:
>
>> Update:
>> on the Jenkins job console log: i can see following lines:
>>
>> *PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin*
>>
>>
>> and while building docker image using dockerfile:
>>
>>
>> "Env": [
>>             
>> *"PATH=/usr/java/latest/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",*
>>             "JAVA_VERSION=8u31",
>>             "BUILD_VERSION=b13",
>>             "JAVA_HOME=/usr/java/latest"
>>         ],
>>
>>
>> if we observe the PATH variable , they are not matching
>>
>> and i guess that's the problem which i am facing. Plugin is not exposing all 
>> the env variables ??
>>
>> i am not getting how to resolve
>>
>>
>> Jenkins master version : 1.631
>>
>> cloudbeese custom docker plugin : 1.6.1
>>
>>
>> on the console log, i am getting following output which is wrong.
>>
>>
>> + java -version
>> java version "1.7.0_91"
>> OpenJDK Runtime Environment (rhel-2.6.2.1.el7_1-x86_64 u91-b00)
>> OpenJDK 64-Bit Server VM (build 24.91-b01, mixed mode)
>>
>>
>> i should get following output:
>>
>>
>> java version "1.8.0_31"
>> Java(TM) SE Runtime Environment (build 1.8.0_65-b13)
>> Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)
>>
>>
>> Regards,
>>
>> irfan
>>
>>
>>
>> On Wed, Oct 28, 2015 at 11:55 AM, Irfan Sayed <[email protected]>
>> wrote:
>>
>>> Hi All,
>>>
>>> I am using cloudbeese custom build environment plugin to create the
>>> build environment based on docket container
>>> I have created dockerfile and spawning image using container.
>>> In the docker file , i am installing oracle JDK and setting up path
>>> JAVA_HOME.
>>>
>>> However, after building docker image and executing it in docker
>>> container through Jenkins job, I am not getting PATH variable updated which
>>> i set in the docker file
>>>
>>> I executed "java -version" command as a build step and it is showing
>>> some old version rather than the version which i set through dockerfile
>>>
>>> I feel that , the issue is similar to JENKINS-30113
>>>
>>> can someone please suggest
>>>
>>> Regards
>>> Irfan
>>>
>>>
>> --
>> 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/CACGLCJbY6peRkNwR2_%2BtL%2B3X4xcoRzO%3D9fD%3DZpLKvRLHW-Bz8w%40mail.gmail.com
>> <https://groups.google.com/d/msgid/jenkinsci-users/CACGLCJbY6peRkNwR2_%2BtL%2B3X4xcoRzO%3D9fD%3DZpLKvRLHW-Bz8w%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Baptiste <Batmat> MATHUS - http://batmat.net
> Sauvez un arbre,
> Mangez un castor !
>
> --
> 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/CANWgJS4DFRP%3D5U7_n%2BxWNfwVE%3D8MeVsXaKtMYf6c0Jw-3%2BGb4Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS4DFRP%3D5U7_n%2BxWNfwVE%3D8MeVsXaKtMYf6c0Jw-3%2BGb4Q%40mail.gmail.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/CACGLCJbuZNZDgLROcroOwryXh_CuBWkn%2BdTaYSmeqFUDx7vr4w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to