fixup! bci2: Add resources argument

Dustin 2025-09-25 19:04:42 -05:00
parent 3f09e3a3b3
commit 316a16b124
1 changed files with 4 additions and 5 deletions

View File

@ -116,11 +116,10 @@ def runInPod(args, block) {
def podTemplateYaml = libraryResource('podTemplate2.yaml') def podTemplateYaml = libraryResource('podTemplate2.yaml')
if (resources) { if (resources) {
def tmpl = readYaml(text: podTemplateYaml) def tmpl = readYaml(text: podTemplateYaml)
tmpl.spec.containers.each { tmpl.spec.containers.each { c ->
it.resources = [ c.resources = c.resources ?: [requests: [:], limits: [:]]
requests: resources, c.resources.requests += resources
limits: resources, c.resources.limits += resources
]
} }
podTemplateYaml = writeYaml(data: tmpl, returnText: true) podTemplateYaml = writeYaml(data: tmpl, returnText: true)
echo podTemplateYaml echo podTemplateYaml