From 316a16b1247e76629085b70201a1d2e29f366e1e Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Thu, 25 Sep 2025 19:04:42 -0500 Subject: [PATCH] fixup! bci2: Add resources argument --- vars/buildContainerImage2.groovy | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/vars/buildContainerImage2.groovy b/vars/buildContainerImage2.groovy index e67c509..71c8a03 100644 --- a/vars/buildContainerImage2.groovy +++ b/vars/buildContainerImage2.groovy @@ -116,11 +116,10 @@ def runInPod(args, block) { def podTemplateYaml = libraryResource('podTemplate2.yaml') if (resources) { def tmpl = readYaml(text: podTemplateYaml) - tmpl.spec.containers.each { - it.resources = [ - requests: resources, - limits: resources, - ] + tmpl.spec.containers.each { c -> + c.resources = c.resources ?: [requests: [:], limits: [:]] + c.resources.requests += resources + c.resources.limits += resources } podTemplateYaml = writeYaml(data: tmpl, returnText: true) echo podTemplateYaml