← azuredeploy

Pipeline

a38c24857a1db36f61150c04aae66f8b5354b89e · ovidiucs · Mar 15, 2024 17:45

+10 −1 · 1 file changed

  • jenkins/Jenkinsfile +10 −1
diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile
index 9325a4b..8f58aa7 100644
--- a/jenkins/Jenkinsfile
+++ b/jenkins/Jenkinsfile
@@ -17,7 +17,16 @@ pipeline {
                 checkout scm
             }
         }
-        
+        stage('Prepare') {
+            steps {
+                script {
+                    // Retrieve and set the Docker registry URL from Jenkins credentials
+                    withCredentials([string(credentialsId: 'dockerRegistryUrl', variable: 'REGISTRY_URL')]) {
+                        env.DOCKER_REGISTRY_URL = "${REGISTRY_URL}"
+                    }
+                }
+            }
+        }
          stage('Build Docker Image') {
             steps {
                 script {