title: Jenkinsfile pipeline syntax to insert list environment variable
body: <p>I am having hard to trying to figure out how to add envVars to kubernet inside Jenkinsfile.</p>
  
  <p>I am pretty sure the issue is in my syntax because I am getting following error</p>
  
  <pre><code>ava.lang.ClassCastException: class org.csanchez.jenkins.plugins.kubernetes.
  ContainerTemplate.setEnvVars() expects java.util.List&lt;org.csanchez.jenkins.plugins.kubernetes.model.TemplateEnvVar
  &gt; but received class java.lang.String
  </code></pre>
  
  <p>when I have it coded this way </p>
  
  <pre><code>stage("build") {
                  agent {
                      kubernetes {
                          label 'kubernetes'
                          containerTemplate {
                              name 'jnlp'
                              image 'ubuntu:last'
                              ttyEnabled true
                              label 'label'
                              envVars '
                                 envVar(key: "filePath", value: "/home/abcde/abc" )'
                          }  
                      }
                  }
  </code></pre>
  
  <p>Can you guys please point me to right direction? How do I define list variable in Jenkinsfile?</p>
  
  <p><strong>My Jenkinsfile setup</strong></p>
  
  <pre><code>pipeline {
  agent any
  parameters {
      string(name: 'Abc', defaultValue: 'origin', description: 'test project')
  }
  options {
      timestamps()
      timeout(60)
  }
  stages {
      stage('Build') {
          parallel {
              stage("build") {
                  agent {
                      kubernetes {
                          label 'kubernetes'
                          containerTemplate {
                              name 'jnlp'
                              image 'ubuntu:latest'
                              ttyEnabled true
                              label 'label'
                              envVars 'envVar(key: "filePath", value: "/home/abcde/abc" )'
                          }
                      }
                  }
                  steps {
                      container('jnlp') {
                          timeout(60) {
                              // build process
                          }
                      }
                  }
              }
          }
      }
  }
  post {
      success {
          sh "success"
      }
      failure {
          sh "failed"
      }
      unstable {
          sh "unsable"
      }
    } 
  }
  </code></pre>
  
  <p>With above code, I will get following error</p>
  
  <pre><code>ava.lang.ClassCastException: class org.csanchez.jenkins.plugins.kubernetes.
  ContainerTemplate.setEnvVars() expects java.util.List&lt;org.csanchez.jenkins.plugins.kubernetes.model.TemplateEnvVar
  &gt; but received class java.lang.String
  </code></pre>