-
New Feature
-
Resolution: Unresolved
-
Minor
-
Jenkins 2.426.1 LTS with the latest kubernetes plugin
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
[JENKINS-72569] kubernetes plugin Allow variables to be passed from Jenkinsfile to the pod template
Description |
Original:
Hello,
I would like to be able to pass variables declared in a Jenkinsfile to the pod template. Example: create an ENV 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) !image-2024-01-16-21-14-23-262.png! |
New:
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) !image-2024-01-16-21-14-23-262.png! |
Description |
Original:
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) !image-2024-01-16-21-14-23-262.png! |
New:
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) !image-2024-01-16-21-14-23-262.png! From the kubectl logs: {code:java} 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{code} |
Description |
Original:
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) !image-2024-01-16-21-14-23-262.png! From the kubectl logs: {code:java} 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{code} |
New:
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) !image-2024-01-16-21-14-23-262.png! From the kubectl logs: {code:java} 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{code} |