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')
-rw-r--r--.gitlab/ci/database.gitlab-ci.yml2
-rw-r--r--.gitlab/ci/frontend.gitlab-ci.yml38
-rw-r--r--.gitlab/ci/gitlab-com/danger-review.gitlab-ci.yml2
-rw-r--r--.gitlab/ci/gitlab-gems.gitlab-ci.yml11
-rw-r--r--.gitlab/ci/global.gitlab-ci.yml3
-rw-r--r--.gitlab/ci/package-and-test/main.gitlab-ci.yml60
-rw-r--r--.gitlab/ci/preflight.gitlab-ci.yml6
-rw-r--r--.gitlab/ci/qa-common/main.gitlab-ci.yml15
-rw-r--r--.gitlab/ci/qa-common/rules.gitlab-ci.yml24
-rw-r--r--.gitlab/ci/qa-common/variables.gitlab-ci.yml2
-rw-r--r--.gitlab/ci/qa.gitlab-ci.yml19
-rw-r--r--.gitlab/ci/rails.gitlab-ci.yml71
-rw-r--r--.gitlab/ci/rails/rspec-foss-impact.gitlab-ci.yml.erb4
-rw-r--r--.gitlab/ci/rails/shared.gitlab-ci.yml28
-rw-r--r--.gitlab/ci/release-environments.gitlab-ci.yml5
-rw-r--r--.gitlab/ci/reports.gitlab-ci.yml2
-rw-r--r--.gitlab/ci/review-apps/main.gitlab-ci.yml4
-rw-r--r--.gitlab/ci/review-apps/qa.gitlab-ci.yml2
-rw-r--r--.gitlab/ci/rules.gitlab-ci.yml89
-rw-r--r--.gitlab/ci/setup.gitlab-ci.yml3
-rw-r--r--.gitlab/ci/templates/gem.gitlab-ci.yml1
-rw-r--r--.gitlab/ci/test-metadata.gitlab-ci.yml2
-rw-r--r--.gitlab/ci/test-on-gdk/main.gitlab-ci.yml54
-rw-r--r--.gitlab/ci/vendored-gems.gitlab-ci.yml4
-rw-r--r--.gitlab/ci/workhorse.gitlab-ci.yml4
25 files changed, 294 insertions, 161 deletions
diff --git a/.gitlab/ci/database.gitlab-ci.yml b/.gitlab/ci/database.gitlab-ci.yml
index 285c99d2cbe..b01ba247ce7 100644
--- a/.gitlab/ci/database.gitlab-ci.yml
+++ b/.gitlab/ci/database.gitlab-ci.yml
@@ -36,7 +36,7 @@ db:rollback:
- .db-job-base
- .rails:rules:db-rollback
script:
- - bundle exec rake db:migrate VERSION=20220502173045 # 14.10 (last 14.x version)
+ - bundle exec rake db:migrate VERSION=20221111123146 # 15.7
- bundle exec rake db:migrate
db:rollback single-db:
diff --git a/.gitlab/ci/frontend.gitlab-ci.yml b/.gitlab/ci/frontend.gitlab-ci.yml
index 2afa69bbff8..9d78fb102f9 100644
--- a/.gitlab/ci/frontend.gitlab-ci.yml
+++ b/.gitlab/ci/frontend.gitlab-ci.yml
@@ -153,7 +153,7 @@ retrieve-frontend-fixtures:
- run_timed_command "gem install knapsack --no-document"
- section_start "gitaly-test-spawn" "Spawning Gitaly"; scripts/gitaly-test-spawn; section_end "gitaly-test-spawn"; # Do not use 'bundle exec' here
- source ./scripts/rspec_helpers.sh
- - rspec_paralellized_job
+ - rspec_parallelized_job
artifacts:
name: frontend-fixtures
expire_in: 31d
@@ -306,6 +306,42 @@ jest-integration:
- run_timed_command "yarn jest:integration --ci"
needs: ["rspec-all frontend_fixture", "graphql-schema-dump"]
+jest-snapshot-vue3:
+ extends:
+ - .jest-base
+ - .frontend:rules:jest-snapshot
+ needs: ["rspec-all frontend_fixture"]
+ variables:
+ VUE_VERSION: 3
+ JEST_REPORT: jest-test-report.json
+ SNAPSHOT_TEST_REPORT: jest-snapshot-test-report.json
+ script:
+ - |
+ yarn jest:snapshots --ci --json --outputFile="${JEST_REPORT}" || echo 'Proceed to parsing test report...'
+ echo $(ruby -rjson -e 'puts JSON.generate(JSON.parse(File.read(ENV["JEST_REPORT"])).dig("snapshot"))') > "${SNAPSHOT_TEST_REPORT}"
+
+ echo " ============= snapshot test report start =============="
+ cat "${SNAPSHOT_TEST_REPORT}"
+ echo " ============= snapshot test report end ================"
+
+ snapshot_test_failed=$(ruby -rjson -e 'puts JSON.parse(File.read(ENV["SNAPSHOT_TEST_REPORT"])).dig("failure")')
+ if [[ "${snapshot_test_failed}" == "true" ]]
+ then
+ echo "You have failed snapshot tests! Exiting 1..."
+ exit 1
+ else
+ echo 'All snapshot tests passed! Exiting 0...'
+ exit 0
+ fi
+
+ artifacts:
+ name: snapshot_tests
+ expire_in: 31d
+ when: always
+ paths:
+ - jest-snapshot-test-match.json
+ - jest-snapshot-test-report.json
+
coverage-frontend:
extends:
- .default-retry
diff --git a/.gitlab/ci/gitlab-com/danger-review.gitlab-ci.yml b/.gitlab/ci/gitlab-com/danger-review.gitlab-ci.yml
index 8328051f1a0..ad7cc2f44c0 100644
--- a/.gitlab/ci/gitlab-com/danger-review.gitlab-ci.yml
+++ b/.gitlab/ci/gitlab-com/danger-review.gitlab-ci.yml
@@ -1,6 +1,6 @@
include:
- project: gitlab-org/quality/pipeline-common
- ref: 7.10.3
+ ref: 8.2.0
file:
- /ci/danger-review.yml
diff --git a/.gitlab/ci/gitlab-gems.gitlab-ci.yml b/.gitlab/ci/gitlab-gems.gitlab-ci.yml
index cc8a058d354..802ad9a5a8a 100644
--- a/.gitlab/ci/gitlab-gems.gitlab-ci.yml
+++ b/.gitlab/ci/gitlab-gems.gitlab-ci.yml
@@ -19,7 +19,7 @@ include:
gem_name: "ipynbdiff"
- local: .gitlab/ci/templates/gem.gitlab-ci.yml
inputs:
- gem_name: "rspec_flaky"
+ gem_name: "gitlab-rspec_flaky"
- local: .gitlab/ci/templates/gem.gitlab-ci.yml
inputs:
gem_name: "gitlab-safe_request_store"
@@ -32,3 +32,12 @@ include:
- local: .gitlab/ci/templates/gem.gitlab-ci.yml
inputs:
gem_name: "gitlab-backup-cli"
+ - local: .gitlab/ci/templates/gem.gitlab-ci.yml
+ inputs:
+ gem_name: "gitlab-secret_detection"
+ - local: .gitlab/ci/templates/gem.gitlab-ci.yml
+ inputs:
+ gem_name: "gitlab-database-load_balancing"
+ - local: .gitlab/ci/templates/gem.gitlab-ci.yml
+ inputs:
+ gem_name: "gitlab-database-lock_retries"
diff --git a/.gitlab/ci/global.gitlab-ci.yml b/.gitlab/ci/global.gitlab-ci.yml
index 37d91fae595..dc006a3ce24 100644
--- a/.gitlab/ci/global.gitlab-ci.yml
+++ b/.gitlab/ci/global.gitlab-ci.yml
@@ -278,7 +278,7 @@
.zoekt-services:
services:
- - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.2
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.5
alias: zoekt-ci-image
.use-pg13:
@@ -468,7 +468,6 @@
services:
- docker:${DOCKER_VERSION}-dind
variables:
- DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://docker:2375
DOCKER_TLS_CERTDIR: ""
tags:
diff --git a/.gitlab/ci/package-and-test/main.gitlab-ci.yml b/.gitlab/ci/package-and-test/main.gitlab-ci.yml
index 21dd8f957d4..afd66a36b0a 100644
--- a/.gitlab/ci/package-and-test/main.gitlab-ci.yml
+++ b/.gitlab/ci/package-and-test/main.gitlab-ci.yml
@@ -30,19 +30,6 @@ download-fast-quarantine-report:
- .download-fast-quarantine-report
- .rules:download-fast-quarantine-report
-cache-gems:
- extends:
- - .qa-install
- - .ruby-image
- - .rules:update-cache
- stage: .pre
- tags:
- - e2e
- script:
- - echo "Populated qa cache"
- cache:
- policy: pull-push
-
# ==========================================
# Test stage
# ==========================================
@@ -76,8 +63,8 @@ instance-ff-inverse:
- .parallel
variables:
QA_SCENARIO: Test::Instance::Image
- QA_KNAPSACK_REPORT_NAME: ee-instance
- GITLAB_QA_OPTS: --set-feature-flags $QA_FEATURE_FLAGS
+ QA_KNAPSACK_REPORT_NAME: instance
+ QA_FEATURE_FLAGS: $FEATURE_FLAGS
rules:
- !reference [.rules:test:feature-flags-set, rules]
@@ -167,7 +154,7 @@ decomposition-single-db:
- .parallel
variables:
QA_SCENARIO: Test::Instance::Image
- GITLAB_QA_OPTS: --omnibus-config decomposition_single_db $EXTRA_GITLAB_QA_OPTS
+ GITLAB_QA_OPTS: --omnibus-config decomposition_single_db
rules:
- !reference [.rules:test:smoke-for-omnibus-mr, rules]
- !reference [.rules:test:qa-parallel, rules]
@@ -177,7 +164,7 @@ decomposition-single-db-selective:
extends: .qa
variables:
QA_SCENARIO: Test::Instance::Image
- GITLAB_QA_OPTS: --omnibus-config decomposition_single_db $EXTRA_GITLAB_QA_OPTS
+ GITLAB_QA_OPTS: --omnibus-config decomposition_single_db
rules:
- !reference [.rules:test:qa-selective, rules]
- if: $QA_SUITES =~ /Test::Instance::All/
@@ -188,7 +175,7 @@ decomposition-single-db-selective-parallel:
- .parallel
variables:
QA_SCENARIO: Test::Instance::Image
- GITLAB_QA_OPTS: --omnibus-config decomposition_single_db $EXTRA_GITLAB_QA_OPTS
+ GITLAB_QA_OPTS: --omnibus-config decomposition_single_db
rules:
- !reference [.rules:test:qa-selective-parallel, rules]
- if: $QA_SUITES =~ /Test::Instance::All/
@@ -204,7 +191,7 @@ decomposition-multiple-db:
variables:
QA_SCENARIO: Test::Instance::Image
GITLAB_ALLOW_SEPARATE_CI_DATABASE: "true"
- GITLAB_QA_OPTS: --omnibus-config decomposition_multiple_db $EXTRA_GITLAB_QA_OPTS
+ GITLAB_QA_OPTS: --omnibus-config decomposition_multiple_db
rules:
- !reference [.rules:test:smoke-for-omnibus-mr, rules]
- !reference [.rules:test:qa-parallel, rules]
@@ -215,7 +202,7 @@ decomposition-multiple-db-selective:
variables:
QA_SCENARIO: Test::Instance::Image
GITLAB_ALLOW_SEPARATE_CI_DATABASE: "true"
- GITLAB_QA_OPTS: --omnibus-config decomposition_multiple_db $EXTRA_GITLAB_QA_OPTS
+ GITLAB_QA_OPTS: --omnibus-config decomposition_multiple_db
rules:
- !reference [.rules:test:qa-selective, rules]
- if: $QA_SUITES =~ /Test::Instance::All/
@@ -227,7 +214,7 @@ decomposition-multiple-db-selective-parallel:
variables:
QA_SCENARIO: Test::Instance::Image
GITLAB_ALLOW_SEPARATE_CI_DATABASE: "true"
- GITLAB_QA_OPTS: --omnibus-config decomposition_multiple_db $EXTRA_GITLAB_QA_OPTS
+ GITLAB_QA_OPTS: --omnibus-config decomposition_multiple_db
rules:
- !reference [.rules:test:qa-selective-parallel, rules]
- if: $QA_SUITES =~ /Test::Instance::All/
@@ -244,7 +231,7 @@ object-storage:
variables:
QA_SCENARIO: Test::Instance::Image
QA_RSPEC_TAGS: --tag object_storage
- GITLAB_QA_OPTS: --omnibus-config object_storage $EXTRA_GITLAB_QA_OPTS
+ GITLAB_QA_OPTS: --omnibus-config object_storage
rules:
- !reference [.rules:test:qa-parallel, rules]
- if: $QA_SUITES =~ /Test::Instance::ObjectStorage/
@@ -254,7 +241,7 @@ object-storage-selective:
variables:
QA_SCENARIO: Test::Instance::Image
QA_RSPEC_TAGS: --tag object_storage
- GITLAB_QA_OPTS: --omnibus-config object_storage $EXTRA_GITLAB_QA_OPTS
+ GITLAB_QA_OPTS: --omnibus-config object_storage
rules:
- !reference [.rules:test:qa-selective, rules]
- if: $QA_SUITES =~ /Test::Instance::ObjectStorage/
@@ -265,7 +252,7 @@ object-storage-selective-parallel:
variables:
QA_SCENARIO: Test::Instance::Image
QA_RSPEC_TAGS: --tag object_storage
- GITLAB_QA_OPTS: --omnibus-config object_storage $EXTRA_GITLAB_QA_OPTS
+ GITLAB_QA_OPTS: --omnibus-config object_storage
rules:
- !reference [.rules:test:qa-selective-parallel, rules]
- if: $QA_SUITES =~ /Test::Instance::ObjectStorage/
@@ -283,7 +270,7 @@ object-storage-aws:
AWS_S3_BUCKET_NAME: $QA_AWS_S3_BUCKET_NAME
AWS_S3_KEY_ID: $QA_AWS_S3_KEY_ID
AWS_S3_REGION: $QA_AWS_S3_REGION
- GITLAB_QA_OPTS: --omnibus-config object_storage_aws $EXTRA_GITLAB_QA_OPTS
+ GITLAB_QA_OPTS: --omnibus-config object_storage_aws
object-storage-aws-selective:
extends: object-storage-selective
@@ -292,7 +279,7 @@ object-storage-aws-selective:
AWS_S3_BUCKET_NAME: $QA_AWS_S3_BUCKET_NAME
AWS_S3_KEY_ID: $QA_AWS_S3_KEY_ID
AWS_S3_REGION: $QA_AWS_S3_REGION
- GITLAB_QA_OPTS: --omnibus-config object_storage_aws $EXTRA_GITLAB_QA_OPTS
+ GITLAB_QA_OPTS: --omnibus-config object_storage_aws
object-storage-aws-selective-parallel:
extends: object-storage-selective-parallel
@@ -301,7 +288,7 @@ object-storage-aws-selective-parallel:
AWS_S3_BUCKET_NAME: $QA_AWS_S3_BUCKET_NAME
AWS_S3_KEY_ID: $QA_AWS_S3_KEY_ID
AWS_S3_REGION: $QA_AWS_S3_REGION
- GITLAB_QA_OPTS: --omnibus-config object_storage_aws $EXTRA_GITLAB_QA_OPTS
+ GITLAB_QA_OPTS: --omnibus-config object_storage_aws
# ========== object-storage-gcs ===========
@@ -315,7 +302,7 @@ object-storage-gcs:
GOOGLE_PROJECT: $QA_GOOGLE_PROJECT
GOOGLE_JSON_KEY: $QA_GOOGLE_JSON_KEY
GOOGLE_CLIENT_EMAIL: $QA_GOOGLE_CLIENT_EMAIL
- GITLAB_QA_OPTS: --omnibus-config object_storage_gcs $EXTRA_GITLAB_QA_OPTS
+ GITLAB_QA_OPTS: --omnibus-config object_storage_gcs
object-storage-gcs-selective:
extends: object-storage-selective
@@ -324,7 +311,7 @@ object-storage-gcs-selective:
GOOGLE_PROJECT: $QA_GOOGLE_PROJECT
GOOGLE_JSON_KEY: $QA_GOOGLE_JSON_KEY
GOOGLE_CLIENT_EMAIL: $QA_GOOGLE_CLIENT_EMAIL
- GITLAB_QA_OPTS: --omnibus-config object_storage_gcs $EXTRA_GITLAB_QA_OPTS
+ GITLAB_QA_OPTS: --omnibus-config object_storage_gcs
object-storage-gcs-selective-parallel:
extends: object-storage-selective-parallel
@@ -333,7 +320,7 @@ object-storage-gcs-selective-parallel:
GOOGLE_PROJECT: $QA_GOOGLE_PROJECT
GOOGLE_JSON_KEY: $QA_GOOGLE_JSON_KEY
GOOGLE_CLIENT_EMAIL: $QA_GOOGLE_CLIENT_EMAIL
- GITLAB_QA_OPTS: --omnibus-config object_storage_gcs $EXTRA_GITLAB_QA_OPTS
+ GITLAB_QA_OPTS: --omnibus-config object_storage_gcs
# ------------------------------------------
# Non parallel jobs
@@ -371,10 +358,14 @@ oauth:
- .qa
- .failure-videos
variables:
- QA_SCENARIO: Test::Integration::OAuth
+ QA_SCENARIO: Test::Instance::Image
+ QA_GITLAB_HOSTNAME: "gitlab"
+ QA_GITLAB_USE_TLS: "true"
+ QA_RSPEC_TAGS: --tag oauth
+ GITLAB_QA_OPTS: --omnibus-config facebook_oauth --omnibus-config github_oauth
rules:
- !reference [.rules:test:qa-default-branch, rules]
- - if: $QA_SUITES =~ /Test::Integration::OAuth/
+ - if: $QA_SUITES =~ /Test::Instance::All/
- !reference [.rules:test:manual, rules]
instance-saml:
@@ -567,7 +558,7 @@ registry-object-storage-tls:
QA_SCENARIO: Test::Integration::RegistryTLS
QA_RSPEC_TAGS: ""
GITLAB_TLS_CERTIFICATE: $QA_GITLAB_TLS_CERTIFICATE
- GITLAB_QA_OPTS: --omnibus-config registry_object_storage $EXTRA_GITLAB_QA_OPTS
+ GITLAB_QA_OPTS: --omnibus-config registry_object_storage
importers:
extends:
@@ -593,7 +584,6 @@ update-minor:
QA_RSPEC_TAGS: --tag smoke
rules:
- !reference [.rules:test:update, rules]
- - if: $QA_SUITES =~ /Test::Instance::Smoke/
- !reference [.rules:test:manual, rules]
update-major:
@@ -605,7 +595,6 @@ update-major:
QA_RSPEC_TAGS: --tag smoke
rules:
- !reference [.rules:test:update, rules]
- - if: $QA_SUITES =~ /Test::Instance::Smoke/
- !reference [.rules:test:manual, rules]
update-ee-to-ce:
@@ -619,7 +608,6 @@ update-ee-to-ce:
rules:
- !reference [.rules:test:ce-only, rules]
- !reference [.rules:test:update, rules]
- - if: $QA_SUITES =~ /Test::Instance::Smoke/
- !reference [.rules:test:manual, rules]
# ==========================================
diff --git a/.gitlab/ci/preflight.gitlab-ci.yml b/.gitlab/ci/preflight.gitlab-ci.yml
index 6a2ea85f393..6723608d0db 100644
--- a/.gitlab/ci/preflight.gitlab-ci.yml
+++ b/.gitlab/ci/preflight.gitlab-ci.yml
@@ -44,7 +44,9 @@ rails-production-server-boot-puma-cng:
extends:
- .rails-production-server-boot
script:
- - curl --silent https://gitlab.com/gitlab-org/build/CNG/-/raw/master/gitlab-webservice/configuration/puma.rb > config/puma.rb
+ - define_trigger_branch_in_build_env
+ - echo "TRIGGER_BRANCH is defined as ${TRIGGER_BRANCH}"
+ - curl --silent "https://gitlab.com/gitlab-org/build/CNG/-/raw/${TRIGGER_BRANCH}/gitlab-webservice/configuration/puma.rb" > config/puma.rb
- sed --in-place "s:/srv/gitlab:${PWD}:" config/puma.rb
- bundle exec puma --environment production --config config/puma.rb &
- sleep 40 # See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114124#note_1309506358
@@ -75,5 +77,5 @@ qa:selectors:
qa:selectors-as-if-foss:
extends:
- qa:selectors
- - .qa:rules:as-if-foss
+ - .qa:rules:selectors-as-if-foss
- .as-if-foss
diff --git a/.gitlab/ci/qa-common/main.gitlab-ci.yml b/.gitlab/ci/qa-common/main.gitlab-ci.yml
index 487acbc9f03..836f1559264 100644
--- a/.gitlab/ci/qa-common/main.gitlab-ci.yml
+++ b/.gitlab/ci/qa-common/main.gitlab-ci.yml
@@ -5,16 +5,17 @@ workflow:
name: $PIPELINE_NAME
include:
- - component: "gitlab.com/gitlab-org/quality/pipeline-common/allure-report@8.0.0"
+ - component: "gitlab.com/gitlab-org/quality/pipeline-common/allure-report@8.2.0"
inputs:
job_name: "e2e-test-report"
job_stage: "report"
+ report_title: "E2E Test Result Summary"
aws_access_key_id_variable_name: "QA_ALLURE_AWS_ACCESS_KEY_ID"
aws_secret_access_key_variable_name: "QA_ALLURE_AWS_SECRET_ACCESS_KEY"
gitlab_auth_token_variable_name: "PROJECT_TOKEN_FOR_CI_SCRIPTS_API_USAGE"
allure_job_name: "${QA_RUN_TYPE}"
- project: gitlab-org/quality/pipeline-common
- ref: 7.10.2
+ ref: 8.2.0
file:
- /ci/base.gitlab-ci.yml
- /ci/knapsack-report.yml
@@ -68,7 +69,6 @@ stages:
QA_INTERCEPT_REQUESTS: "true"
GITLAB_LICENSE_MODE: test
GITLAB_QA_ADMIN_ACCESS_TOKEN: $QA_ADMIN_ACCESS_TOKEN
- GITLAB_QA_OPTS: $EXTRA_GITLAB_QA_OPTS
before_script:
- !reference [.qa-base, before_script]
# Prepend the file paths with the absolute path from inside the container since the files will be read from there
@@ -87,11 +87,11 @@ 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}/"
+ - bundle exec rake "knapsack:create_reports_for_selective"
+ after_script:
+ # when using qa-image, code runs in /home/gitlab/qa folder
+ - mkdir -p "$KNAPSACK_DIR" && cp /home/gitlab/qa/knapsack/*.json "${KNAPSACK_DIR}/"
allow_failure: true
artifacts:
paths:
@@ -167,6 +167,7 @@ stages:
stage: notify
variables:
QA_RSPEC_XML_FILE_PATTERN: "${CI_PROJECT_DIR}/gitlab-qa-run-*/**/rspec-*.xml"
+ GITLAB_API_TOKEN: $PROJECT_TOKEN_FOR_CI_SCRIPTS_API_USAGE
SLACK_ICON_EMOJI: ci_failing
STATUS_SYM: ☠️
STATUS: failed
diff --git a/.gitlab/ci/qa-common/rules.gitlab-ci.yml b/.gitlab/ci/qa-common/rules.gitlab-ci.yml
index 7fa66fa4384..31f84441926 100644
--- a/.gitlab/ci/qa-common/rules.gitlab-ci.yml
+++ b/.gitlab/ci/qa-common/rules.gitlab-ci.yml
@@ -1,3 +1,6 @@
+include:
+ - local: .gitlab/ci/rules.gitlab-ci.yml
+
# Specific specs passed
.specs-specified: &specs-specified
if: $QA_TESTS != ""
@@ -8,16 +11,12 @@
# FF changes
.feature-flags-set: &feature-flags-set
- if: $QA_FEATURE_FLAGS =~ /enabled|disabled/
+ if: $FEATURE_FLAGS =~ /enabled|disabled/
# Specific specs specified
.spec-file-specified: &spec-file-specified
if: $QA_TESTS =~ /_spec\.rb/
-# code pattern changes
-.code-pattern-changes: &code-pattern-changes
- if: $MR_CODE_PATTERNS == "true"
-
# Specs directory specified
.spec-directory-specified: &spec-directory-specified
if: $QA_TESTS != "" && $QA_TESTS !~ /_spec\.rb/
@@ -34,7 +33,7 @@
# Run all tests when QA framework changes present, full suite execution is explicitly enabled or a feature flag file is removed
.qa-run-all-tests: &qa-run-all-tests
- if: $QA_FRAMEWORK_CHANGES == "true" || $QA_RUN_ALL_TESTS == "true" || $QA_RUN_ALL_E2E_LABEL == "true" || $QA_FEATURE_FLAGS =~ /deleted/
+ if: $QA_FRAMEWORK_CHANGES == "true" || $QA_RUN_ALL_TESTS == "true" || $QA_RUN_ALL_E2E_LABEL == "true" || $FEATURE_FLAGS =~ /deleted/
# Run job when MR has pipeline:run-all-e2e label
.qa-run-all-e2e-label: &qa-run-all-e2e-label
@@ -64,10 +63,6 @@
rules:
- when: always
-.rules:update-cache:
- rules:
- - if: '$UPDATE_QA_CACHE == "true"'
-
.rules:download-knapsack:
rules:
- when: always
@@ -151,11 +146,10 @@
# these jobs need gitlab version because we can't reliably detect it from just the image
- if: $GITLAB_SEMVER_VERSION !~ /^\d+\.\d+\.\d+/
when: never
- # $QA_SUPER_SIDEBAR_ENABLED is now only present as a variable when testing old nav so we skip update jobs
- # in pipeline where it is explicitly disabled
- - if: $QA_SUPER_SIDEBAR_ENABLED
- when: never
- - !reference [.rules:test:qa, rules]
+ # update jobs are only relevant in testing app updates that can be affected by code changes only
+ # by checking code patterns, skip running job on changes that can't affect the outcome
+ - !reference [.qa:rules:code-merge-request, rules]
+ - *default-branch
.rules:test:never-schedule-pipeline:
rules:
diff --git a/.gitlab/ci/qa-common/variables.gitlab-ci.yml b/.gitlab/ci/qa-common/variables.gitlab-ci.yml
index a449d960cff..bc756b6808a 100644
--- a/.gitlab/ci/qa-common/variables.gitlab-ci.yml
+++ b/.gitlab/ci/qa-common/variables.gitlab-ci.yml
@@ -6,9 +6,9 @@ variables:
REGISTRY_GROUP: "gitlab-org"
ALLURE_JOB_NAME: $CI_PROJECT_NAME
COLORIZED_LOGS: "true"
+ FEATURE_FLAGS: ""
QA_LOG_LEVEL: "info"
QA_TESTS: ""
- QA_FEATURE_FLAGS: ""
# run all tests by default when package-and-test is included natively in other projects
# this will be overridden when selective test execution is used in gitlab canonical project
QA_RUN_ALL_TESTS: "true"
diff --git a/.gitlab/ci/qa.gitlab-ci.yml b/.gitlab/ci/qa.gitlab-ci.yml
index 7c72c301aef..d26df15412f 100644
--- a/.gitlab/ci/qa.gitlab-ci.yml
+++ b/.gitlab/ci/qa.gitlab-ci.yml
@@ -53,24 +53,21 @@ qa:internal-as-if-foss:
- .qa:rules:internal-as-if-foss
- .as-if-foss
-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:update-qa-cache:
+cache-qa-gems:
extends:
- .qa-job-base
- .qa-cache-push
- - .shared:rules:update-cache
+ - .qa:rules:update-gem-cache
stage: prepare
script:
- echo "Cache has been updated and ready to be uploaded."
+# E2E runners have separate infra setup and different cache bucket
+cache-qa-gems-e2e-runners:
+ extends: cache-qa-gems
+ tags:
+ - e2e
+
trigger-omnibus:
stage: qa
extends:
diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml
index 385b0e8b68b..7efcc4b58a3 100644
--- a/.gitlab/ci/rails.gitlab-ci.yml
+++ b/.gitlab/ci/rails.gitlab-ci.yml
@@ -305,6 +305,20 @@ rspec-ee unit clickhouse:
- .rspec-base-pg14-clickhouse23
- .rails:rules:clickhouse-changes
+gitlab:clickhouse:rollback:main:
+ extends:
+ - .rspec-base
+ - .production # Disable webmock from test environment
+ - .use-pg14-clickhouse23
+ - .rails:rules:clickhouse-changes
+ script:
+ - cp config/click_house.yml.example config/click_house.yml
+ - 'sed -i "s|url:.*$|url: http://clickhouse:8123|g" config/click_house.yml'
+ - 'sed -i "s|test:$|production:|g" config/click_house.yml'
+ - !reference [.base-script, script]
+ - bundle exec rake gitlab:clickhouse:migrate &&
+ bundle exec rake gitlab:clickhouse:rollback:main VERSION=0
+
gitlab:setup:
extends: .db-job-base
variables:
@@ -327,21 +341,13 @@ gitlab:setup:
# These intermediate jobs allow us to collect the artifacts of
# more than 50 jobs and still use `needs:` to ensure a timely execution
.artifact-collector:
+ extends: .base-artifacts
stage: post-test
variables:
GIT_STRATEGY: none
image: alpine:3.17
script:
- - mkdir -p coverage deprecations rspec auto_explain
- - ls coverage/ deprecations/ rspec/ auto_explain/
- artifacts:
- expire_in: 7d
- when: always
- paths:
- - coverage/
- - deprecations/
- - rspec/
- - auto_explain/
+ - ls -R
rspec:artifact-collector unit:
extends:
@@ -751,41 +757,54 @@ rspec system pg14-as-if-foss clusterwide-db:
- .clusterwide-db
- .rails:rules:clusterwide-db
-rspec-ee unit gitlab-duo-chat pg14:
+.rspec-ee-base-gitlab-duo:
+ extends:
+ - .rspec-ee-base-pg14
variables:
REAL_AI_REQUEST: "true"
- RSPEC_RETRY_RETRY_COUNT: 0
+
+rspec-ee unit gitlab-duo-chat-zeroshot pg14:
extends:
- - .rspec-ee-base-pg14
- - .rails:rules:ee-gitlab-duo-chat-base
- parallel:
- matrix:
- - DUO_RSPEC: ["lib/gitlab/llm/chain/agents/zero_shot/executor_real_requests_spec.rb", "support_specs/helpers/chat_qa_evaluation_helpers_spec.rb"]
+ - .rspec-ee-base-gitlab-duo
+ - .rails:rules:ee-gitlab-duo-chat-optional
+ script:
+ - !reference [.base-script, script]
+ - rspec_parallelized_job "--tag zeroshot_executor"
+
+rspec-ee unit gitlab-duo-chat-qa-fast pg14:
+ extends:
+ - .rspec-ee-base-gitlab-duo
+ - .rails:rules:ee-gitlab-duo-chat-always
script:
- !reference [.base-script, script]
- - bundle exec rspec -Ispec -rspec_helper --failure-exit-code 0 --tag real_ai_request --color -- ee/spec/${DUO_RSPEC}
+ - rspec_parallelized_job "--tag fast_chat_qa_evaluation"
+
+rspec-ee unit gitlab-duo pg14:
+ extends:
+ - .rspec-ee-base-gitlab-duo
+ - .rails:rules:ee-gitlab-duo-chat-always
+ script:
+ - !reference [.base-script, script]
+ - rspec_parallelized_job "--tag gitlab_duo"
rspec-ee unit gitlab-duo-chat-qa pg14:
variables:
- REAL_AI_REQUEST: "true"
+ QA_EVAL_REPORT_FILENAME: "qa_evaluation_report.md"
RSPEC_RETRY_RETRY_COUNT: 0
extends:
- - .rspec-ee-base-pg14
- - .rails:rules:ee-gitlab-duo-chat-base
- parallel:
- matrix:
- - DUO_RSPEC: ["qa_epic_spec.rb", "qa_issue_spec.rb"]
+ - .rspec-ee-base-gitlab-duo
+ - .rails:rules:ee-gitlab-duo-chat-qa-full
script:
- !reference [.base-script, script]
- source ./scripts/utils.sh
- install_gitlab_gem
- - bundle exec rspec -Ispec -rspec_helper --failure-exit-code 0 --tag real_ai_request --color -- ee/spec/lib/gitlab/llm/chain/agents/zero_shot/${DUO_RSPEC}
+ - bundle exec rspec -Ispec -rspec_helper --failure-exit-code 0 --color --tag chat_qa_evaluation -- ee/spec/lib/gitlab/llm/chain/agents/zero_shot/qa_evaluation_spec.rb
- ./scripts/duo_chat/reporter.rb
artifacts:
expire_in: 5d
paths:
- tmp/duo_chat/qa*.json
- - "${DUO_RSPEC}.md"
+ - "${QA_EVAL_REPORT_FILENAME}"
rspec-ee migration pg14:
extends:
diff --git a/.gitlab/ci/rails/rspec-foss-impact.gitlab-ci.yml.erb b/.gitlab/ci/rails/rspec-foss-impact.gitlab-ci.yml.erb
index 4584cba0282..8a36848b363 100644
--- a/.gitlab/ci/rails/rspec-foss-impact.gitlab-ci.yml.erb
+++ b/.gitlab/ci/rails/rspec-foss-impact.gitlab-ci.yml.erb
@@ -39,7 +39,7 @@ dont-interrupt-me:
RSPEC_TESTS_MAPPING_ENABLED: "true"
script:
- !reference [.base-script, script]
- - rspec_paralellized_job "--fail-fast=${RSPEC_FAIL_FAST_THRESHOLD} --tag ~quarantine --tag ~level:background_migration --tag ~zoekt --tag ~click_house"
+ - rspec_parallelized_job "--fail-fast=${RSPEC_FAIL_FAST_THRESHOLD} --tag ~quarantine --tag ~level:background_migration --tag ~zoekt --tag ~click_house"
artifacts:
expire_in: 7d
paths:
@@ -54,7 +54,7 @@ rspec migration foss-impact:
<% end %>
script:
- !reference [.base-script, script]
- - rspec_paralellized_job "--fail-fast=${RSPEC_FAIL_FAST_THRESHOLD} --tag ~quarantine --tag ~zoekt --tag ~click_house"
+ - rspec_parallelized_job "--fail-fast=${RSPEC_FAIL_FAST_THRESHOLD} --tag ~quarantine --tag ~zoekt --tag ~click_house"
<% end %>
<% if rspec_files_per_test_level[:background_migration][:files].size > 0 %>
diff --git a/.gitlab/ci/rails/shared.gitlab-ci.yml b/.gitlab/ci/rails/shared.gitlab-ci.yml
index 6046c672f7b..3194ac0c26f 100644
--- a/.gitlab/ci/rails/shared.gitlab-ci.yml
+++ b/.gitlab/ci/rails/shared.gitlab-ci.yml
@@ -67,6 +67,7 @@ include:
RECORD_DEPRECATIONS: "true"
GEO_SECONDARY_PROXY: 0
SUCCESSFULLY_RETRIED_TEST_EXIT_CODE: 137
+ EVENT_PROF: "sql.active_record"
needs:
- job: "setup-test-env"
- job: "retrieve-tests-metadata"
@@ -79,18 +80,33 @@ include:
# spec/lib, yet background migration tests are also sitting there,
# and they should run on their own jobs so we don't need to run them
# in unit tests again.
- - rspec_paralellized_job "--fail-fast=${RSPEC_FAIL_FAST_THRESHOLD} --tag ~quarantine --tag ~level:background_migration --tag ~click_house --tag ~real_ai_request"
+ - rspec_parallelized_job "--fail-fast=${RSPEC_FAIL_FAST_THRESHOLD} --tag ~quarantine --tag ~level:background_migration --tag ~click_house --tag ~real_ai_request"
after_script:
- echo -e "\e[0Ksection_start:`date +%s`:report_results_section[collapsed=true]\r\e[0KReport results"
+ - bundle exec gem list gitlab_quality-test_tooling
- |
if [ "$CREATE_RAILS_TEST_FAILURE_ISSUES" == "true" ]; then
- bundle exec relate-failure-issue --input-files "rspec/rspec-*.json" --system-log-files "log" --project "gitlab-org/gitlab" --token "${TEST_FAILURES_PROJECT_TOKEN}" --related-issues-file "rspec/${CI_JOB_ID}-failed-test-issues.json";
+ bundle exec relate-failure-issue \
+ --token "${TEST_FAILURES_PROJECT_TOKEN}" \
+ --project "gitlab-org/gitlab" \
+ --input-files "rspec/rspec-*.json" \
+ --exclude-labels-for-search "QA,rspec:slow test" \
+ --system-log-files "log" \
+ --related-issues-file "rspec/${CI_JOB_ID}-failed-test-issues.json";
fi
if [ "$CREATE_RAILS_SLOW_TEST_ISSUES" == "true" ]; then
- bundle exec slow-test-issues --input-files "rspec/rspec-*.json" --project "gitlab-org/gitlab" --token "${TEST_FAILURES_PROJECT_TOKEN}" --related-issues-file "rspec/${CI_JOB_ID}-slow-test-issues.json";
+ bundle exec slow-test-issues \
+ --token "${TEST_FAILURES_PROJECT_TOKEN}" \
+ --project "gitlab-org/gitlab" \
+ --input-files "rspec/rspec-*.json" \
+ --related-issues-file "rspec/${CI_JOB_ID}-slow-test-issues.json";
fi
if [ "$ADD_SLOW_TEST_NOTE_TO_MERGE_REQUEST" == "true" ]; then
- bundle exec slow-test-merge-request-report-note --input-files "rspec/rspec-*.json" --project "gitlab-org/gitlab" --merge_request_iid "$CI_MERGE_REQUEST_IID" --token "${TEST_SLOW_NOTE_PROJECT_TOKEN}";
+ bundle exec slow-test-merge-request-report-note \
+ --token "${TEST_SLOW_NOTE_PROJECT_TOKEN}" \
+ --project "gitlab-org/gitlab" \
+ --input-files "rspec/rspec-*.json" \
+ --merge_request_iid "$CI_MERGE_REQUEST_IID";
fi
- echo -e "\e[0Ksection_end:`date +%s`:report_results_section\r\e[0K"
- tooling/bin/push_job_metrics || true
@@ -117,7 +133,7 @@ include:
.rspec-base-migration:
script:
- !reference [.base-script, script]
- - rspec_paralellized_job "--fail-fast=${RSPEC_FAIL_FAST_THRESHOLD} --tag ~quarantine --tag ~zoekt --tag ~click_house"
+ - rspec_parallelized_job "--fail-fast=${RSPEC_FAIL_FAST_THRESHOLD} --tag ~quarantine --tag ~zoekt --tag ~click_house"
after_script:
- !reference [.rspec-base, after_script]
@@ -139,7 +155,7 @@ include:
- cp config/click_house.yml.example config/click_house.yml
- 'sed -i "s|url:.*$|url: http://clickhouse:8123|g" config/click_house.yml'
- !reference [.base-script, script]
- - rspec_paralellized_job "--fail-fast=${RSPEC_FAIL_FAST_THRESHOLD} --tag click_house"
+ - rspec_parallelized_job "--fail-fast=${RSPEC_FAIL_FAST_THRESHOLD} --tag click_house"
.rspec-base-pg14-as-if-foss:
extends:
diff --git a/.gitlab/ci/release-environments.gitlab-ci.yml b/.gitlab/ci/release-environments.gitlab-ci.yml
index 24eca1caf4c..2e0164caf36 100644
--- a/.gitlab/ci/release-environments.gitlab-ci.yml
+++ b/.gitlab/ci/release-environments.gitlab-ci.yml
@@ -20,4 +20,7 @@ start-release-environments-pipeline:
PARENT_PIPELINE_ID: $CI_PIPELINE_ID
trigger:
strategy: depend
- include: .gitlab/ci/release-environments/main.gitlab-ci.yml
+ include:
+ - project: 'gitlab-org/gitlab'
+ ref: 'master'
+ file: '.gitlab/ci/release-environments/main.gitlab-ci.yml'
diff --git a/.gitlab/ci/reports.gitlab-ci.yml b/.gitlab/ci/reports.gitlab-ci.yml
index 0290d0158b6..2e963b7857a 100644
--- a/.gitlab/ci/reports.gitlab-ci.yml
+++ b/.gitlab/ci/reports.gitlab-ci.yml
@@ -80,7 +80,7 @@ gemnasium-python-dependency_scanning:
extends: .default-retry
stage: test
image:
- name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/security-products/package-hunter-cli:v2.1.0@sha256:1f1d31fdc81f6cf0ee305ff0291bfb56f22c5764fe042948ff1676f2f8c60352
+ name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/security-products/package-hunter-cli:v3.0.0@sha256:e281525b3be870d6618b6bad2685733dcb9908e4eb21f0e5b4fe4bb6f6083f91
entrypoint: [""]
variables:
HTR_user: '$PACKAGE_HUNTER_USER'
diff --git a/.gitlab/ci/review-apps/main.gitlab-ci.yml b/.gitlab/ci/review-apps/main.gitlab-ci.yml
index dfcd65238ec..a4d8d8672bb 100644
--- a/.gitlab/ci/review-apps/main.gitlab-ci.yml
+++ b/.gitlab/ci/review-apps/main.gitlab-ci.yml
@@ -67,7 +67,7 @@ review-build-cng:
GITLAB_IMAGE_REPOSITORY: "registry.gitlab.com/gitlab-org/build/cng-mirror"
GITLAB_IMAGE_SUFFIX: "ee"
GITLAB_REVIEW_APP_BASE_CONFIG_FILE: "scripts/review_apps/base-config.yaml"
- GITLAB_HELM_CHART_REF: "db886740f66e8dfacd7b9f0f79f640c8c2e0318a" # 7.5.1: https://gitlab.com/gitlab-org/charts/gitlab/-/commit/db886740f66e8dfacd7b9f0f79f640c8c2e0318a
+ GITLAB_HELM_CHART_REF: "eace227d3465e17e37b1a2e3764dd244c8e2d716" # 7.6.1: https://gitlab.com/gitlab-org/charts/gitlab/-/commit/eace227d3465e17e37b1a2e3764dd244c8e2d716
environment:
name: review/${CI_COMMIT_REF_SLUG}${SCHEDULE_TYPE} # No separator for SCHEDULE_TYPE so it's compatible as before and looks nice without it
url: https://gitlab-${CI_ENVIRONMENT_SLUG}.${REVIEW_APPS_DOMAIN}
@@ -150,7 +150,7 @@ review-deploy-sample-projects:
.review-stop-base:
extends: .review-workflow-base
- timeout: 15min
+ timeout: 30min
environment:
action: stop
variables:
diff --git a/.gitlab/ci/review-apps/qa.gitlab-ci.yml b/.gitlab/ci/review-apps/qa.gitlab-ci.yml
index 264763c882f..6030db7264d 100644
--- a/.gitlab/ci/review-apps/qa.gitlab-ci.yml
+++ b/.gitlab/ci/review-apps/qa.gitlab-ci.yml
@@ -30,6 +30,8 @@ include:
needs:
- review-deploy
- download-knapsack-report
+ - pipeline: $PARENT_PIPELINE_ID
+ job: retrieve-tests-metadata
variables:
GIT_LFS_SKIP_SMUDGE: 1
WD_INSTALL_DIR: /usr/local/bin
diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml
index 7b160a0efb5..165c2159bdf 100644
--- a/.gitlab/ci/rules.gitlab-ci.yml
+++ b/.gitlab/ci/rules.gitlab-ci.yml
@@ -45,10 +45,10 @@
if: '($CI_MERGE_REQUEST_EVENT_TYPE == "merged_result" || $CI_MERGE_REQUEST_EVENT_TYPE == "detached") && $CI_MERGE_REQUEST_LABELS =~ /pipeline:mr-approved/'
.if-merge-request-approved-and-specific-devops-stage: &if-merge-request-approved-and-specific-devops-stage
- if: '($CI_MERGE_REQUEST_EVENT_TYPE == "merged_result" || $CI_MERGE_REQUEST_EVENT_TYPE == "detached") && ($CI_MERGE_REQUEST_LABELS =~ /pipeline:mr-approved/ && $CI_MERGE_REQUEST_LABELS =~ /devops::(create|govern|manage)/)'
+ if: '($CI_MERGE_REQUEST_EVENT_TYPE == "merged_result" || $CI_MERGE_REQUEST_EVENT_TYPE == "detached") && ($CI_MERGE_REQUEST_LABELS =~ /pipeline:mr-approved/ && $CI_MERGE_REQUEST_LABELS =~ /devops::(create|govern|manage|plan|verify|package)/)'
.if-merge-request-and-specific-devops-stage: &if-merge-request-and-specific-devops-stage
- if: '($CI_MERGE_REQUEST_EVENT_TYPE == "merged_result" || $CI_MERGE_REQUEST_EVENT_TYPE == "detached") && $CI_MERGE_REQUEST_LABELS =~ /devops::(create|govern|manage)/'
+ if: '($CI_MERGE_REQUEST_EVENT_TYPE == "merged_result" || $CI_MERGE_REQUEST_EVENT_TYPE == "detached") && $CI_MERGE_REQUEST_LABELS =~ /devops::(create|govern|manage|plan|verify|package)/'
.if-merge-request-not-approved: &if-merge-request-not-approved
if: '($CI_MERGE_REQUEST_EVENT_TYPE == "merged_result" || $CI_MERGE_REQUEST_EVENT_TYPE == "detached") && $CI_MERGE_REQUEST_LABELS !~ /pipeline:mr-approved/'
@@ -372,6 +372,7 @@
.ai-patterns: &ai-patterns
- "{,ee/,jh/}lib/gitlab/llm/**/*"
- "{,ee/,jh/}{,spec/}lib/gitlab/llm/**/*"
+ - "{,ee/,jh/}lib/gitlab/duo/**/*"
# DB patterns + .ci-patterns
.db-patterns: &db-patterns
@@ -418,6 +419,12 @@
- ".dockerignore"
- "{,jh/}qa/**/*"
+# Frontend view patterns + .qa-patterns
+.frontend-qa-patterns: &frontend-qa-patterns
+ - "{,ee/,jh/}{app/assets,app/components,app/helpers,app/presenters,app/views}/**/*"
+ # QA changes
+ - "{,jh/}qa/**/*"
+
# Code patterns + .ci-patterns
.code-patterns: &code-patterns
- "{package.json,yarn.lock}"
@@ -905,6 +912,7 @@
variables:
ARCH: amd64,arm64
- <<: *if-ruby3_1-branch
+ - !reference [".releases:rules:canonical-dot-com-gitlab-stable-branch-only-setup-test-env-patterns", rules]
.build-images:rules:build-qa-image-as-if-foss:
rules:
@@ -1390,6 +1398,26 @@
changes: *frontend-build-patterns
allow_failure: true
+.frontend:rules:jest-snapshot:
+ rules:
+ - <<: *if-merge-request-labels-pipeline-expedite
+ when: never
+ - <<: *if-fork-merge-request
+ when: never
+ - <<: *if-merge-request-labels-run-all-jest
+ when: manual
+ allow_failure: true
+ - <<: *if-merge-request-labels-frontend-and-feature-flag
+ when: manual
+ allow_failure: true
+ - <<: *if-merge-request
+ changes: *frontend-dependency-patterns
+ when: manual
+ allow_failure: true
+ - <<: *if-merge-request
+ changes: [".gitlab/ci/rules.gitlab-ci.yml", ".gitlab/ci/frontend.gitlab-ci.yml"]
+ allow_failure: true
+
################
# Memory rules #
################
@@ -1423,6 +1451,16 @@
############
# QA rules #
############
+.qa:rules:update-gem-cache:
+ rules:
+ - if: '$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_REF_NAME =~ /^[\d-]+-stable(-ee)?$/ || $CI_COMMIT_REF_NAME =~ /^\d+-\d+-auto-deploy-\d+$/ || $CI_COMMIT_REF_NAME =~ /^security\//'
+ changes:
+ - qa/Gemfile.lock
+ - <<: *if-schedule-maintenance
+ - <<: *if-security-schedule
+ - <<: *if-foss-schedule
+ - <<: *if-merge-request-labels-update-caches
+
.qa:rules:code-merge-request-manual:
rules:
- <<: *if-merge-request
@@ -1430,6 +1468,11 @@
when: manual
allow_failure: true
+.qa:rules:code-merge-request:
+ rules:
+ - <<: *if-merge-request
+ changes: *code-patterns
+
.qa:rules:internal:
rules:
- <<: *if-default-refs
@@ -1440,11 +1483,11 @@
- <<: *if-default-refs
changes: *code-qa-patterns
-.qa:rules:as-if-foss:
+.qa:rules:selectors-as-if-foss:
rules:
- !reference [".strict-ee-only-rules", rules]
- - <<: *if-security-merge-request
- changes: *code-qa-patterns
+ - <<: *if-merge-request
+ changes: *frontend-qa-patterns
- <<: *if-merge-request-labels-as-if-foss
- <<: *if-merge-request-labels-run-all-rspec
@@ -1573,11 +1616,6 @@
changes: *ci-qa-patterns
allow_failure: true
- <<: *if-merge-request
- changes:
- - qa/Gemfile.lock # qa/Gemfile.lock is a part of *qa-patterns, so this rule must be placed before the one with *qa-patterns changes
- variables:
- UPDATE_QA_CACHE: "true"
- - <<: *if-merge-request
changes: *qa-patterns
allow_failure: true
- <<: *if-dot-com-gitlab-org-and-security-merge-request-and-qa-tests-specified
@@ -1616,11 +1654,6 @@
when: manual
- <<: *if-merge-request
changes: *nodejs-patterns
- - <<: *if-merge-request
- changes:
- - qa/Gemfile.lock # qa/Gemfile.lock is a part of *qa-patterns, so this rule must be placed before the one with *qa-patterns changes
- variables:
- UPDATE_QA_CACHE: "true"
- <<: *if-dot-com-gitlab-org-and-security-merge-request-and-qa-tests-specified
changes: *code-patterns
- <<: *if-merge-request
@@ -1637,7 +1670,6 @@
CREATE_TEST_FAILURE_ISSUES: "true"
PROCESS_TEST_RESULTS: "true"
KNAPSACK_GENERATE_REPORT: "true"
- UPDATE_QA_CACHE: "true"
QA_SAVE_TEST_METRICS: "true"
QA_EXPORT_TEST_METRICS: "false" # on main runs, metrics are exported to separate bucket via rake task for better consistency
@@ -2125,8 +2157,28 @@
when: never
- if: '$VERTEX_AI_CREDENTIALS == null'
when: never
+ - <<: *if-fork-merge-request
+ when: never
+
+.rails:rules:ee-gitlab-duo-chat-optional:
+ rules:
+ - !reference [".rails:rules:ee-gitlab-duo-chat-base", rules]
+ - <<: *if-merge-request
+ changes: *backend-patterns
+ when: manual
+ allow_failure: true
+
+.rails:rules:ee-gitlab-duo-chat-always:
+ rules:
+ - !reference [".rails:rules:ee-gitlab-duo-chat-base", rules]
- <<: *if-merge-request
changes: *ai-patterns
+
+.rails:rules:ee-gitlab-duo-chat-qa-full:
+ rules:
+ - !reference [".rails:rules:ee-gitlab-duo-chat-optional", rules]
+ - <<: *if-default-branch-refs
+ changes: *setup-test-env-patterns
when: manual
allow_failure: true
@@ -2335,6 +2387,7 @@
.rails:rules:clickhouse-changes:
rules:
+ - <<: *if-dot-com-ee-schedule-default-branch-maintenance
- <<: *if-merge-request
changes: *backend-patterns
@@ -2588,9 +2641,9 @@
when: never
- <<: *if-merge-request-labels-pipeline-expedite
when: never
+ - <<: *if-merge-request-labels-run-review-app
- if: '$CI_REVIEW_APPS_ENABLED != "true"'
when: never
- - <<: *if-merge-request-labels-run-review-app
- <<: *if-merge-request-not-approved
when: never
- <<: *if-dot-com-gitlab-org-merge-request
@@ -2801,6 +2854,8 @@
changes: *code-backstage-patterns
- <<: *if-default-refs
changes: *workhorse-patterns
+ - <<: *if-default-branch-refs
+ changes: *setup-test-env-patterns
- <<: *if-merge-request-labels-run-all-rspec
- <<: *if-merge-request-labels-frontend-and-feature-flag
- <<: *if-merge-request
diff --git a/.gitlab/ci/setup.gitlab-ci.yml b/.gitlab/ci/setup.gitlab-ci.yml
index cc5e9bd2985..a101901d57b 100644
--- a/.gitlab/ci/setup.gitlab-ci.yml
+++ b/.gitlab/ci/setup.gitlab-ci.yml
@@ -197,8 +197,7 @@ trigger-omnibus-env:
echo "NEXT_RUBY_VERSION=${NEXT_RUBY_VERSION}" >> $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
+ define_trigger_branch_in_build_env
- |
echo "Built environment file for omnibus build:"
cat $BUILD_ENV
diff --git a/.gitlab/ci/templates/gem.gitlab-ci.yml b/.gitlab/ci/templates/gem.gitlab-ci.yml
index 449150bde6c..3faf56daace 100644
--- a/.gitlab/ci/templates/gem.gitlab-ci.yml
+++ b/.gitlab/ci/templates/gem.gitlab-ci.yml
@@ -21,6 +21,7 @@ spec:
# Ensure dependency updates don't fail child pipelines: https://gitlab.com/gitlab-org/gitlab/-/issues/417428
- "Gemfile.lock"
- "gems/gem.gitlab-ci.yml"
+ - "gems/gem-pg.gitlab-ci.yml"
# Ensure new cop in the monolith don't break internal gems Rubocop checks: https://gitlab.com/gitlab-org/gitlab/-/issues/419915
- ".rubocop.yml"
- "rubocop/**/*"
diff --git a/.gitlab/ci/test-metadata.gitlab-ci.yml b/.gitlab/ci/test-metadata.gitlab-ci.yml
index 85d3ea11ac6..5ecacce339c 100644
--- a/.gitlab/ci/test-metadata.gitlab-ci.yml
+++ b/.gitlab/ci/test-metadata.gitlab-ci.yml
@@ -36,11 +36,13 @@ update-tests-metadata:
- rspec migration pg14
- rspec-all frontend_fixture
- rspec unit pg14
+ - rspec unit clickhouse
- rspec integration pg14
- rspec system pg14
- rspec background_migration pg14
- rspec-ee migration pg14
- rspec-ee unit pg14
+ - rspec-ee unit clickhouse
- rspec-ee integration pg14
- rspec-ee system pg14
- rspec-ee background_migration pg14
diff --git a/.gitlab/ci/test-on-gdk/main.gitlab-ci.yml b/.gitlab/ci/test-on-gdk/main.gitlab-ci.yml
index 2ce71062b25..b237a8f8d43 100644
--- a/.gitlab/ci/test-on-gdk/main.gitlab-ci.yml
+++ b/.gitlab/ci/test-on-gdk/main.gitlab-ci.yml
@@ -12,12 +12,6 @@ include:
.qa-run-all-tests: &qa-run-all-tests
if: $QA_FRAMEWORK_CHANGES == "true" || $QA_RUN_ALL_TESTS == "true" || $QA_RUN_ALL_E2E_LABEL == "true" || $QA_FEATURE_FLAGS =~ /deleted/
-variables:
- COLORIZED_LOGS: "true"
- GIT_DEPTH: "20"
- GIT_STRATEGY: "clone" # 'GIT_STRATEGY: clone' optimizes the pack-objects cache hit ratio
- GIT_SUBMODULE_STRATEGY: "none"
-
.rules:gdk:qa-selective:
rules:
- <<: *code-pattern-changes
@@ -27,9 +21,14 @@ variables:
.rules:gdk:qa-parallel:
rules:
- - *code-pattern-changes
+ - <<: *code-pattern-changes
+ variables:
+ QA_TESTS: ""
+ # To account for cases where a group label is set which may trigger selective execution
+ # But we want to execute full reliable suite on gdk in case of code-pattern-changes
- !reference [.rules:test:qa-parallel, rules]
- if: $QA_SUITES =~ /Test::Instance::Blocking/
+ - !reference [.rules:test:manual, rules]
.rules:gdk:qa-smoke:
rules:
@@ -40,6 +39,7 @@ variables:
variables:
QA_TESTS: ""
- if: $QA_SUITES =~ /Test::Instance::Smoke/
+ - !reference [.rules:test:manual, rules]
.gdk-qa-base:
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}:bundler-2.3-git-2.36-lfs-2.9-chrome-${CHROME_VERSION}-docker-${DOCKER_VERSION}-gcloud-383-kubectl-1.23
@@ -107,22 +107,6 @@ variables:
expire_in: 7 days
when: always
-download-knapsack-report:
- extends:
- - .download-knapsack-report
- - .rules:download-knapsack
-
-cache-gems:
- extends:
- - .ruby-image
- - .qa-cache-push
- - .rules:update-cache
- stage: .pre
- tags:
- - e2e
- script:
- - cd qa && bundle install
-
# Take the existing GDK docker image and reconfigure it with Postgres load
# balancing. Adding 5s lag to 1 of the replicas to validate robustness of
# the load balancer.
@@ -137,11 +121,31 @@ cache-gems:
gdk reconfigure &&\
gdk restart"
+# ==========================================
+# Pre stage
+# ==========================================
+# override .download-knapsack-report job to not depend on qa-image build
+download-knapsack-report:
+ extends:
+ - .download-knapsack-report
+ - .ruby-image
+ - .bundler-variables
+ - .qa-cache
+ - .rules:download-knapsack
+ variables:
+ GIT_STRATEGY: clone
+ before_script:
+ - cd qa && bundle install
+ after_script: []
+
download-fast-quarantine-report:
extends:
- .download-fast-quarantine-report
- .rules:download-fast-quarantine-report
+# ==========================================
+# Test stage
+# ==========================================
gdk-qa-smoke:
extends:
- .gdk-qa-base
@@ -215,13 +219,15 @@ gdk-qa-non-blocking:
QA_RUN_TYPE: gdk-qa-non-blocking
rules:
- when: manual
- allow_failure: true
+ allow_failure: true
# ==========================================
# Post test stage
# ==========================================
e2e-test-report:
extends: .rules:report:allure-report
+ variables:
+ ALLURE_REPORT_RESULTS_GLOB: "qa/tmp/allure-results"
upload-knapsack-report:
extends:
diff --git a/.gitlab/ci/vendored-gems.gitlab-ci.yml b/.gitlab/ci/vendored-gems.gitlab-ci.yml
index 915cca2dd29..b7dc35481c6 100644
--- a/.gitlab/ci/vendored-gems.gitlab-ci.yml
+++ b/.gitlab/ci/vendored-gems.gitlab-ci.yml
@@ -43,3 +43,7 @@ include:
inputs:
gem_name: "sidekiq-reliable-fetch"
gem_path_prefix: "vendor/gems/"
+ - local: .gitlab/ci/templates/gem.gitlab-ci.yml
+ inputs:
+ gem_name: "diff_match_patch"
+ gem_path_prefix: "vendor/gems/"
diff --git a/.gitlab/ci/workhorse.gitlab-ci.yml b/.gitlab/ci/workhorse.gitlab-ci.yml
index 29c7edebc4f..9aa0b349c16 100644
--- a/.gitlab/ci/workhorse.gitlab-ci.yml
+++ b/.gitlab/ci/workhorse.gitlab-ci.yml
@@ -33,7 +33,7 @@ workhorse:test go:
extends: .workhorse:test
parallel:
matrix:
- - GO_VERSION: ["1.19", "1.20", "1.21"]
+ - GO_VERSION: ["1.20", "1.21"]
REDIS_VERSION: ["7.0", "6.2"]
script:
- make -C workhorse test-coverage
@@ -47,7 +47,7 @@ workhorse:test fips:
extends: .workhorse:test
parallel:
matrix:
- - GO_VERSION: ["1.19", "1.20", "1.21"]
+ - GO_VERSION: ["1.20", "1.21"]
REDIS_VERSION: ["7.0", "6.2"]
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/ubi-${UBI_VERSION}-ruby-${RUBY_VERSION}-golang-${GO_VERSION}-rust-${RUST_VERSION}:rubygems-${RUBYGEMS_VERSION}-git-2.36-exiftool-12.60
variables: