diff options
Diffstat (limited to '.gitlab/ci/qa-common')
-rw-r--r-- | .gitlab/ci/qa-common/main.gitlab-ci.yml | 25 | ||||
-rw-r--r-- | .gitlab/ci/qa-common/rules.gitlab-ci.yml | 4 | ||||
-rw-r--r-- | .gitlab/ci/qa-common/variables.gitlab-ci.yml | 7 |
3 files changed, 35 insertions, 1 deletions
diff --git a/.gitlab/ci/qa-common/main.gitlab-ci.yml b/.gitlab/ci/qa-common/main.gitlab-ci.yml index 603ac12c464..5c9043f8694 100644 --- a/.gitlab/ci/qa-common/main.gitlab-ci.yml +++ b/.gitlab/ci/qa-common/main.gitlab-ci.yml @@ -61,6 +61,11 @@ stages: GITLAB_LICENSE_MODE: test GITLAB_QA_ADMIN_ACCESS_TOKEN: $QA_ADMIN_ACCESS_TOKEN GITLAB_QA_OPTS: $EXTRA_GITLAB_QA_OPTS + before_script: + - !reference [.qa-base, before_script] + # Prepend the file paths with the absolute path from inside the container since the files will be read from there + - export RSPEC_FAST_QUARANTINE_PATH="/home/gitlab/qa/${RSPEC_FAST_QUARANTINE_PATH}" + - export RSPEC_SKIPPED_TESTS_REPORT_PATH="/home/gitlab/qa/rspec/skipped_tests-${CI_JOB_ID}.txt" # Allow QA jobs to fail as they are flaky. The top level `package-and-e2e:ee` # pipeline is not allowed to fail, so without allowing QA to fail, we will be # blocking merges due to flaky tests. @@ -85,6 +90,26 @@ stages: - qa/knapsack/*.json expire_in: 1 day +.download-fast-quarantine-report: + image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}alpine:edge + stage: .pre + variables: + GIT_STRATEGY: none + before_script: + - apk add --no-cache --update curl bash + script: + - mkdir -p "${QA_RSPEC_REPORT_PATH}" + - | + if [[ ! -f "${QA_RSPEC_REPORT_PATH}/${RSPEC_FAST_QUARANTINE_FILE}" ]]; then + curl --location -o "${QA_RSPEC_REPORT_PATH}/${RSPEC_FAST_QUARANTINE_FILE}" "https://gitlab-org.gitlab.io/quality/engineering-productivity/fast-quarantine/${RSPEC_FAST_QUARANTINE_PATH}" || + echo "" > "${QA_RSPEC_REPORT_PATH}/${RSPEC_FAST_QUARANTINE_FILE}" + fi + allow_failure: true + artifacts: + paths: + - "${QA_RSPEC_REPORT_PATH}/${RSPEC_FAST_QUARANTINE_FILE}" + expire_in: 1 day + .upload-knapsack-report: extends: - .generate-knapsack-report-base diff --git a/.gitlab/ci/qa-common/rules.gitlab-ci.yml b/.gitlab/ci/qa-common/rules.gitlab-ci.yml index b5963d24b81..7518f08398f 100644 --- a/.gitlab/ci/qa-common/rules.gitlab-ci.yml +++ b/.gitlab/ci/qa-common/rules.gitlab-ci.yml @@ -64,6 +64,10 @@ rules: - when: always +.rules:download-fast-quarantine-report: + rules: + - when: always + # ------------------------------------------ # Test # ------------------------------------------ diff --git a/.gitlab/ci/qa-common/variables.gitlab-ci.yml b/.gitlab/ci/qa-common/variables.gitlab-ci.yml index fe980293f3a..9498df47ecc 100644 --- a/.gitlab/ci/qa-common/variables.gitlab-ci.yml +++ b/.gitlab/ci/qa-common/variables.gitlab-ci.yml @@ -1,6 +1,7 @@ # Default variables for package-and-test variables: + USE_OLD_RUBY_VERSION: "true" REGISTRY_HOST: "registry.gitlab.com" REGISTRY_GROUP: "gitlab-org" ALLURE_JOB_NAME: $CI_PROJECT_NAME @@ -11,4 +12,8 @@ variables: # run all tests by default when package-and-test is included natively in other projects # this will be overridden when selective test execution is used in gitlab canonical project QA_RUN_ALL_TESTS: "true" - USE_OLD_RUBY_VERSION: "true" + # Used by gitlab-qa to set up a volume for `${CI_PROJECT_DIR}/qa/rspec:/home/gitlab/qa/rspec/` + QA_RSPEC_REPORT_PATH: "${CI_PROJECT_DIR}/qa/rspec" + RSPEC_FAST_QUARANTINE_FILE: "fast_quarantine-gitlab.txt" + # This path is relative to /home/gitlab/qa/ in the QA container + RSPEC_FAST_QUARANTINE_PATH: "rspec/${RSPEC_FAST_QUARANTINE_FILE}" |