129 lines
3.8 KiB
YAML
129 lines
3.8 KiB
YAML
.review-qa-base:
|
|
extends:
|
|
- .use-docker-in-docker
|
|
image:
|
|
name: ${QA_IMAGE}
|
|
entrypoint: [""]
|
|
stage: qa
|
|
needs: ["review-deploy"]
|
|
variables:
|
|
QA_DEBUG: "true"
|
|
QA_CAN_TEST_GIT_PROTOCOL_V2: "false"
|
|
QA_GENERATE_ALLURE_REPORT: "true"
|
|
GITLAB_USERNAME: "root"
|
|
GITLAB_PASSWORD: "${REVIEW_APPS_ROOT_PASSWORD}"
|
|
GITLAB_ADMIN_USERNAME: "root"
|
|
GITLAB_ADMIN_PASSWORD: "${REVIEW_APPS_ROOT_PASSWORD}"
|
|
GITLAB_QA_ADMIN_ACCESS_TOKEN: "${REVIEW_APPS_ROOT_TOKEN}"
|
|
GITHUB_ACCESS_TOKEN: "${REVIEW_APPS_QA_GITHUB_ACCESS_TOKEN}"
|
|
EE_LICENSE: "${REVIEW_APPS_EE_LICENSE}"
|
|
SIGNUP_DISABLED: "true"
|
|
before_script:
|
|
# Use $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA so that GitLab image built in omnibus-gitlab-mirror and QA image are in sync.
|
|
- if [ -n "$CI_MERGE_REQUEST_SOURCE_BRANCH_SHA" ]; then
|
|
git checkout -f ${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA};
|
|
fi
|
|
- export CI_ENVIRONMENT_URL="$(cat environment_url.txt)"
|
|
- echo "${CI_ENVIRONMENT_URL}"
|
|
- cd qa
|
|
artifacts:
|
|
paths:
|
|
- qa/tmp
|
|
expire_in: 7 days
|
|
when: always
|
|
|
|
.allure-report-base:
|
|
image:
|
|
name: ${GITLAB_DEPENDENCY_PROXY}andrcuns/allure-report-publisher:0.3.6
|
|
entrypoint: [""]
|
|
stage: post-qa
|
|
variables:
|
|
GIT_STRATEGY: none
|
|
STORAGE_CREDENTIALS: $QA_ALLURE_REPORT_GCS_CREDENTIALS
|
|
GITLAB_AUTH_TOKEN: $GITLAB_QA_MR_ALLURE_REPORT_TOKEN
|
|
ALLURE_PROJECT_PATH: $CI_PROJECT_PATH
|
|
ALLURE_MERGE_REQUEST_IID: $CI_MERGE_REQUEST_IID
|
|
allow_failure: true
|
|
script:
|
|
- |
|
|
allure-report-publisher upload gcs \
|
|
--results-glob="qa/tmp/allure-results/*" \
|
|
--bucket="gitlab-qa-allure-reports" \
|
|
--prefix="$ALLURE_REPORT_PATH_PREFIX/$CI_COMMIT_REF_SLUG" \
|
|
--update-pr="comment" \
|
|
--copy-latest \
|
|
--ignore-missing-results \
|
|
--color
|
|
|
|
review-qa-smoke:
|
|
extends:
|
|
- .review-qa-base
|
|
- .review:rules:review-qa-smoke
|
|
retry: 1 # This is confusing but this means "2 runs at max".
|
|
variables:
|
|
QA_RUN_TYPE: review-qa-smoke
|
|
script:
|
|
- bin/test Test::Instance::Smoke "${CI_ENVIRONMENT_URL}"
|
|
|
|
review-qa-all:
|
|
extends:
|
|
- .review-qa-base
|
|
- .review:rules:review-qa-all
|
|
variables:
|
|
QA_RUN_TYPE: review-qa-all
|
|
parallel: 5
|
|
script:
|
|
- export KNAPSACK_REPORT_PATH=knapsack/master_report.json
|
|
- export KNAPSACK_TEST_FILE_PATTERN=qa/specs/features/**/*_spec.rb
|
|
- |
|
|
bin/test Test::Instance::All "${CI_ENVIRONMENT_URL}" \
|
|
-- \
|
|
--color --format documentation \
|
|
--format RspecJunitFormatter --out tmp/rspec.xml
|
|
artifacts:
|
|
reports:
|
|
junit: qa/tmp/rspec.xml
|
|
|
|
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
|
|
|
|
allure-report-qa-smoke:
|
|
extends:
|
|
- .allure-report-base
|
|
- .review:rules:review-qa-smoke-report
|
|
needs: ["review-qa-smoke"]
|
|
variables:
|
|
ALLURE_REPORT_PATH_PREFIX: gitlab-review-smoke
|
|
ALLURE_JOB_NAME: review-qa-smoke
|
|
|
|
allure-report-qa-all:
|
|
extends:
|
|
- .allure-report-base
|
|
- .review:rules:review-qa-all-report
|
|
needs: ["review-qa-all"]
|
|
variables:
|
|
ALLURE_REPORT_PATH_PREFIX: gitlab-review-all
|
|
ALLURE_JOB_NAME: review-qa-all
|