From df34ebbc1f847af4ff002251f812be465989e502 Mon Sep 17 00:00:00 2001 From: myrmidex Date: Sun, 13 Jul 2025 21:55:03 +0200 Subject: [PATCH] Debug Jenkins --- Jenkinsfile | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 742ae93..c52438a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,7 @@ pipeline { environment { REGISTRY = 'codeberg.org' IMAGE_NAME = "${REGISTRY}/lvl0/incr" - DOCKER_CREDENTIALS_ID = 'codeberg-registry' // Jenkins credential ID + DOCKER_CREDENTIALS_ID = 'codeberg-registry' // Jenkins credentials ID } stages { @@ -34,4 +34,19 @@ pipeline { stage('Push to Registry') { steps { echo "📤 Pushing Docker image: ${IMAGE_NAME}:${GIT_TAG}" - withCredentials([usernamePassword(credentialsId: "${DOCKER_CREDENTIALS_ID}", usernam]() + withCredentials([ + usernamePassword( + credentialsId: DOCKER_CREDENTIALS_ID, + usernameVariable: 'USERNAME', + passwordVariable: 'PASSWORD' + ) + ]) { + sh """ + echo "${PASSWORD}" | docker login ${REGISTRY} -u "${USERNAME}" --password-stdin + docker push ${IMAGE_NAME}:${GIT_TAG} + """ + } + } + } + } +}