manual kaniko

This commit is contained in:
Hyatt 2024-11-11 00:30:48 -06:00
parent e1afb91328
commit c9bf1062fc
Signed by: nhyatt
GPG Key ID: C50D0BBB5BC40BEA

View File

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