debian-mirror-gitlab/.gitlab/ci/review-apps/qa.gitlab-ci.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

210 lines
6 KiB
YAML
Raw Normal View History

2022-06-21 17:19:12 +05:30
include:
- project: gitlab-org/quality/pipeline-common
2022-07-23 23:45:48 +05:30
ref: 0.13.0
2022-06-21 17:19:12 +05:30
file:
- /ci/allure-report.yml
- /ci/knapsack-report.yml
2022-07-16 23:28:13 +05:30
.bundler_variables:
variables:
BUNDLE_SUPPRESS_INSTALL_USING_MESSAGES: "true"
BUNDLE_SILENCE_ROOT_WARNING: "true"
BUNDLE_PATH: vendor
.test_variables:
2021-11-18 22:05:49 +05:30
variables:
QA_GENERATE_ALLURE_REPORT: "true"
2022-07-23 23:45:48 +05:30
COLORIZED_LOGS: "true"
2021-11-18 22:05:49 +05:30
GITLAB_USERNAME: "root"
GITLAB_PASSWORD: "${REVIEW_APPS_ROOT_PASSWORD}"
GITLAB_ADMIN_USERNAME: "root"
GITLAB_ADMIN_PASSWORD: "${REVIEW_APPS_ROOT_PASSWORD}"
2021-12-11 22:18:48 +05:30
GITLAB_QA_ADMIN_ACCESS_TOKEN: "${REVIEW_APPS_ROOT_TOKEN}"
2021-11-18 22:05:49 +05:30
GITHUB_ACCESS_TOKEN: "${REVIEW_APPS_QA_GITHUB_ACCESS_TOKEN}"
2022-07-16 23:28:13 +05:30
.review-qa-base:
extends:
- .use-docker-in-docker
- .qa-cache
- .test_variables
- .bundler_variables
2022-07-23 23:45:48 +05:30
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-bullseye-ruby-2.7:bundler-2.3-git-2.33-lfs-2.9-chrome-${CHROME_VERSION}-docker-${DOCKER_VERSION}-gcloud-383-kubectl-1.23
2022-07-16 23:28:13 +05:30
stage: qa
needs:
- review-deploy
- download-knapsack-report
variables:
DOCKER_HOST: tcp://docker:2376
DOCKER_TLS_CERTDIR: /certs
DOCKER_CERT_PATH: /certs/client
DOCKER_TLS_VERIFY: 1
2021-11-18 22:05:49 +05:30
before_script:
2022-01-26 12:08:38 +05:30
- export EE_LICENSE="$(cat $REVIEW_APPS_EE_LICENSE_FILE)"
2022-07-16 23:28:13 +05:30
- export QA_GITLAB_URL="$(cat environment_url.txt)"
- cd qa && bundle install
2021-12-11 22:18:48 +05:30
script:
2022-04-04 11:22:00 +05:30
- qa_run_status=0
2022-07-16 23:28:13 +05:30
- |
bundle exec rake "knapsack:rspec[\
${RSPEC_TAGS} \
--tag ~orchestrated \
--tag ~transient \
--tag ~skip_signup_disabled \
2022-07-23 23:45:48 +05:30
--tag ~requires_git_protocol_v2 \
--tag ~requires_praefect \
--tag ~sanity_feature_flags \
2022-07-16 23:28:13 +05:30
--force-color \
--order random \
--format documentation \
--format RspecJunitFormatter --out tmp/rspec.xml \
]" || qa_run_status=$?
2022-04-04 11:22:00 +05:30
- if [ ${qa_run_status} -ne 0 ]; then
release_sha=$(echo "${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA:-${CI_COMMIT_SHA}}" | cut -c1-11);
echo "Errors can be found at https://sentry.gitlab.net/gitlab/gitlab-review-apps/releases/${release_sha}/all-events/.";
fi
- exit ${qa_run_status}
2021-12-11 22:18:48 +05:30
artifacts:
2022-01-26 12:08:38 +05:30
paths:
2022-03-02 08:16:31 +05:30
- qa/tmp
2021-12-11 22:18:48 +05:30
reports:
junit: qa/tmp/rspec.xml
2022-03-02 08:16:31 +05:30
expire_in: 7 days
when: always
2021-11-18 22:05:49 +05:30
.allure-report-base:
2022-06-21 17:19:12 +05:30
extends: .generate-allure-report-base
2021-11-18 22:05:49 +05:30
stage: post-qa
variables:
GITLAB_AUTH_TOKEN: $GITLAB_QA_MR_ALLURE_REPORT_TOKEN
ALLURE_PROJECT_PATH: $CI_PROJECT_PATH
ALLURE_MERGE_REQUEST_IID: $CI_MERGE_REQUEST_IID
2022-06-21 17:19:12 +05:30
ALLURE_RESULTS_GLOB: qa/tmp/allure-results/*
2021-11-18 22:05:49 +05:30
2022-07-16 23:28:13 +05:30
# Store knapsack report as artifact so the same report is reused across all jobs
download-knapsack-report:
2022-07-23 23:45:48 +05:30
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-bullseye-ruby-2.7:bundler-2.3-git-2.33-chrome-${CHROME_VERSION}
2022-07-16 23:28:13 +05:30
extends:
- .qa-cache
- .bundler_variables
- .review:rules:review-qa-reliable
stage: prepare
2022-07-23 23:45:48 +05:30
variables:
QA_KNAPSACK_REPORTS: review-qa-reliable,review-qa-all
2022-07-16 23:28:13 +05:30
before_script:
- cd qa && bundle install
script:
2022-07-23 23:45:48 +05:30
- bundle exec rake "knapsack:download"
2022-07-16 23:28:13 +05:30
allow_failure: true
artifacts:
paths:
- qa/knapsack/review-qa-*.json
expire_in: 1 day
2022-07-23 23:45:48 +05:30
review-qa-sanity:
extends:
- .review-qa-base
- .review:rules:review-qa-sanity
retry: 1
variables:
QA_RUN_TYPE: review-qa-sanity
script:
- qa_run_status=0
- |
bundle exec rake "knapsack:rspec[\
--tag sanity_feature_flags \
--force-color \
--order random \
--format documentation \
--format RspecJunitFormatter --out tmp/rspec.xml \
]" || qa_run_status=$?
- if [ ${qa_run_status} -ne 0 ]; then
release_sha=$(echo "${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA:-${CI_COMMIT_SHA}}" | cut -c1-11);
echo "Errors can be found at https://sentry.gitlab.net/gitlab/gitlab-review-apps/releases/${release_sha}/all-events/.";
fi
- exit ${qa_run_status}
2021-11-18 22:05:49 +05:30
review-qa-smoke:
extends:
- .review-qa-base
- .review:rules:review-qa-smoke
2022-07-23 23:45:48 +05:30
retry: 1
2021-11-18 22:05:49 +05:30
variables:
QA_RUN_TYPE: review-qa-smoke
2022-07-16 23:28:13 +05:30
RSPEC_TAGS: --tag smoke
2021-11-18 22:05:49 +05:30
2021-12-11 22:18:48 +05:30
review-qa-reliable:
extends:
- .review-qa-base
- .review:rules:review-qa-reliable
2022-07-23 23:45:48 +05:30
retry: 1
2022-07-16 23:28:13 +05:30
parallel: 10
2021-12-11 22:18:48 +05:30
variables:
QA_RUN_TYPE: review-qa-reliable
2022-07-16 23:28:13 +05:30
RSPEC_TAGS: --tag reliable
2021-12-11 22:18:48 +05:30
2021-11-18 22:05:49 +05:30
review-qa-all:
extends:
- .review-qa-base
- .review:rules:review-qa-all
2022-05-07 20:08:51 +05:30
parallel: 5
2021-11-18 22:05:49 +05:30
variables:
QA_RUN_TYPE: review-qa-all
2022-07-16 23:28:13 +05:30
RSPEC_TAGS: --tag ~reliable --tag ~smoke
2021-11-18 22:05:49 +05:30
review-performance:
extends:
- .default-retry
- .review:rules:review-performance
image:
name: sitespeedio/sitespeed.io
entrypoint: [""]
stage: qa
needs: ["review-deploy"]
before_script:
- export CI_ENVIRONMENT_URL="$(cat environment_url.txt)"
- echo "${CI_ENVIRONMENT_URL}"
- mkdir -p gitlab-exporter
- wget -O ./gitlab-exporter/index.js https://gitlab.com/gitlab-org/gl-performance/raw/master/index.js
- mkdir -p sitespeed-results
script:
- /start.sh --plugins.add ./gitlab-exporter --outputFolder sitespeed-results "${CI_ENVIRONMENT_URL}"
after_script:
- mv sitespeed-results/data/performance.json performance.json
artifacts:
paths:
- sitespeed-results/
reports:
performance: performance.json
expire_in: 31d
2022-06-21 17:19:12 +05:30
# Generate single report for both smoke and reliable test jobs
# Both job types are essentially the same:
# * always executed
# * always blocking
allure-report-qa-blocking:
2022-03-02 08:16:31 +05:30
extends:
- .allure-report-base
2022-06-21 17:19:12 +05:30
- .review:rules:review-qa-blocking-report
needs:
- review-qa-smoke
- review-qa-reliable
2022-03-02 08:16:31 +05:30
variables:
2022-06-21 17:19:12 +05:30
ALLURE_JOB_NAME: review-qa-blocking
2022-03-02 08:16:31 +05:30
2021-11-18 22:05:49 +05:30
allure-report-qa-all:
extends:
- .allure-report-base
- .review:rules:review-qa-all-report
needs: ["review-qa-all"]
variables:
ALLURE_JOB_NAME: review-qa-all
2022-01-26 12:08:38 +05:30
2022-07-16 23:28:13 +05:30
upload-knapsack-report:
2022-01-26 12:08:38 +05:30
extends:
2022-06-21 17:19:12 +05:30
- .generate-knapsack-report-base
2022-03-02 08:16:31 +05:30
stage: post-qa
2022-06-21 17:19:12 +05:30
variables:
2022-07-16 23:28:13 +05:30
# knapsack report upload uses gitlab-qa image with code already there
GIT_STRATEGY: none
QA_KNAPSACK_REPORT_FILE_PATTERN: $CI_PROJECT_DIR/qa/tmp/knapsack/*/*.json