diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-06 12:09:33 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-06 12:09:33 +0300 |
commit | 95de7177f2d5844e4aa399fea9a59d4ba6b4b1f1 (patch) | |
tree | b368e310fa60abd9841d2f25b116faedc6af90d2 /qa | |
parent | c77b780ee080b978bd5a63f642f741e8892383dc (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/tools/test_resources_handler.rb | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/qa/qa/tools/test_resources_handler.rb b/qa/qa/tools/test_resources_handler.rb index 7f4b8f78618..1f2742075a3 100644 --- a/qa/qa/tools/test_resources_handler.rb +++ b/qa/qa/tools/test_resources_handler.rb @@ -93,17 +93,18 @@ module QA # Download files from GCS bucket by environment name # Delete the files afterward def download(ci_project_name) - bucket_items = gcs_storage.list_objects(BUCKET, prefix: ci_project_name).items + logger.info("Downloading resource files from GCS for #{ci_project_name}...") + bucket_items = gcs_storage.list_objects(BUCKET, prefix: "#{ci_project_name}/").items - files_list = bucket_items&.each_with_object([]) do |obj, arr| - arr << obj.name - end - - if files_list.blank? + if bucket_items.blank? logger.info("\nNothing to download!") return end + files_list = bucket_items.each_with_object([]) do |obj, arr| + arr << obj.name + end + FileUtils.mkdir_p('tmp/') files_list.each do |file_name| |