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

kubernetes-cli-plugin configure does not interpolate build/environment variables

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • kubernetes-cli-plugin
    • None
    • kubernetes-cli-1.5.0 , jenkins 2.150.2 , kubectl 1.13

      For a non-pipeline job, if I setup the build environment and try to set the Kubernetes server endpoint to an environment/build variable, e.g. either $K8S_URL or ${K8S_URL} , it is not interpolated and results in these failures, respectively:

       

      Unable to connect to the server: dial tcp: lookup $K8S_URL: no such host

      Unable to connect to the server: invalid character "{" in host name

       

      For a pipeline job, I can just use env.K8S_URL and it works perfectly. Some of our job's steps do not support pipeline, and with multiple kubernetes clusters it would be very useful to have this functionality in a Freestyle job.

            max_laverse Max Laverse
            benfiedler Ben Fiedler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: