diff --git a/build-kaniko.jenkins b/build-kaniko.jenkins index 2d6ee94..e38d5c5 100644 --- a/build-kaniko.jenkins +++ b/build-kaniko.jenkins @@ -21,10 +21,6 @@ spec: tty: true command: - /busybox/sh - - name: alpine - imagePullPolicy: Always - image: ${repository}/library/alpine:latest - tty: true """, ) { node (label) { @@ -78,25 +74,11 @@ spec: stage("Build Alpine with CA") { container("kaniko") { def DF = """FROM ${repository}/google/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\"" writeFile(file: workspace + "/Dockerfile", text: DF) sh "/kaniko/executor --context \"${workspace}\" -f \"${workspace}/Dockerfile\" --destination \"${repository}/library/kaniko:latest\"" - - withCredentials([ - string( - credentialsId: dockerKeyPass, - variable: "signPass" - ), - file( - credentialsId: dockerKey, - variable: "signKey" - ) - ]) { - sh "COSIGN_PASSWORD=\"${signPass}\" \"${workspace}/cosign\" sign --key \"${signKey}\" \"${repository}/library/kaniko:latest\"" - } } } }