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

kubernetes plugin Allow variables to be passed from Jenkinsfile to the pod template

XMLWordPrintable

      Hello,

      I would like to be able to pass variables declared in a Jenkinsfile to the pod template.

      Example: create an environment variable and use it in order to use the image tag that I want without creating multiple pod templates one for each version. It's not quite a template if I can't have some variables in it (other than the containers envVars)

       

      From the kubectl logs:

       Warning  InspectFailed          4s (x3 over 6s)  kubelet            Failed to apply default image tag "${DOCKER_REGISTRY}/jenkins/inbound-agent:${VARIABLE}": couldn't parse image reference "${DOCKER_REGISTRY}/jenkins/inbound-agent:${VARIABLE}": invalid reference format
       Warning  FailedCreate           4s (x3 over 6s)  kubelet            Error: InvalidImageName

            Unassigned Unassigned
            screwyy Adrian Paraschiv
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: