Merge "[GENERAL] Add Andreas Geissler as committer."
[oom/offline-installer.git] / build / package.py
index 9e37d4b..3252faa 100755 (executable)
@@ -243,14 +243,18 @@ def build_offline_deliverables(build_version,
             if os.path.islink(file):
                 os.unlink(file)
 
-        rke_files = glob.glob(os.path.join('.', '**/rke_linux-amd64'), recursive=True)
-        os.symlink(rke_files[0], os.path.join(download_dir_path, rke_files[0].split('/')[-1]))
-
-        helm_tar_files = glob.glob(os.path.join('.', '**/helm-*-linux-amd64.tar.gz'), recursive=True)
-        os.symlink(helm_tar_files[0], os.path.join(download_dir_path, helm_tar_files[0].split('/')[-1]))
-
-        kubectl_files = glob.glob(os.path.join('.', '**/kubectl'), recursive=True)
-        os.symlink(kubectl_files[0], os.path.join(download_dir_path, kubectl_files[0].split('/')[-1]))
+        bin_pattern_list = ['**/rke_linux-amd64',
+                            '**/helm-*-linux-amd64.tar.gz',
+                            '**/kubectl',
+                            '**/helm-push_*_linux_amd64.tar.gz',
+                            '**/kube-prometheus-stack-*.tgz',
+                            '**/cert-manager-*.tgz',
+                            '**/cmctl-linux-amd64.tar.gz',
+                            '**/strimzi-kafka-operator-helm-3-chart-*.tgz']
+
+        for pattern in bin_pattern_list:
+            for bin_file in glob.glob(os.path.join('.', pattern), recursive=True):
+                os.symlink(bin_file, os.path.join(download_dir_path, bin_file.split('/')[-1]))
 
         os.chdir(script_location)
         # End of workaround
@@ -263,7 +267,7 @@ def build_offline_deliverables(build_version,
         create_package(aux_content, aux_package_tar_path)
 
     add_checksum_info(output_dir)
-    shutil.rmtree(application_dir)
+    shutil.rmtree(application_dir, ignore_errors=True)
 
 
 def run_cli():