Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-41702

Example on github is incorrect

XMLWordPrintable

      The example given on https://github.com/jenkinsci/kubernetes-pipeline-plugin/blob/master/kubernetes-steps/readme.md (see below) is incorrect and results in an error.

      kubernetes.pod('buildpod')
          .withNewContainer().withName(<name1>).withImage(<image1>)
                             .withEnv(<key1>,<value1>) //incorrect
                             .withSecret(<mount path>, <secret name>)  //incorrect
                             .and()
          .withNewContainer().withName(<name2>).withImage(<image2>).inside {                       
              sh '<some shell commands that are going to be run inside name2>'
      }
      

      Error

      hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: static io.fabric8.kubernetes.pipeline.Kubernetes.withEnv() is applicable for argument types: (java.lang.String, java.lang.String) 
      

      More info is on https://github.com/fabric8io/fabric8-pipeline-library/issues/69

            iocanel Ioannis Canellos
            anton93 Anton Hughes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: