diff --git a/container_ci_suite/helm.py b/container_ci_suite/helm.py index bd50f1b..87c8b78 100644 --- a/container_ci_suite/helm.py +++ b/container_ci_suite/helm.py @@ -220,9 +220,6 @@ def helm_installation(self, values: Dict = None): command_values = ' '.join( [f"--set {key}={value}" for key, value in utils.shared_cluster_variables().items()] ) - if "name" in values: - date_string = utils.get_datetime_string() - values["name"] = self.get_name_from_values_yaml() + f"-{date_string}" command_values += " " + ' '.join([f"--set {key}={value}" for key, value in values.items()]) if self.is_pvc_in_values_yaml(): command_values += f" --set pvc.netapp_nfs=true --set pvc.app_code={utils.get_shared_variable('app_code')}" diff --git a/container_ci_suite/openshift.py b/container_ci_suite/openshift.py index 35813ba..38a9fc6 100644 --- a/container_ci_suite/openshift.py +++ b/container_ci_suite/openshift.py @@ -202,16 +202,16 @@ def login_to_shared_cluster(self): @staticmethod def login_external_registry() -> Any: - registry_url = utils.get_shared_variable("internal_image_registry") - robot_token = utils.get_shared_variable("robot_account") - robot_name = utils.load_shared_credentials("ROBOT_NAME") + registry_url = utils.get_shared_variable("registry_url") + robot_token = utils.load_shared_credentials("ROBOT_TOKEN") + robot_name = utils.get_shared_variable("robot_account") if not all([registry_url, robot_token, robot_name]): print( "Important variable ROBOT_TOKEN or variables in file /root/shared_cluster" - " 'internal_image_registry,robot_account' are missing." + " 'registry_url,robot_account' are missing." ) return None - cmd = f"podman login -u {robot_name} -p {robot_token} {registry_url}" + cmd = f"podman login -u \"{robot_name}\" -p \"{robot_token}\" {registry_url}" output = utils.run_command( cmd=cmd, ignore_error=False, diff --git a/container_ci_suite/openshift_ops.py b/container_ci_suite/openshift_ops.py index bad894b..99528f7 100644 --- a/container_ci_suite/openshift_ops.py +++ b/container_ci_suite/openshift_ops.py @@ -118,9 +118,9 @@ def is_pod_running(self, pod_name_prefix: str = "", loops: int = 180) -> bool: output = self.get_logs(pod_name=pod_name) print(output) # Wait couple seconds for sure - time.sleep(1) + time.sleep(3) return True - time.sleep(1) + time.sleep(3) return False def is_build_pod_present(self) -> bool: @@ -174,7 +174,7 @@ def is_build_pod_finished(self, cycle_count: int = 180) -> bool: print(".", sep="", end="") if self.build_failed: return False - time.sleep(1) + time.sleep(3) continue print("\nBuild pod is finished") return True @@ -194,7 +194,7 @@ def is_s2i_pod_running(self, pod_name_prefix: str = "", cycle_count: int = 180) time.sleep(1) continue if not self.is_pod_finished(pod_suffix_name="build"): - time.sleep(1) + time.sleep(3) continue build_pod_finished = True print(f"\nBuild pod with name {pod_name_prefix} is finished.") @@ -206,7 +206,7 @@ def is_s2i_pod_running(self, pod_name_prefix: str = "", cycle_count: int = 180) for count in range(cycle_count): print(".", sep="", end="") if not self.is_pod_running(): - time.sleep(1) + time.sleep(3) continue print("\nPod is running") return True diff --git a/container_ci_suite/utils.py b/container_ci_suite/utils.py index 20cfe42..0ac648b 100644 --- a/container_ci_suite/utils.py +++ b/container_ci_suite/utils.py @@ -468,7 +468,8 @@ def shared_cluster_variables() -> dict: shared_cluster_data = { "registry.enabled": "true", "registry.name": get_shared_variable("registry_url"), - "registry.namespace": "core-services-ocp" + "registry.namespace": "core-services-ocp", + "registry.push_secret": get_shared_variable("push_secret"), } return shared_cluster_data