Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/rspec_helpers.sh')
-rw-r--r--scripts/rspec_helpers.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/rspec_helpers.sh b/scripts/rspec_helpers.sh
index 60b0db1eaf2..b0dc3bf2925 100644
--- a/scripts/rspec_helpers.sh
+++ b/scripts/rspec_helpers.sh
@@ -340,9 +340,18 @@ function retry_failed_rspec_examples() {
scripts/merge-reports "rspec/rspec-${CI_JOB_ID}.json" "${json_retry_file}"
junit_merge "${junit_retry_file}" "rspec/rspec-${CI_JOB_ID}.xml" --update-only
+ # The tests are flaky because they succeeded after being retried.
if [[ $rspec_run_status -eq 0 ]]; then
- # The test is flaky because it succeeded after being retried.
- # Make the pipeline "pass with warnings" if the flaky test is part of this MR.
+ # "53557338" is the project ID of https://gitlab.com/gitlab-org/quality/engineering-productivity/flaky-tests
+ if [ "$CREATE_RAILS_FLAKY_TEST_ISSUES" == "true" ]; then
+ bundle exec flaky-test-issues \
+ --token "${RAILS_FLAKY_TEST_PROJECT_TOKEN}" \
+ --project "53557338" \
+ --merge_request_iid "$CI_MERGE_REQUEST_IID" \
+ --input-files "rspec/rspec-retry-*.json" || true # We don't want this command to fail the job.
+ fi
+
+ # Make the pipeline "pass with warnings" if the flaky tests are part of this MR.
warn_on_successfully_retried_test
fi