Jenkins and plugins versions report
Environment
Jenkins: 2.555.1
OS: Linux - 5.14.0-611.41.1.el9_7.x86_64
Java: 21.0.10 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)
---
antisamy-markup-formatter:173.v680e3a_b_69ff3
apache-httpcomponents-client-4-api:4.5.14-269.vfa_2321039a_83
asm-api:9.9.1-189.vb_5ef2964da_91
authentication-tokens:1.144.v5ff4a_5ec5c33
bootstrap5-api:5.3.8-1024.v127320880c60
bouncycastle-api:2.30.1.84-291.v9f17b_21896e2
branch-api:2.1280.v0d4e5b_b_460ef
caffeine-api:3.2.3-194.v31a_b_f7a_b_5a_81
checks-api:402.vca_263b_f200e3
cloudbees-folder:6.1100.ve9eed61d16c4
commons-lang3-api:3.20.0-109.ve43756e2d2b_4
commons-text-api:1.15.0-218.va_61573470393
configuration-as-code:2074.va_57f83f7a_10b_
credentials:1502.v5c95e620ddfe
credentials-binding:719.v80e905ef14eb_
display-url-api:2.217.va_6b_de84cc74b_
durable-task:664.v2b_e7a_dfff66c
echarts-api:6.0.0-1281.vd3d21a_1ca_cb_4
email-ext:1933.v45cec755423f
font-awesome-api:7.2.0-983.v3f63c34eddb_9
git:5.10.1
git-client:6.6.0
github:1.46.0
github-api:1.330-492.v3941a_032db_2a_
github-branch-source:1967.vdea_d580c1a_b_a_
gson-api:2.14.0-201.v8eefe5515533
instance-identity:203.v15e81a_1b_7a_38
ionicons-api:94.vcc3065403257
jackson-annotations2-api:2.21-7.v4777a_f3a_a_d47
jackson2-api:2.21.2-436.v29efdb_7418ff
jackson3-api:3.1.2-73.v3e5485d8b_148
jakarta-activation-api:2.1.4-1
jakarta-mail-api:2.1.5-1
jakarta-xml-bind-api:4.0.6-12.vb_1833c1231d3
javax-activation-api:1.2.0-8
jaxb:2.3.9-143.v5979df3304e6
jjwt-api:0.13.0-141.vd58b_a_9592b_6c
joda-time-api:2.14.1-187.vdf2def02b_8a_1
jquery3-api:3.7.1-682.vfa_cdce169929
json-api:20251224-185.v0cc18490c62c
json-path-api:3.0.0-218.vcd4dd1355de2
jsoup:1.22.2-95.vc5d00f1eb_42d
junit:1403.vd9d1413fd205
kubernetes:4423.vb_59f230b_ce53
kubernetes-client-api:7.3.1-256.v788a_0b_787114
kubernetes-credentials:207.v492f58828b_ed
mailer:534.v1b_36f5864073
matrix-auth:3.2.9
metrics:4.2.37-494.v06f9a_939d33a_
mina-sshd-api-common:2.16.0-167.va_269f38cc024
mina-sshd-api-core:2.16.0-167.va_269f38cc024
oic-auth:4.681.v2c81b_d60dfdc
okhttp-api:5.3.2-200.vedb_720a_cf1f8
pipeline-build-step:584.vdb_a_2cc3a_d07a_
pipeline-graph-analysis:254.v0f63a_a_447dca_
pipeline-graph-view:871.vd450b_6eb_d1e1
pipeline-groovy-lib:797.v90ea_a_9b_e45a_0
pipeline-input-step:551.vdff487c5998c
pipeline-milestone-step:152.v6e22b_8cfc66c
pipeline-model-api:2.2277.v00573e73ddf1
pipeline-model-definition:2.2277.v00573e73ddf1
pipeline-model-extensions:2.2277.v00573e73ddf1
pipeline-rest-api:2.41
pipeline-stage-step:345.va_96187909426
pipeline-stage-tags-metadata:2.2277.v00573e73ddf1
pipeline-stage-view:2.41
plain-credentials:199.v9f8e1f741799
plugin-util-api:7.1330.v47b_46ee2047a_
prism-api:1.30.0-723.v97277866cece
scm-api:728.vc30dcf7a_0df5
script-security:1399.ve6a_66547f6e1
snakeyaml-api:2.5-149.v72471e9c6371
snakeyaml-engine-api:3.0.1-5.vd98ea_ff3b_92e
ssh-credentials:372.va_250881b_08cd
structs:362.va_b_695ef4fdf9
token-macro:477.vd4f0dc3cb_cf1
variant:70.va_d9f17f859e0
woodstox-core-api:7.1.1-1.v4d297985f397
workflow-aggregator:608.v67378e9d3db_1
workflow-api:1413.v2ff1a_5e720fa_
workflow-basic-steps:1098.v808b_fd7f8cf4
workflow-cps:4303.v8fa_2a_581f0a_6
workflow-durable-task-step:1475.ved562f6ec8b_3
workflow-job:1571.vb_423c255d6d9
workflow-multibranch:821.vc3b_4ea_780798
workflow-scm-step:466.va_d69e602552b_
workflow-step-api:724.v538c2362b_dfb_
workflow-support:1015.v785e5a_b_b_8b_22
What Operating System are you using (both controller, and any agents involved in the problem)?
kubernetes jenkins-5.9.18 helm chart on linux
Reproduction steps
I have a pod tempalte defined which includes a container named main with image rockylinux:9 (helm chart values.yml):
additionalAgents:
default:
podName: default
additionalContainers:
- sideContainerName: main
image:
repository: rockylinux
tag: "9"
command: sleep
args: "99999"
This works fine, and can be used with inheritFrom (generated jcasc available if needed).
However, declaring this pipeline:
pipeline {
agent none
stages {
stage('test') {
agent {
kubernetes {
inheritFrom 'default'
/* this works correctly: */
containerTemplate {
name 'main'
image 'ubuntu:24.04'
}
/* this does not:
yaml '''
spec:
containers:
- name: main
image: ubuntu:24.04
'''
*/
defaultContainer 'main'
}
}
steps {
sh 'cat /etc/os-release'
}
}
}
}
Expected Results
The containerTemplate and yaml definitions seem identical, so should do the same thing.
Actual Results
When using containerTemplate above, you get the expected image, merged with the default template definition (i.e., ubuntu). However, when using the yaml it seems to be ignored, and you get only the default template image (rocky).
Anything else?
I've tried this with a variety of yamlMergeStrategy settings and combinations of other container parameters (command, args, etc.), but I can't get the yaml definition to do anything in any case.
I see a variety of other issues that seem similar, but wanted to spell out this case.
Are you interested in contributing a fix?
No response
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
kubernetes jenkins-5.9.18 helm chart on linux
Reproduction steps
I have a pod tempalte defined which includes a container named
mainwith imagerockylinux:9(helm chart values.yml):This works fine, and can be used with
inheritFrom(generated jcasc available if needed).However, declaring this pipeline:
Expected Results
The
containerTemplateandyamldefinitions seem identical, so should do the same thing.Actual Results
When using
containerTemplateabove, you get the expected image, merged with the default template definition (i.e., ubuntu). However, when using theyamlit seems to be ignored, and you get only the default template image (rocky).Anything else?
I've tried this with a variety of yamlMergeStrategy settings and combinations of other container parameters (command, args, etc.), but I can't get the yaml definition to do anything in any case.
I see a variety of other issues that seem similar, but wanted to spell out this case.
Are you interested in contributing a fix?
No response