This commit is contained in:
Hyatt 2024-11-11 00:34:21 -06:00
parent c9bf1062fc
commit cc3fe7c77f
Signed by: nhyatt
GPG Key ID: C50D0BBB5BC40BEA

View File

@ -52,15 +52,17 @@ ENTRYPOINT [ "/bin/bash", "-c", "/usr/local/bin/darkice" ]
stage ('Build & Push') { stage ('Build & Push') {
steps { steps {
container ('kaniko') { container ('kaniko') {
def ws = pwd() script {
writeFile (file: ws + "/Dockerfile", text: config.dockerFile) def ws = pwd()
withCredentials([usernameColonPassword( writeFile (file: ws + "/Dockerfile", text: config.dockerFile)
credentialsId: config.repoCreds, withCredentials([usernameColonPassword(
variable: "dCreds" 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 "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\""
} }
} }
} }