remove signer from kaniko image

This commit is contained in:
Hyatt 2022-01-03 12:06:31 -06:00
parent ffb7b685ce
commit fb37a042f8
Signed by: nhyatt
GPG Key ID: C50D0BBB5BC40BEA

View File

@ -19,27 +19,11 @@ spec:
tty: true
command:
- /busybox/cat
- name: alpine
imagePullPolicy: Always
image: ${repository}/library/alpine:latest
tty: true
command:
- /bin/sh
""",
) {
node (label) {
def workspace = pwd()
stage ("Get CoSign") {
container ("alpine") {
sh """
apk add --no-cache curl jq
curl --silent --location "\$(curl --silent "https://api.github.com/repos/sigstore/cosign/releases/latest" | jq -r '.assets[0].browser_download_url')" --output "${workspace}/cosign"
chmod +x "${workspace}/cosign"
"""
}
}
stage ("Prepare Kaniko") {
container ("kaniko") {
withCredentials([usernameColonPassword(
@ -78,7 +62,6 @@ spec:
stage("Build Alpine with CA") {
container("kaniko") {
def DF = """FROM gcr.io/kaniko-project/executor:debug
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\""