diff options
Diffstat (limited to '.gitlab/ci/qa.gitlab-ci.yml')
-rw-r--r-- | .gitlab/ci/qa.gitlab-ci.yml | 54 |
1 files changed, 47 insertions, 7 deletions
diff --git a/.gitlab/ci/qa.gitlab-ci.yml b/.gitlab/ci/qa.gitlab-ci.yml index 88e732c2e75..74fc5f2cdc0 100644 --- a/.gitlab/ci/qa.gitlab-ci.yml +++ b/.gitlab/ci/qa.gitlab-ci.yml @@ -55,14 +55,18 @@ update-qa-cache: before_script: - source scripts/utils.sh - install_gitlab_gem + - tooling/bin/find_change_diffs ${CHANGES_DIFFS_DIR} script: - - ./scripts/trigger-build omnibus - -package-and-qa: - extends: - - .package-and-qa-base - - .qa:rules:package-and-qa - # This job often times out, so temporarily use private runners and a long timeout: https://gitlab.com/gitlab-org/gitlab/-/issues/238563 + - | + tooling/bin/qa/package_and_qa_check ${CHANGES_DIFFS_DIR} && exit_code=$? + if [ $exit_code -eq 0 ]; then + ./scripts/trigger-build omnibus + 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 tags: - prm timeout: 4h @@ -71,3 +75,39 @@ package-and-qa: artifacts: false - job: build-assets-image artifacts: false + - detect-tests + artifacts: + expire_in: 7d + paths: + - ${CHANGES_FILE} + - ${CHANGES_DIFFS_DIR}/* + variables: + CHANGES_FILE: tmp/changed_files.txt + CHANGES_DIFFS_DIR: tmp/diffs + +.package-and-qa-ff-base: + script: + - export GITLAB_QA_OPTIONS="--set-feature-flags $(scripts/changed-feature-flags --files $(cat $CHANGES_FILE | tr ' ' ',') --state $QA_FF_STATE)" + - echo $GITLAB_QA_OPTIONS + - ./scripts/trigger-build omnibus + +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: + QA_FF_STATE: "enable" + +package-and-qa-ff-disabled: + extends: + - .package-and-qa-base + - .package-and-qa-ff-base + - .qa:rules:package-and-qa:feature-flags + variables: + QA_FF_STATE: "disable" |