manual kaniko
This commit is contained in:
parent
e1afb91328
commit
c9bf1062fc
@ -52,23 +52,15 @@ ENTRYPOINT [ "/bin/bash", "-c", "/usr/local/bin/darkice" ]
|
|||||||
stage ('Build & Push') {
|
stage ('Build & Push') {
|
||||||
steps {
|
steps {
|
||||||
container ('kaniko') {
|
container ('kaniko') {
|
||||||
script {
|
def ws = pwd()
|
||||||
declarativeFunctions.buildContainerMultipleDestinations(
|
writeFile (file: ws + "/Dockerfile", text: config.dockerFile)
|
||||||
dockerFile: dockerFile,
|
withCredentials([usernameColonPassword(
|
||||||
repositoryAccess: [
|
credentialsId: config.repoCreds,
|
||||||
[
|
variable: "dCreds"
|
||||||
repository: repository,
|
)]) {
|
||||||
credentials: repositoryCreds
|
sh "set +x; printf '{\"auths\":{\"%s\":{\"auth\": \"%s\"}}}' \"registry.c.test-chamber-13.lan\" \"${dcreds.bytes.encodeBase64().toString()}\" > /kaniko/.docker/config.json"
|
||||||
],
|
|
||||||
],
|
|
||||||
destination: [
|
|
||||||
"${repository}/library/darkice:latest",
|
|
||||||
],
|
|
||||||
buildArg: [
|
|
||||||
"--custom-platform=linux/arm/v8",
|
|
||||||
]
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
sh "/kaniko/executor --force --context \"${workspace}\" -f \"${workspace}/Dockerfile\" --destination \"registry.c.test-chamber-133.lan/library/darkice:latest\" --custom-platform \"linux/arm/v8\""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user