OK it makes sense, thank you for the answer

Le ven. 24 août 2018 à 11:20, Carlos Sanchez <[email protected]> a écrit :

>
>
> On Fri, Aug 24, 2018 at 11:14 AM Tristan FAURE <[email protected]>
> wrote:
>
>>
>>
>> Le ven. 24 août 2018 à 11:09, Carlos Sanchez <[email protected]> a
>> écrit :
>>
>>>
>>>
>>> On Fri, Aug 24, 2018 at 10:42 AM Tristan FAURE <[email protected]>
>>> wrote:
>>>
>>>> Hello
>>>>
>>>> in my jenkins configuration admin GUI I have this volume definition :
>>>>
>>>> Volumes
>>>> - Claim Name = nfsdata
>>>> Read Only = true
>>>> Mount path = /etc/ssl/certs
>>>>
>>>> In scripted pipeline everything works perfectly
>>>>
>>>> In declarative pipeline :
>>>> pipeline {
>>>> agent {
>>>> kubernetes {
>>>> label "${jedi}"
>>>> yaml """
>>>> spec:
>>>> containers:
>>>> - name: maven
>>>> image: maven:3-jdk-8
>>>> command:
>>>> - cat
>>>> tty: true
>>>> """
>>>>
>>>> When i check the generated yaml in kubernetes, the volume is mounted
>>>> only on the jnlp container and not the maven one
>>>>
>>>
>>> how do you define that this pipeline uses the volume defined in the GUI?
>>> using Defaults Provider Template Name?
>>>
>> I don't know if I answer the question. This pipeline is inside my
>> jenkinsfile, I got the name analyzing my kubernetes cluster. The Volume
>> mount has been defined using the administration GUI
>>
>
> this pipeline does not define any volume and it will not use any volume
> defined in the GUI. This definition is independent of what you configure in
> the GUI unless you use "Defaults Provider Template Name" in the GUI, but I
> don't recommend you to do so.
> I suggest you put the volume definition in the yaml for completion and
> reproducibility
>
>
>>
>>>
>>>>
>>>> I need to write this to make it work and I don't really like this :
>>>> yaml """
>>>> spec:
>>>> containers:
>>>> - name: maven
>>>> image: docker-ccsl-virtual.repo.aes.alcatel.fr:8443/maven:3-jdk-8
>>>> command:
>>>> - cat
>>>> tty: true
>>>> volumeMounts:
>>>> - mountPath: /etc/ssl/certs
>>>> name: volume-0
>>>> readOnly : true
>>>> """
>>>>
>>>> Thank you in advance
>>>>
>>>> Tristan FAURE
>>>>
>>>> --
>>>> 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/fc9b3c60-aa86-491e-acf9-d9c6b09ecc06%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/jenkinsci-users/fc9b3c60-aa86-491e-acf9-d9c6b09ecc06%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 a topic in the
>>> Google Groups "Jenkins Users" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/jenkinsci-users/8RnJ7fozEdo/unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, send an email to
>>> [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jenkinsci-users/CALHFn6M1tx684wFzNoHqiLZhHoySvM2V6JvcO%3DTz%3D7gUNkFrXQ%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/jenkinsci-users/CALHFn6M1tx684wFzNoHqiLZhHoySvM2V6JvcO%3DTz%3D7gUNkFrXQ%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/CA%2BtQ8YMV8oKt5csyLfWu9zwi3UU2%3DsNk%3DiMy95y2qGoAyqyMFw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/jenkinsci-users/CA%2BtQ8YMV8oKt5csyLfWu9zwi3UU2%3DsNk%3DiMy95y2qGoAyqyMFw%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 a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jenkinsci-users/8RnJ7fozEdo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/CALHFn6N%3Dmbh%3DF7VwfgbR4AY-Y3x%2BqEw0jXrMb_f8jM2NZb1m4Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CALHFn6N%3Dmbh%3DF7VwfgbR4AY-Y3x%2BqEw0jXrMb_f8jM2NZb1m4Q%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/CA%2BtQ8YPFQ7OiODZS%3DEhBNW8zXVnhP-6%3Dh3XaVoUFThShzWO-Gg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to