From 2a1fe3bab7b618276ad970bc257c094f39b4750b Mon Sep 17 00:00:00 2001 From: The_Spider Date: Tue, 25 May 2021 16:52:27 +0000 Subject: [PATCH] Update 'build-alpine.jenkins' --- build-alpine.jenkins | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/build-alpine.jenkins b/build-alpine.jenkins index 1755d98..7cb579f 100644 --- a/build-alpine.jenkins +++ b/build-alpine.jenkins @@ -46,8 +46,8 @@ spec: } } - stage("Build Latest Alpine with CA") { - container("kaniko") { + 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") { + stage("Build Edge Alpine with CA") { 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\""