https://github.com/jenkinsci/kubernetes-plugin/blob/master/README.md#declarative-pipeline

Note that it was previously possible to define containerTemplate but that
has been deprecated in favor of the yaml format.

containerTemplates also works but yaml syntax is preferred



On Sat, Sep 8, 2018 at 12:56 AM Matt Buckland <m...@fascinatedcow.net>
wrote:

> Hello list,
>
> I'm running jenkins inside k8s:
> jenkins/jenkins:lts
> jenkins/jnlp-slave:3.23-1
> kubernetes-plugin: 1.12.4
>
> I'm using the following to define my agent:
>
>   agent {
>     kubernetes {
>       label "${JOB_NAME}"
>       inheritFrom 'default'
>       containerTemplate {
>         name 'jnlp'
>         image '${ACCOUNT_ID}.dkr.ecr.${REGION}.
> amazonaws.com/jenkins/jnlp-slave:${AGENT_IMAGE_TAG}
> <http://amazonaws.com/jenkins/jnlp-slave:$%7BAGENT_IMAGE_TAG%7D>'
>         resourceRequestCpu '200m'
>         resourceLimitCpu '1'
>         resourceRequestMemory '256Mi'
>         resourceLimitMemory '1Gi'
>       }
>
>
>
> In the logs I have this message:
>
> Sep 07, 2018 5:11:34 PM
> org.csanchez.jenkins.plugins.kubernetes.pipeline.KubernetesDeclarativeAgent
> getAsArgs
> WARNING: containerTemplate option in declarative pipeline is deprecated,
> use containerTemplates
>
>
> I've not been able to find any documentation or examples showing how to
> use this containerTemplates option (note the "s" on the end). I've tried
> things such as:
>
>       containerTemplates [
>         containerTemplate {
>           name 'jnlp'
>           image '${ACCOUNT_ID}.dkr.ecr.${REGION}.
> amazonaws.com/jenkins/jnlp-slave:${AGENT_IMAGE_TAG}
> <http://amazonaws.com/jenkins/jnlp-slave:$%7BAGENT_IMAGE_TAG%7D>'
>           resourceRequestCpu '200m'
>           resourceLimitCpu '1'
>           resourceRequestMemory '256Mi'
>           resourceLimitMemory '1Gi'
>         }
>       ]
>
>
> and various other combinations, but I can't get it to work.
>
> Anyone have any suggestions?
>
> Many thanks,
>
> Matt
>
> --
> 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 jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/c98259fd-1aa4-40a1-890d-cb157cf3bf5b%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/c98259fd-1aa4-40a1-890d-cb157cf3bf5b%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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CALHFn6MkJMQsSudHjs55zADR%2BQWhJT_HCqZM_RBGKaDrScUmfQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to