Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '.gitlab/ci/qa-common/main.gitlab-ci.yml')
-rw-r--r--.gitlab/ci/qa-common/main.gitlab-ci.yml124
1 files changed, 9 insertions, 115 deletions
diff --git a/.gitlab/ci/qa-common/main.gitlab-ci.yml b/.gitlab/ci/qa-common/main.gitlab-ci.yml
index de393f94551..3b6f42ba57e 100644
--- a/.gitlab/ci/qa-common/main.gitlab-ci.yml
+++ b/.gitlab/ci/qa-common/main.gitlab-ci.yml
@@ -6,7 +6,7 @@ workflow:
include:
- project: gitlab-org/quality/pipeline-common
- ref: 5.1.1
+ ref: 7.2.3
file:
- /ci/base.gitlab-ci.yml
- /ci/allure-report.yml
@@ -28,13 +28,16 @@ stages:
.ruby-image:
# Because this pipeline template can be included directly in other projects,
# image path and registry needs to be defined explicitly
- image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-bullseye-ruby-${RUBY_VERSION}:bundler-2.3
+ image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}:bundler-2.3
-.qa-install:
+.bundler-variables:
variables:
BUNDLE_SUPPRESS_INSTALL_USING_MESSAGES: "true"
BUNDLE_SILENCE_ROOT_WARNING: "true"
+
+.qa-install:
extends:
+ - .bundler-variables
- .gitlab-qa-install
.update-script:
@@ -46,8 +49,8 @@ stages:
.qa:
extends:
+ - .bundler-variables
- .qa-base
- - .qa-install
- .gitlab-qa-report
stage: test
tags:
@@ -59,102 +62,11 @@ stages:
GITLAB_LICENSE_MODE: test
GITLAB_QA_ADMIN_ACCESS_TOKEN: $QA_ADMIN_ACCESS_TOKEN
GITLAB_QA_OPTS: $EXTRA_GITLAB_QA_OPTS
- # todo: remove in 16.1 milestone when not needed for backwards compatibility anymore
- EE_LICENSE: $QA_EE_LICENSE
- GITHUB_ACCESS_TOKEN: $QA_GITHUB_ACCESS_TOKEN
# Allow QA jobs to fail as they are flaky. The top level `package-and-e2e:ee`
# pipeline is not allowed to fail, so without allowing QA to fail, we will be
# blocking merges due to flaky tests.
allow_failure: true
-.trigger-omnibus-env:
- stage: .pre
- needs:
- # We need this job because we need its `cached-assets-hash.txt` artifact, so that we can pass the assets image tag to the downstream omnibus-gitlab pipeline.
- - pipeline: $PARENT_PIPELINE_ID
- job: build-assets-image
- variables:
- BUILD_ENV: build.env
- before_script:
- - |
- # This is duplicating the function from `scripts/utils.sh` since `.gitlab/ci/package-and-test/main.gitlab-ci.yml` can be included in other projects.
- function assets_image_tag() {
- local cache_assets_hash_file="cached-assets-hash.txt"
-
- if [[ -n "${CI_COMMIT_TAG}" ]]; then
- echo -n "${CI_COMMIT_REF_NAME}"
- elif [[ -f "${cache_assets_hash_file}" ]]; then
- echo -n "assets-hash-$(cat ${cache_assets_hash_file} | cut -c1-10)"
- else
- echo -n "${CI_COMMIT_SHA}"
- fi
- }
- script:
- - |
- SECURITY_SOURCES=$([[ ! "$CI_PROJECT_NAMESPACE" =~ ^gitlab-org\/security ]] || echo "true")
- echo "SECURITY_SOURCES=${SECURITY_SOURCES:-false}" > $BUILD_ENV
- echo "OMNIBUS_GITLAB_CACHE_UPDATE=${OMNIBUS_GITLAB_CACHE_UPDATE:-false}" >> $BUILD_ENV
- for version_file in *_VERSION; do echo "$version_file=$(cat $version_file)" >> $BUILD_ENV; done
- echo "OMNIBUS_GITLAB_RUBY3_BUILD=${OMNIBUS_GITLAB_RUBY3_BUILD:-false}" >> $BUILD_ENV
- echo "OMNIBUS_GITLAB_RUBY2_BUILD=${OMNIBUS_GITLAB_RUBY2_BUILD:-false}" >> $BUILD_ENV
- echo "OMNIBUS_GITLAB_CACHE_EDITION=${OMNIBUS_GITLAB_CACHE_EDITION:-GITLAB}" >> $BUILD_ENV
- echo "OMNIBUS_GITLAB_BUILD_ON_ALL_OS=${OMNIBUS_GITLAB_BUILD_ON_ALL_OS:-false}" >> $BUILD_ENV
- echo "GITLAB_ASSETS_TAG=$(assets_image_tag)" >> $BUILD_ENV
- echo "EE=$([[ $FOSS_ONLY == '1' ]] && echo 'false' || echo 'true')" >> $BUILD_ENV
- target_branch_name="${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-${CI_COMMIT_REF_NAME}}"
- echo "TRIGGER_BRANCH=$([[ "${target_branch_name}" =~ ^[0-9-]+-stable(-ee)?$ ]] && echo ${target_branch_name%-ee} || echo 'master')" >> $BUILD_ENV
- - |
- echo "Built environment file for omnibus build:"
- cat $BUILD_ENV
- artifacts:
- expire_in: 3 days
- reports:
- dotenv: $BUILD_ENV
- paths:
- - $BUILD_ENV
-
-.trigger-omnibus-env-ce:
- extends: .trigger-omnibus-env
- needs:
- - pipeline: $PARENT_PIPELINE_ID
- job: build-assets-image as-if-foss
-
-.trigger-omnibus:
- stage: .pre
- inherit:
- variables: false
- variables:
- GITALY_SERVER_VERSION: $GITALY_SERVER_VERSION
- GITLAB_ELASTICSEARCH_INDEXER_VERSION: $GITLAB_ELASTICSEARCH_INDEXER_VERSION
- GITLAB_KAS_VERSION: $GITLAB_KAS_VERSION
- GITLAB_METRICS_EXPORTER_VERSION: $GITLAB_METRICS_EXPORTER_VERSION
- GITLAB_PAGES_VERSION: $GITLAB_PAGES_VERSION
- GITLAB_SHELL_VERSION: $GITLAB_SHELL_VERSION
- GITLAB_WORKHORSE_VERSION: $GITLAB_WORKHORSE_VERSION
- GITLAB_VERSION: $CI_COMMIT_SHA
- GITLAB_ASSETS_TAG: $GITLAB_ASSETS_TAG
- IMAGE_TAG: $CI_COMMIT_SHA
- TOP_UPSTREAM_SOURCE_PROJECT: $CI_PROJECT_PATH
- SECURITY_SOURCES: $SECURITY_SOURCES
- CACHE_UPDATE: $OMNIBUS_GITLAB_CACHE_UPDATE
- RUBY3_BUILD: $OMNIBUS_GITLAB_RUBY3_BUILD
- RUBY2_BUILD: $OMNIBUS_GITLAB_RUBY2_BUILD
- CACHE_EDITION: $OMNIBUS_GITLAB_CACHE_EDITION
- BUILD_ON_ALL_OS: $OMNIBUS_GITLAB_BUILD_ON_ALL_OS
- SKIP_QA_TEST: "true"
- ee: $EE
- trigger:
- project: gitlab-org/build/omnibus-gitlab-mirror
- branch: $TRIGGER_BRANCH
- strategy: depend
-
-.trigger-omnibus-ce:
- extends:
- - .trigger-omnibus
- variables:
- # Override gitlab repository so that omnibus doesn't use foss repository for CE build
- GITLAB_ALTERNATIVE_REPO: $CI_PROJECT_URL
-
.download-knapsack-report:
extends:
- .gitlab-qa-image
@@ -163,8 +75,10 @@ stages:
KNAPSACK_DIR: ${CI_PROJECT_DIR}/qa/knapsack
GIT_STRATEGY: none
script:
+ - echo "KNAPSACK_TEST_FILE_PATTERN is ${KNAPSACK_TEST_FILE_PATTERN}"
# when using qa-image, code runs in /home/gitlab/qa folder
- bundle exec rake "knapsack:download[test]"
+ - '[ -n "$QA_TESTS" ] && bundle exec rake "knapsack:create_reports_for_selective"'
- mkdir -p "$KNAPSACK_DIR" && cp knapsack/*.json "${KNAPSACK_DIR}/"
allow_failure: true
artifacts:
@@ -200,26 +114,6 @@ stages:
script:
- bundle exec rake "ci:export_test_metrics[$QA_METRICS_REPORT_FILE_PATTERN]"
-.relate-test-failures:
- extends:
- - .qa-install
- - .ruby-image
- stage: report
- when: always
- variables:
- QA_RSPEC_JSON_FILE_PATTERN: "${CI_PROJECT_DIR}/gitlab-qa-run-*/**/rspec-*.json"
- script:
- - |
- if [ "$SUITE_FAILED" != "true" ] && [ "$SUITE_RAN" == "true" ]; then
- echo "Test suite passed. Exiting..."
- exit 0
- fi
- - |
- bundle exec relate-failure-issue \
- --input-files "${QA_RSPEC_JSON_FILE_PATTERN}" \
- --project "gitlab-org/gitlab" \
- --token "${QA_RELATE_FAILURE_ISSUE_TOKEN}"
-
.generate-test-session:
extends:
- .qa-install