removes cosign, not harbor compatable, may need to use did to sign images
This commit is contained in:
parent
f62c2ef712
commit
ea4117c1de
@ -21,10 +21,6 @@ spec:
|
|||||||
tty: true
|
tty: true
|
||||||
command:
|
command:
|
||||||
- /busybox/sh
|
- /busybox/sh
|
||||||
- name: alpine
|
|
||||||
imagePullPolicy: Always
|
|
||||||
image: ${repository}/library/alpine:latest
|
|
||||||
tty: true
|
|
||||||
""",
|
""",
|
||||||
) {
|
) {
|
||||||
node (label) {
|
node (label) {
|
||||||
@ -78,25 +74,11 @@ spec:
|
|||||||
stage("Build Alpine with CA") {
|
stage("Build Alpine with CA") {
|
||||||
container("kaniko") {
|
container("kaniko") {
|
||||||
def DF = """FROM ${repository}/google/kaniko-project/executor:debug
|
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
|
COPY ./kaniko-chain.crt /kaniko/ssl/certs/ca-certificates.crt
|
||||||
"""
|
"""
|
||||||
sh "cp /kaniko/ssl/certs/ca-certificates.crt \"${workspace}/kaniko-chain.crt\""
|
sh "cp /kaniko/ssl/certs/ca-certificates.crt \"${workspace}/kaniko-chain.crt\""
|
||||||
writeFile(file: workspace + "/Dockerfile", text: DF)
|
writeFile(file: workspace + "/Dockerfile", text: DF)
|
||||||
sh "/kaniko/executor --context \"${workspace}\" -f \"${workspace}/Dockerfile\" --destination \"${repository}/library/kaniko:latest\""
|
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\""
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user