corrects variable scope.

This commit is contained in:
Hyatt 2021-06-07 21:11:34 -05:00
parent 4c2cbe560d
commit 6486fcb46c

View File

@ -53,10 +53,11 @@ spec:
for (image in ubiImages) { for (image in ubiImages) {
container("kaniko") { container("kaniko") {
stage ("Build " + image + ":" + rhOS) { stage ("Build " + image + ":" + rhOS) {
def updateCmd
if (image == "ubi-minimal") { if (image == "ubi-minimal") {
def updateCmd = "microdnf" updateCmd = "microdnf"
} else { } else {
def updateCmd = "dnf" updateCmd = "dnf"
} }
def DF = """FROM registry.access.redhat.com/ubi${rhOS}/${image}:latest def DF = """FROM registry.access.redhat.com/ubi${rhOS}/${image}:latest