This is an automated email from the ASF dual-hosted git repository.

ricardozanini pushed a commit to branch main
in repository 
https://gitbox.apache.org/repos/asf/incubator-kie-kogito-serverless-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new 1315d323 :door: Use random port for local registry (#303)
1315d323 is described below

commit 1315d323a2f71c77bf1f1e42f0357fc39c639cb1
Author: Ricardo Zanini <[email protected]>
AuthorDate: Fri Nov 10 15:36:50 2023 -0300

    :door: Use random port for local registry (#303)
    
    Signed-off-by: Ricardo Zanini <[email protected]>
---
 .ci/jenkins/Jenkinsfile.deploy | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/.ci/jenkins/Jenkinsfile.deploy b/.ci/jenkins/Jenkinsfile.deploy
index 0f055e4a..2c099234 100644
--- a/.ci/jenkins/Jenkinsfile.deploy
+++ b/.ci/jenkins/Jenkinsfile.deploy
@@ -4,6 +4,8 @@ helper = null
 
 commitDone = false
 
+def localRegistryUrl = '';
+
 pipeline {
     agent {
         docker { 
@@ -52,10 +54,11 @@ pipeline {
                     helper.loginRegistry()
 
                     // Prepare for multiplatform build
-                    String localRegistry = cloud.startLocalRegistry()
+                    int freePort = cloud.findFreePort()
+                    String localRegistryUrl = 
cloud.startLocalRegistry(freePort)
 
                     // TODO docker buildx could be preinstalled onto the 
docker image
-                    
cloud.prepareForDockerMultiplatformBuild([localRegistry],[cloud.getDockerIOMirrorRegistryConfig()],
 false)
+                    
cloud.prepareForDockerMultiplatformBuild([localRegistryUrl],[cloud.getDockerIOMirrorRegistryConfig()],
 false)
                     cloud.installSkopeo()
                 }
             }
@@ -261,7 +264,7 @@ String getBuiltImage() {
 }
 
 String getTempBuiltImageTag() {
-    return "localhost:5000/kogito-serverless-operator:${getOperatorVersion()}"
+    return 
"${localRegistryUrl}/kogito-serverless-operator:${getOperatorVersion()}"
 }
 
 void runPythonCommand(String cmd, boolean stdout = false) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to