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