2019-12-21 20:55:43 +05:30
|
|
|
.qa-job-base:
|
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}
|
2019-12-21 20:55:43 +05:30
|
|
|
extends:
|
|
|
|
- .default-retry
|
2020-06-23 00:09:42 +05:30
|
|
|
- .qa-cache
|
2019-12-21 20:55:43 +05:30
|
|
|
stage: test
|
2020-04-08 14:13:33 +05:30
|
|
|
needs: []
|
2021-06-08 01:23:25 +05:30
|
|
|
variables:
|
|
|
|
USE_BUNDLE_INSTALL: "false"
|
|
|
|
SETUP_DB: "false"
|
2021-11-11 11:23:49 +05:30
|
|
|
QA_EXPORT_TEST_METRICS: "false"
|
2019-12-21 20:55:43 +05:30
|
|
|
before_script:
|
2021-06-08 01:23:25 +05:30
|
|
|
- !reference [.default-before_script, before_script]
|
2022-08-13 15:12:31 +05:30
|
|
|
- cd qa && bundle install
|
2019-12-21 20:55:43 +05:30
|
|
|
|
|
|
|
qa:internal:
|
2020-03-13 15:44:24 +05:30
|
|
|
extends:
|
|
|
|
- .qa-job-base
|
2022-06-21 17:19:12 +05:30
|
|
|
- .qa:rules:internal
|
2020-03-13 15:44:24 +05:30
|
|
|
script:
|
2022-06-21 17:19:12 +05:30
|
|
|
- bundle exec rspec -O .rspec_internal
|
2020-03-13 15:44:24 +05:30
|
|
|
|
|
|
|
qa:internal-as-if-foss:
|
|
|
|
extends:
|
2020-06-23 00:09:42 +05:30
|
|
|
- qa:internal
|
2022-06-21 17:19:12 +05:30
|
|
|
- .qa:rules:internal-as-if-foss
|
2020-03-13 15:44:24 +05:30
|
|
|
- .as-if-foss
|
2019-12-21 20:55:43 +05:30
|
|
|
|
|
|
|
qa:selectors:
|
2020-03-13 15:44:24 +05:30
|
|
|
extends:
|
|
|
|
- .qa-job-base
|
|
|
|
- .qa:rules:ee-and-foss
|
2019-12-21 20:55:43 +05:30
|
|
|
script:
|
|
|
|
- bundle exec bin/qa Test::Sanity::Selectors
|
|
|
|
|
2022-06-21 17:19:12 +05:30
|
|
|
qa:master-auto-quarantine-dequarantine:
|
|
|
|
extends:
|
|
|
|
- .qa-job-base
|
|
|
|
rules:
|
|
|
|
- if: '$QA_TRIGGER_AUTO_QUARANTINE =~ /true|yes|1/i'
|
|
|
|
script:
|
|
|
|
- bundle exec confiner -r .confiner/master.yml
|
|
|
|
allow_failure: true
|
|
|
|
|
|
|
|
qa:nightly-auto-quarantine-dequarantine:
|
2022-03-02 08:16:31 +05:30
|
|
|
extends:
|
|
|
|
- .qa-job-base
|
|
|
|
rules:
|
|
|
|
- if: '$QA_TRIGGER_AUTO_QUARANTINE =~ /true|yes|1/i'
|
|
|
|
script:
|
2022-06-21 17:19:12 +05:30
|
|
|
- bundle exec confiner -r .confiner/nightly.yml
|
2022-03-02 08:16:31 +05:30
|
|
|
allow_failure: true
|
|
|
|
|
2020-03-13 15:44:24 +05:30
|
|
|
qa:selectors-as-if-foss:
|
2019-12-21 20:55:43 +05:30
|
|
|
extends:
|
|
|
|
- qa:selectors
|
2020-05-24 23:13:21 +05:30
|
|
|
- .qa:rules:as-if-foss
|
2020-03-13 15:44:24 +05:30
|
|
|
- .as-if-foss
|
2019-12-21 20:55:43 +05:30
|
|
|
|
2020-06-23 00:09:42 +05:30
|
|
|
update-qa-cache:
|
|
|
|
extends:
|
|
|
|
- .qa-job-base
|
2021-06-08 01:23:25 +05:30
|
|
|
- .qa-cache-push
|
2020-06-23 00:09:42 +05:30
|
|
|
- .shared:rules:update-cache
|
|
|
|
stage: prepare
|
|
|
|
script:
|
|
|
|
- echo "Cache has been updated and ready to be uploaded."
|
|
|
|
|
2022-07-23 23:45:48 +05:30
|
|
|
populate-qa-tests-var:
|
|
|
|
extends:
|
|
|
|
- .qa:rules:determine-qa-tests
|
2021-03-11 19:13:27 +05:30
|
|
|
image: ${GITLAB_DEPENDENCY_PROXY}ruby:2.7-alpine
|
2022-07-23 23:45:48 +05:30
|
|
|
stage: prepare
|
|
|
|
script:
|
2022-08-13 15:12:31 +05:30
|
|
|
- export QA_TESTS=$(scripts/determine-qa-tests --files $CHANGES_FILE --labels "$CI_MERGE_REQUEST_LABELS")
|
2022-07-23 23:45:48 +05:30
|
|
|
- 'echo "QA_TESTS=$QA_TESTS" >> qa_tests_var.env'
|
|
|
|
- 'echo "QA_TESTS: $QA_TESTS"'
|
|
|
|
artifacts:
|
|
|
|
expire_in: 2d
|
|
|
|
reports:
|
|
|
|
dotenv: qa_tests_var.env
|
|
|
|
paths:
|
|
|
|
- ${CHANGES_FILE}
|
|
|
|
- qa_tests_var.env
|
|
|
|
variables:
|
|
|
|
CHANGES_FILE: tmp/changed_files.txt
|
|
|
|
needs:
|
|
|
|
- detect-tests
|
|
|
|
|
|
|
|
.package-and-qa-base:
|
|
|
|
image: ${GITLAB_DEPENDENCY_PROXY}ruby:${RUBY_VERSION}-alpine
|
2019-12-04 20:38:33 +05:30
|
|
|
stage: qa
|
2019-07-31 22:56:46 +05:30
|
|
|
retry: 0
|
2021-10-27 15:23:28 +05:30
|
|
|
before_script:
|
2019-07-31 22:56:46 +05:30
|
|
|
- source scripts/utils.sh
|
|
|
|
- install_gitlab_gem
|
2021-12-11 22:18:48 +05:30
|
|
|
- tooling/bin/find_change_diffs ${CHANGES_DIFFS_DIR}
|
2021-10-27 15:23:28 +05:30
|
|
|
script:
|
2022-01-26 12:08:38 +05:30
|
|
|
- 'echo "QA_TESTS: $QA_TESTS"'
|
|
|
|
- exit_code=0 && tooling/bin/qa/package_and_qa_check ${CHANGES_DIFFS_DIR} || exit_code=$?
|
|
|
|
- echo $exit_code
|
2021-12-11 22:18:48 +05:30
|
|
|
- |
|
|
|
|
if [ $exit_code -eq 0 ]; then
|
2022-04-04 11:22:00 +05:30
|
|
|
./scripts/trigger-build.rb omnibus
|
2021-12-11 22:18:48 +05:30
|
|
|
elif [ $exit_code -eq 1 ]; then
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
echo "Downstream jobs will not be triggered because package_and_qa_check exited with code: $exit_code"
|
|
|
|
fi
|
|
|
|
# These jobs often time out, so temporarily use private runners and a long timeout: https://gitlab.com/gitlab-org/gitlab/-/issues/238563
|
2020-10-24 23:57:45 +05:30
|
|
|
tags:
|
|
|
|
- prm
|
|
|
|
timeout: 4h
|
2020-04-22 19:07:51 +05:30
|
|
|
needs:
|
|
|
|
- job: build-qa-image
|
|
|
|
artifacts: false
|
2020-05-24 23:13:21 +05:30
|
|
|
- job: build-assets-image
|
2020-04-22 19:07:51 +05:30
|
|
|
artifacts: false
|
2022-07-23 23:45:48 +05:30
|
|
|
- job: populate-qa-tests-var
|
2021-12-11 22:18:48 +05:30
|
|
|
- detect-tests
|
|
|
|
artifacts:
|
|
|
|
expire_in: 7d
|
|
|
|
paths:
|
|
|
|
- ${CHANGES_DIFFS_DIR}/*
|
|
|
|
variables:
|
|
|
|
CHANGES_DIFFS_DIR: tmp/diffs
|
2022-01-26 12:08:38 +05:30
|
|
|
ALLURE_JOB_NAME: $CI_JOB_NAME
|
2021-12-11 22:18:48 +05:30
|
|
|
|
|
|
|
.package-and-qa-ff-base:
|
|
|
|
script:
|
2022-01-26 12:08:38 +05:30
|
|
|
- |
|
2022-07-16 23:28:13 +05:30
|
|
|
feature_flags=$(scripts/changed-feature-flags --files $CHANGES_DIFFS_DIR --state $QA_FF_STATE)
|
2022-01-26 12:08:38 +05:30
|
|
|
if [[ $feature_flags ]]; then
|
|
|
|
export GITLAB_QA_OPTIONS="--set-feature-flags $feature_flags"
|
|
|
|
echo $GITLAB_QA_OPTIONS
|
2022-04-04 11:22:00 +05:30
|
|
|
./scripts/trigger-build.rb omnibus
|
2022-01-26 12:08:38 +05:30
|
|
|
else
|
2022-07-16 23:28:13 +05:30
|
|
|
echo "No changed feature flag found to test as $QA_FF_STATE."
|
2022-01-26 12:08:38 +05:30
|
|
|
fi
|
2021-12-11 22:18:48 +05:30
|
|
|
|
|
|
|
package-and-qa:
|
|
|
|
extends:
|
|
|
|
- .package-and-qa-base
|
|
|
|
- .qa:rules:package-and-qa
|
|
|
|
|
|
|
|
package-and-qa-ff-enabled:
|
|
|
|
extends:
|
|
|
|
- .package-and-qa-base
|
|
|
|
- .package-and-qa-ff-base
|
|
|
|
- .qa:rules:package-and-qa:feature-flags
|
|
|
|
variables:
|
2022-07-16 23:28:13 +05:30
|
|
|
QA_FF_STATE: "enabled"
|
2021-12-11 22:18:48 +05:30
|
|
|
|
|
|
|
package-and-qa-ff-disabled:
|
|
|
|
extends:
|
|
|
|
- .package-and-qa-base
|
|
|
|
- .package-and-qa-ff-base
|
|
|
|
- .qa:rules:package-and-qa:feature-flags
|
|
|
|
variables:
|
2022-07-16 23:28:13 +05:30
|
|
|
QA_FF_STATE: "disabled"
|
|
|
|
|
|
|
|
package-and-qa-ff-deleted:
|
|
|
|
extends:
|
|
|
|
- .package-and-qa-base
|
|
|
|
- .package-and-qa-ff-base
|
|
|
|
- .qa:rules:package-and-qa:feature-flags
|
|
|
|
variables:
|
|
|
|
QA_FF_STATE: "deleted"
|