Skip to content

Commit

Permalink
In case of installation failed, then try it one more time.
Browse files Browse the repository at this point in the history
Mostlyl it could be caused by OpenShift error like:
* Operation cannot be fulfilled on clusterresourcequotas.quota.openshift.io
"core-services-ocp--general": the object has been modified;
please apply your changes to the latest version and try again

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
  • Loading branch information
phracek committed Nov 27, 2024
1 parent 32df07c commit ddcc476
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions container_ci_suite/helm.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,20 @@ def helm_installation(self, values: Dict = None):
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')}"
json_output = self.get_helm_json_output(
f"install {self.package_name} {self.get_full_tarball_path} {command_values}"
)
install_success: bool = False
json_output: Dict = {}
for count in range(3):
json_output = self.get_helm_json_output(
f"install {self.package_name} {self.get_full_tarball_path} {command_values}"
)
print(f"Output from installation '{json_output}'.")
if json_output:
install_success = True
break
time.sleep(3)
# Let's wait couple seconds, till it is not really imported
time.sleep(3)
if not json_output:
if not install_success:
return False
assert json_output["name"] == self.package_name
assert json_output["chart"]["metadata"]["version"] == self.version
Expand Down

0 comments on commit ddcc476

Please sign in to comment.