diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-28 18:12:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-28 18:12:02 +0300 |
commit | 33d999642a05b1c83c8230cac46086493e7fb368 (patch) | |
tree | 3bb3f2f358a36da67cb134cb1b7359a9724cfc23 /scripts/rspec_helpers.sh | |
parent | 5573dc288d880386a96afc9458f7d1abd6cd745f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts/rspec_helpers.sh')
-rw-r--r-- | scripts/rspec_helpers.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/rspec_helpers.sh b/scripts/rspec_helpers.sh index b6e79bf3115..46ffbc223eb 100644 --- a/scripts/rspec_helpers.sh +++ b/scripts/rspec_helpers.sh @@ -23,9 +23,16 @@ function update_tests_metadata() { local rspec_flaky_folder_path="$(dirname "${FLAKY_RSPEC_SUITE_REPORT_PATH:-unknown_folder}")/" local knapsack_folder_path="$(dirname "${KNAPSACK_RSPEC_SUITE_REPORT_PATH:-unknown_folder}")/" - echo "{}" > "${KNAPSACK_RSPEC_SUITE_REPORT_PATH:-unknown_file}" + curl -f --location -o "${KNAPSACK_RSPEC_SUITE_REPORT_PATH}" "https://gitlab-org.gitlab.io/gitlab/${KNAPSACK_RSPEC_SUITE_REPORT_PATH}" || + echo "{}" > "${KNAPSACK_RSPEC_SUITE_REPORT_PATH:-unknown_file}" - scripts/merge-reports "${KNAPSACK_RSPEC_SUITE_REPORT_PATH:-unknown_file}" ${knapsack_folder_path:-unknown_folder}rspec*.json + if [[ "$AVERAGE_KNAPSACK_REPORT" == "true" ]]; then + # a comma separated list of file names matching the glob + local new_reports="$(printf '%s,' ${knapsack_folder_path:-unknown_folder}rspec*.json)" + scripts/pipeline/average_reports.rb -i "${KNAPSACK_RSPEC_SUITE_REPORT_PATH:-unknown_file}" -n "${new_reports}" + else + scripts/merge-reports "${KNAPSACK_RSPEC_SUITE_REPORT_PATH:-unknown_file}" ${knapsack_folder_path:-unknown_folder}rspec*.json + fi export FLAKY_RSPEC_GENERATE_REPORT="true" scripts/merge-reports "${FLAKY_RSPEC_SUITE_REPORT_PATH:-unknown_file}" ${rspec_flaky_folder_path:-unknown_folder}all_*.json |