From cc3fe7c77f34d9530beb48288b1bf91484141a17 Mon Sep 17 00:00:00 2001 From: nhyatt Date: Mon, 11 Nov 2024 00:34:21 -0600 Subject: [PATCH] step? --- build-darkice.jenkins | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/build-darkice.jenkins b/build-darkice.jenkins index dc26afa..ecfc6f8 100644 --- a/build-darkice.jenkins +++ b/build-darkice.jenkins @@ -52,15 +52,17 @@ ENTRYPOINT [ "/bin/bash", "-c", "/usr/local/bin/darkice" ] stage ('Build & Push') { steps { container ('kaniko') { - 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" + script { + 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\"" } - sh "/kaniko/executor --force --context \"${workspace}\" -f \"${workspace}/Dockerfile\" --destination \"registry.c.test-chamber-133.lan/library/darkice:latest\" --custom-platform \"linux/arm/v8\"" } } }