another attempt at single-snapshot

This commit is contained in:
Hyatt 2022-01-03 11:57:57 -06:00
parent bf91217a89
commit ffb7b685ce
Signed by: nhyatt
GPG Key ID: C50D0BBB5BC40BEA

View File

@ -78,12 +78,12 @@ spec:
stage("Build Alpine with CA") {
container("kaniko") {
def DF = """FROM gcr.io/kaniko-project/executor:debug
COPY ./cosign /busybox/cosign
COPY ./cosign /usr/local/bin/cosign
COPY ./kaniko-chain.crt /kaniko/ssl/certs/ca-certificates.crt
"""
sh "cp /kaniko/ssl/certs/ca-certificates.crt \"${workspace}/kaniko-chain.crt\""
writeFile(file: workspace + "/Dockerfile", text: DF)
sh "/kaniko/executor --context \"${workspace}\" -f \"${workspace}/Dockerfile\" --destination \"${repository}/library/kaniko:latest\""
sh "/kaniko/executor --single-snapshot --context \"${workspace}\" -f \"${workspace}/Dockerfile\" --destination \"${repository}/library/kaniko:latest\""
}
}
}