From d278eedcbd03ebc2fc2e79c9f2b0844eb0acd357 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 18 Dec 2022 13:09:53 -0600 Subject: [PATCH] ci: Publish container image to Gitea The Docker Distribution image resitry is no more. --- ci/Jenkinsfile | 7 ++++++- ci/publish-container.sh | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile index 9a63219..532d510 100644 --- a/ci/Jenkinsfile +++ b/ci/Jenkinsfile @@ -63,7 +63,12 @@ pipeline { stage('Publish Container') { steps { container('podman') { - sh '. ci/publish-container.sh' + withCredentials([usernameColonPassword( + credentialsId: 'jenkins-packages', + variable: 'PODMAN_AUTH', + )]) { + sh '. ci/publish-container.sh' + } } } } diff --git a/ci/publish-container.sh b/ci/publish-container.sh index 0ac28e3..2f1ad6b 100644 --- a/ci/publish-container.sh +++ b/ci/publish-container.sh @@ -4,7 +4,10 @@ push() { tag=$(tag_name "$1") - podman push hudctrl:$(tag_name ${BUILD_TAG}) registry.pyrocufflink.blue/hudctrl:${tag} + podman push \ + --creds="${PODMAN_AUTH}" \ + hudctrl:$(tag_name ${BUILD_TAG}) \ + git.pyrocufflink.blue/containerimages/hudctrl:${tag} } push ${BUILD_TAG}