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}'
        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}'
          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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/c98259fd-1aa4-40a1-890d-cb157cf3bf5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to