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