You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by js...@apache.org on 2023/11/10 09:29:29 UTC

(incubator-kie-kogito-images) branch radtriste-fix-pipelines updated: hold localRegistryUrl after startup

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

jstastnycz pushed a commit to branch radtriste-fix-pipelines
in repository https://gitbox.apache.org/repos/asf/incubator-kie-kogito-images.git


The following commit(s) were added to refs/heads/radtriste-fix-pipelines by this push:
     new 6ce5cd3f hold localRegistryUrl after startup
6ce5cd3f is described below

commit 6ce5cd3f283f5729c6c373ab8c1e7d5623919f1f
Author: jstastny-cz <ja...@ibm.com>
AuthorDate: Fri Nov 10 10:28:59 2023 +0100

    hold localRegistryUrl after startup
---
 .ci/jenkins/Jenkinsfile.build-image | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/.ci/jenkins/Jenkinsfile.build-image b/.ci/jenkins/Jenkinsfile.build-image
index 367902d5..676843c4 100644
--- a/.ci/jenkins/Jenkinsfile.build-image
+++ b/.ci/jenkins/Jenkinsfile.build-image
@@ -2,6 +2,8 @@
 
 QUAY_REGISTRY = 'quay.io'
 
+def localRegistryUrl = '';
+
 pipeline {
     agent {
         docker { 
@@ -96,8 +98,8 @@ pipeline {
                     updateGithubCommitStatus('PENDING', 'Build in progress')
 
                     int freePort = cloud.findFreePort()
-                    String localRegistry = cloud.startLocalRegistry(freePort)
-                    cloud.prepareForDockerMultiplatformBuild([localRegistry],[cloud.getDockerIOMirrorRegistryConfig()], false)
+                    localRegistryUrl = cloud.startLocalRegistry(freePort)
+                    cloud.prepareForDockerMultiplatformBuild([localRegistryUrl],[cloud.getDockerIOMirrorRegistryConfig()], false)
 
                     // Generate the Dockerfile
                     runPythonCommand("make build-image ${getMakeBuildImageArgs()} image_name=${getBuildImageName()} ignore_test=true ignore_tag=true build_options='--dry-run'")
@@ -224,7 +226,7 @@ String getBuiltImageTag(String imageTag = '') {
     if (shouldDeployImage()) {
         return "${getDeployImageRegistry()}/${getDeployImageNamespace()}/${getFinalImageName()}:${imageTag ?: getDeployImageTag()}"
     } else {
-        return "localhost:5000/${getBuildImageName()}:${githubscm.getCommitHash()}"
+        return "${localRegistryUrl}/${getBuildImageName()}:${githubscm.getCommitHash()}"
     }
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org