This commit is contained in:
Hyatt 2022-04-01 17:40:07 -05:00
parent a87ae0d476
commit 67e12befd0
Signed by: nhyatt
GPG Key ID: C50D0BBB5BC40BEA

View File

@ -34,18 +34,19 @@ pipeline {
} }
} }
for (rhOS in ubiOS) { stage ('Build Images') {
for (image in ubiImages) { steps {
stage ("Build ubi${rhOS}:${image}") { for (rhOS in ubiOS) {
steps { for (image in ubiImages) {
script { stage ("Build ubi${rhOS}:${image}") {
def updateCmd script {
if (image == "ubi-minimal") { def updateCmd
updateCmd = "microdnf" if (image == "ubi-minimal") {
} else { updateCmd = "microdnf"
updateCmd = "dnf" } else {
} updateCmd = "dnf"
dockerFile = """FROM registry.access.redhat.com/ubi${rhOS}/${image}:latest }
dockerFile = """FROM registry.access.redhat.com/ubi${rhOS}/${image}:latest
LABEL org.opencontainers.image.authors="The_Spider <spider@smoothnet.org>" LABEL org.opencontainers.image.authors="The_Spider <spider@smoothnet.org>"
LABEL org.opencontainers.image.title="ubi${rhOS}/${image}" LABEL org.opencontainers.image.title="ubi${rhOS}/${image}"
@ -58,19 +59,20 @@ RUN update-ca-trust extract && \\
${updateCmd} update -y && \\ ${updateCmd} update -y && \\
${updateCmd} clean all ${updateCmd} clean all
""" """
container ("kaniko") { container ("kaniko") {
declarativeFunctions.buildContainerMultipleDestinations( declarativeFunctions.buildContainerMultipleDestinations(
dockerFile: dockerFile, dockerFile: dockerFile,
repositoryAccess: [ repositoryAccess: [
[ [
repository: repository, repository: repository,
credentials: repositoryCreds credentials: repositoryCreds
],
], ],
], destination: [
destination: [ "${repository}/library/rhubi/${image}:${rhOS}",
"${repository}/library/rhubi/${image}:${rhOS}", ]
] )
) }
} }
} }
} }