Update 'build-alpine.jenkins'

This commit is contained in:
Hyatt 2021-05-25 16:52:27 +00:00
parent 74d34c0d1a
commit 2a1fe3bab7

View File

@ -46,8 +46,8 @@ spec:
}
}
stage("Build Latest Alpine with CA") {
container("kaniko") {
stage("Build Latest Alpine with CA") {
def DF = """FROM ${repository}/dockerhub/library/alpine:latest
RUN apk add --no-cache --virtual=.packagecache ca-certificates && \\
@ -71,10 +71,8 @@ RUN apk add --no-cache --virtual=.packagecache ca-certificates && \\
writeFile(file: workspace + "/Dockerfile", text: DF)
sh "/kaniko/executor --cleanup --context \"${workspace}\" -f \"${workspace}/Dockerfile\" --destination \"${repository}/library/alpine:latest\""
}
}
stage("Build Edge Alpine with CA") {
container("kaniko") {
def DF = """FROM ${repository}/dockerhub/library/alpine:edge
RUN apk add --no-cache --virtual=.packagecache ca-certificates && \\
@ -93,7 +91,8 @@ RUN apk add --no-cache --virtual=.packagecache ca-certificates && \\
"UOemMEg3PjcKNsN65W2WVon5HIZx2XVfGRPjf5ZTVWzZ" \\
"-----END CERTIFICATE-----" > /usr/local/share/ca-certificates/test-chamber-13.lan.root.crt && \\
update-ca-certificates --fresh && \\
apk del .packagecache
apk del .packagecache && \\
sed -i -e 's/v[[:digit:]]\\..*\\//edge\\//g' /etc/apk/repositories
"""
writeFile(file: workspace + "/Dockerfile", text: DF)
sh "/kaniko/executor --cleanup --context \"${workspace}\" -f \"${workspace}/Dockerfile\" --destination \"${repository}/library/alpine:edge\""