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/as-if-jh.gitlab-ci.yml1
-rw-r--r--.gitlab/ci/build-images.gitlab-ci.yml27
-rw-r--r--.gitlab/ci/caching.gitlab-ci.yml2
-rw-r--r--.gitlab/ci/ci-templates.gitlab-ci.yml2
-rw-r--r--.gitlab/ci/cng/main.gitlab-ci.yml61
-rw-r--r--.gitlab/ci/database.gitlab-ci.yml3
-rw-r--r--.gitlab/ci/dev-fixtures.gitlab-ci.yml6
-rw-r--r--.gitlab/ci/docs.gitlab-ci.yml4
-rw-r--r--.gitlab/ci/frontend.gitlab-ci.yml14
-rw-r--r--.gitlab/ci/glfm.gitlab-ci.yml2
-rw-r--r--.gitlab/ci/global.gitlab-ci.yml133
-rw-r--r--.gitlab/ci/graphql.gitlab-ci.yml2
-rw-r--r--.gitlab/ci/memory.gitlab-ci.yml4
-rw-r--r--.gitlab/ci/notify.gitlab-ci.yml25
-rw-r--r--.gitlab/ci/package-and-test-nightly/main.gitlab-ci.yml112
-rw-r--r--.gitlab/ci/package-and-test/main.gitlab-ci.yml307
-rw-r--r--.gitlab/ci/preflight.gitlab-ci.yml28
-rw-r--r--.gitlab/ci/qa-common/main.gitlab-ci.yml124
-rw-r--r--.gitlab/ci/qa-common/rules.gitlab-ci.yml51
-rw-r--r--.gitlab/ci/qa-common/variables.gitlab-ci.yml1
-rw-r--r--.gitlab/ci/qa.gitlab-ci.yml93
-rw-r--r--.gitlab/ci/rails.gitlab-ci.yml592
-rw-r--r--.gitlab/ci/rails/rspec-foss-impact.gitlab-ci.yml.erb2
-rw-r--r--.gitlab/ci/rails/rspec-predictive.gitlab-ci.yml.erb4
-rw-r--r--.gitlab/ci/rails/shared.gitlab-ci.yml59
-rw-r--r--.gitlab/ci/release-environments/main.gitlab-ci.yml68
-rw-r--r--.gitlab/ci/reports.gitlab-ci.yml9
-rw-r--r--.gitlab/ci/review-apps/main.gitlab-ci.yml56
-rw-r--r--.gitlab/ci/review-apps/qa.gitlab-ci.yml48
-rw-r--r--.gitlab/ci/review.gitlab-ci.yml27
-rw-r--r--.gitlab/ci/rules.gitlab-ci.yml252
-rw-r--r--.gitlab/ci/setup.gitlab-ci.yml47
-rw-r--r--.gitlab/ci/static-analysis.gitlab-ci.yml4
-rw-r--r--.gitlab/ci/test-metadata.gitlab-ci.yml21
-rw-r--r--.gitlab/ci/test-on-gdk/main.gitlab-ci.yml189
-rw-r--r--.gitlab/ci/workhorse.gitlab-ci.yml4
36 files changed, 1488 insertions, 896 deletions
diff --git a/.gitlab/ci/as-if-jh.gitlab-ci.yml b/.gitlab/ci/as-if-jh.gitlab-ci.yml
index ae589ddfc2c..ec9acdb5d4d 100644
--- a/.gitlab/ci/as-if-jh.gitlab-ci.yml
+++ b/.gitlab/ci/as-if-jh.gitlab-ci.yml
@@ -16,6 +16,7 @@ add-jh-files:
- .as-if-jh:rules:prepare-as-if-jh
image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}ruby:${RUBY_VERSION}
stage: prepare
+ needs: []
before_script:
- source ./scripts/utils.sh
- source ./scripts/setup/as-if-jh.sh
diff --git a/.gitlab/ci/build-images.gitlab-ci.yml b/.gitlab/ci/build-images.gitlab-ci.yml
index b866446c6e0..1361f1fe412 100644
--- a/.gitlab/ci/build-images.gitlab-ci.yml
+++ b/.gitlab/ci/build-images.gitlab-ci.yml
@@ -29,33 +29,20 @@ build-qa-image as-if-foss:
- .as-if-foss
- .build-images:rules:build-qa-image-as-if-foss
-# Prepares an image with GDK configured based on code in master. This saves some time in MRs because some installation
-# and complilation will have already been performed.
-build-qa-on-gdk-master-image:
+build-gdk-image:
extends:
- .base-image-build-buildx
- - .build-images:rules:build-qa-on-gdk-master-image
+ - .build-images:rules:build-gdk-image
tags:
- - e2e
+ - high-cpu
stage: build-images
needs: []
- variables:
- QA_GDK_IMAGE: "${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-qa-gdk"
- before_script:
- - !reference [.use-buildx, before_script]
- - sysctl -n -w fs.inotify.max_user_watches=524288
script:
- - |
- docker buildx build \
- --cache-to=type=inline \
- --cache-from ${QA_GDK_IMAGE}:master \
- --platform=${ARCH:-amd64} \
- --add-host gdk.test:127.0.0.1 \
- --tag ${QA_GDK_IMAGE}:master \
- --file="qa/gdk/Dockerfile" \
- --push \
- ${CI_PROJECT_DIR}
+ - run_timed_command "scripts/build_gdk_image"
+# NOTE: release-tools verifies the presence on this job for a commit that is
+# candidate to an auto-deploy package. This job name can't be changed without
+# changing the code in release-tools.
build-assets-image:
extends:
- .base-image-build
diff --git a/.gitlab/ci/caching.gitlab-ci.yml b/.gitlab/ci/caching.gitlab-ci.yml
index 31975e481bc..ae4bb94b301 100644
--- a/.gitlab/ci/caching.gitlab-ci.yml
+++ b/.gitlab/ci/caching.gitlab-ci.yml
@@ -2,7 +2,7 @@ cache-workhorse:
extends:
- .default-retry
- .default-before_script
- - .rails-cache
+ - .ruby-cache
- .setup-test-env-cache
- .caching:rules:cache-workhorse
stage: prepare
diff --git a/.gitlab/ci/ci-templates.gitlab-ci.yml b/.gitlab/ci/ci-templates.gitlab-ci.yml
index c6681db9685..a00de8cb533 100644
--- a/.gitlab/ci/ci-templates.gitlab-ci.yml
+++ b/.gitlab/ci/ci-templates.gitlab-ci.yml
@@ -4,7 +4,7 @@ templates-shellcheck:
- .default-before_script
- .default-retry
- .ruby-cache
- - .use-pg14
+ - .use-pg15
stage: test
needs:
- setup-test-env
diff --git a/.gitlab/ci/cng/main.gitlab-ci.yml b/.gitlab/ci/cng/main.gitlab-ci.yml
new file mode 100644
index 00000000000..325b06d59cd
--- /dev/null
+++ b/.gitlab/ci/cng/main.gitlab-ci.yml
@@ -0,0 +1,61 @@
+---
+default:
+ interruptible: true
+
+stages:
+ - prepare
+ - deploy
+
+include:
+ - local: .gitlab/ci/global.gitlab-ci.yml
+
+review-build-cng-env:
+ image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}ruby:${RUBY_VERSION}-alpine3.16
+ stage: prepare
+ 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 CNG pipeline.
+ - pipeline: $PARENT_PIPELINE_ID
+ job: build-assets-image
+ variables:
+ BUILD_ENV: build.env
+ before_script:
+ - source ./scripts/utils.sh
+ - install_gitlab_gem
+ script:
+ - 'ruby -r./scripts/trigger-build.rb -e "puts Trigger.variables_for_env_file(Trigger::CNG.new.variables)" > $BUILD_ENV'
+ - echo "GITLAB_ASSETS_TAG=$(assets_image_tag)" >> $BUILD_ENV
+ - ruby -e 'puts "FULL_RUBY_VERSION=#{RUBY_VERSION}"' >> build.env
+ - cat $BUILD_ENV
+ artifacts:
+ reports:
+ dotenv: $BUILD_ENV
+ paths:
+ - $BUILD_ENV
+ expire_in: 7 days
+ when: always
+
+review-build-cng:
+ stage: prepare
+ inherit:
+ variables: false
+ variables:
+ GITLAB_REF_SLUG: "${GITLAB_REF_SLUG}"
+ # CNG pipeline specific variables
+ GITLAB_VERSION: "${GITLAB_VERSION}"
+ GITLAB_TAG: "${GITLAB_TAG}"
+ GITLAB_ASSETS_TAG: "${GITLAB_ASSETS_TAG}"
+ FORCE_RAILS_IMAGE_BUILDS: "${FORCE_RAILS_IMAGE_BUILDS}"
+ CE_PIPELINE: "${CE_PIPELINE}" # Based on https://docs.gitlab.com/ee/ci/jobs/job_control.html#check-if-a-variable-exists, `if: '$CE_PIPELINE'` will evaluate to `false` when this variable is empty
+ EE_PIPELINE: "${EE_PIPELINE}" # Based on https://docs.gitlab.com/ee/ci/jobs/job_control.html#check-if-a-variable-exists, `if: '$EE_PIPELINE'` will evaluate to `false` when this variable is empty
+ 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}"
+ GITALY_SERVER_VERSION: "${GITALY_SERVER_VERSION}"
+ RUBY_VERSION: "${FULL_RUBY_VERSION}"
+ trigger:
+ project: gitlab-org/build/CNG-mirror
+ branch: $TRIGGER_BRANCH
+ strategy: depend
diff --git a/.gitlab/ci/database.gitlab-ci.yml b/.gitlab/ci/database.gitlab-ci.yml
index 941cb9224fb..37befd78bb5 100644
--- a/.gitlab/ci/database.gitlab-ci.yml
+++ b/.gitlab/ci/database.gitlab-ci.yml
@@ -72,6 +72,7 @@ db:check-schema-single-db:
db:check-migrations:
extends:
- .db-job-base
+ - .use-pg13 # Should match the db same version used by GDK
- .rails:rules:ee-and-foss-mr-with-migration
script:
- git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME:$CI_MERGE_REQUEST_TARGET_BRANCH_NAME --depth 20
@@ -127,7 +128,7 @@ db:backup_and_restore:
script:
- . scripts/prepare_build.sh
- bundle exec rake db:drop db:create db:schema:load db:seed_fu
- - mkdir -p tmp/tests/public/uploads tmp/tests/{artifacts,pages,lfs-objects,terraform_state,registry,packages}
+ - mkdir -p tmp/tests/public/uploads tmp/tests/{artifacts,pages,lfs-objects,terraform_state,registry,packages,ci_secure_files}
- bundle exec rake gitlab:backup:create
- date
- bundle exec rake gitlab:backup:restore
diff --git a/.gitlab/ci/dev-fixtures.gitlab-ci.yml b/.gitlab/ci/dev-fixtures.gitlab-ci.yml
index 891a5dd79ad..642bad53772 100644
--- a/.gitlab/ci/dev-fixtures.gitlab-ci.yml
+++ b/.gitlab/ci/dev-fixtures.gitlab-ci.yml
@@ -1,9 +1,9 @@
.run-dev-fixtures:
extends:
- .default-retry
- - .rails-cache
+ - .ruby-cache
- .default-before_script
- - .use-pg13
+ - .use-pg14
stage: test
needs: ["setup-test-env"]
variables:
@@ -29,7 +29,7 @@ run-dev-fixtures-ee:
extends:
- .run-dev-fixtures
- .dev-fixtures:rules:ee-only
- - .use-pg13-es7-ee
+ - .use-pg14-es7-ee
script:
- cp ee/db/fixtures/development/* $FIXTURE_PATH
- *run-dev-fixtures-script
diff --git a/.gitlab/ci/docs.gitlab-ci.yml b/.gitlab/ci/docs.gitlab-ci.yml
index a52372a7bb4..6c426749af3 100644
--- a/.gitlab/ci/docs.gitlab-ci.yml
+++ b/.gitlab/ci/docs.gitlab-ci.yml
@@ -42,7 +42,7 @@ review-docs-cleanup:
docs-lint links:
extends:
- .docs:rules:docs-lint
- image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-docs/lint-html:alpine-3.17-ruby-3.2.1-f53af000
+ image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-docs/lint-html:alpine-3.17-ruby-3.2.2-c24946ab
stage: lint
needs: []
script:
@@ -116,7 +116,7 @@ docs-lint deprecations-and-removals:
SETUP_DB: "false"
extends:
- .default-retry
- - .rails-cache
+ - .ruby-cache
- .default-before_script
- .docs:rules:deprecations-and-removals
stage: lint
diff --git a/.gitlab/ci/frontend.gitlab-ci.yml b/.gitlab/ci/frontend.gitlab-ci.yml
index 708069d9b61..34c29a9e902 100644
--- a/.gitlab/ci/frontend.gitlab-ci.yml
+++ b/.gitlab/ci/frontend.gitlab-ci.yml
@@ -3,7 +3,7 @@
- .default-retry
- .default-before_script
- .assets-compile-cache
- image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}-node-16.14:rubygems-${RUBYGEMS_VERSION}-git-2.33-lfs-2.9-yarn-1.22-graphicsmagick-1.3.36
+ image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}-node-18.16:rubygems-${RUBYGEMS_VERSION}-git-2.33-lfs-2.9-yarn-1.22-graphicsmagick-1.3.36
variables:
SETUP_DB: "false"
WEBPACK_VENDOR_DLL: "true"
@@ -12,6 +12,7 @@
BROWSERSLIST_IGNORE_OLD_DATA: "true"
WEBPACK_COMPILE_LOG_PATH: "tmp/webpack-output.log"
stage: prepare
+ needs: []
script:
- yarn_install_script
- export GITLAB_ASSETS_HASH=$(bin/rake gitlab:assets:hash_sum)
@@ -109,6 +110,7 @@ retrieve-frontend-fixtures:
- .default-retry
- .frontend:rules:default-frontend-jobs
stage: prepare
+ needs: []
script:
- source scripts/utils.sh
- source scripts/gitlab_component_helpers.sh
@@ -128,8 +130,8 @@ retrieve-frontend-fixtures:
extends:
- .default-retry
- .default-before_script
- - .rails-cache
- - .use-pg13
+ - .ruby-cache
+ - .use-pg14
stage: fixtures
needs: ["setup-test-env", "retrieve-tests-metadata", "retrieve-frontend-fixtures"]
variables:
@@ -206,7 +208,7 @@ graphql-schema-dump:
SETUP_DB: "false"
extends:
- .default-retry
- - .rails-cache
+ - .ruby-cache
- .default-before_script
- .frontend:rules:default-frontend-jobs
stage: fixtures
@@ -260,7 +262,7 @@ jest:
- tmp/tests/frontend/
reports:
junit: junit_jest.xml
- parallel: 7
+ parallel: 12
jest predictive:
extends:
@@ -278,7 +280,7 @@ jest as-if-foss:
- .frontend:rules:jest:as-if-foss
- .as-if-foss
needs: ["rspec-all frontend_fixture as-if-foss"]
- parallel: 4
+ parallel: 10
jest predictive as-if-foss:
extends:
diff --git a/.gitlab/ci/glfm.gitlab-ci.yml b/.gitlab/ci/glfm.gitlab-ci.yml
index 008bb03de25..3f9ddaa791c 100644
--- a/.gitlab/ci/glfm.gitlab-ci.yml
+++ b/.gitlab/ci/glfm.gitlab-ci.yml
@@ -2,7 +2,7 @@ glfm-verify:
extends:
- .rails-job-base
- .glfm:rules:glfm-verify
- - .use-pg13
+ - .use-pg14
stage: test
needs: ["setup-test-env"]
script:
diff --git a/.gitlab/ci/global.gitlab-ci.yml b/.gitlab/ci/global.gitlab-ci.yml
index 4362269103b..b5578c25518 100644
--- a/.gitlab/ci/global.gitlab-ci.yml
+++ b/.gitlab/ci/global.gitlab-ci.yml
@@ -146,10 +146,6 @@
cache:
- *ruby-gems-cache
-.rails-cache:
- cache:
- - *ruby-gems-cache
-
.static-analysis-cache:
cache:
- *ruby-gems-cache
@@ -222,6 +218,8 @@
- name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-12-pgvector-0.4.1
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
alias: postgres
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12
+ alias: rediscluster # configure connections in config/redis.yml
- name: redis:6.0-alpine
variables:
POSTGRES_HOST_AUTH_METHOD: trust
@@ -232,6 +230,8 @@
- name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-13-pgvector-0.4.1
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
alias: postgres
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12
+ alias: rediscluster # configure connections in config/redis.yml
- name: redis:6.2-alpine
variables:
POSTGRES_HOST_AUTH_METHOD: trust
@@ -242,20 +242,36 @@
- name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-14-pgvector-0.4.1
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
alias: postgres
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12
+ alias: rediscluster # configure connections in config/redis.yml
- name: redis:6.2-alpine
variables:
POSTGRES_HOST_AUTH_METHOD: trust
PG_VERSION: "14"
+.use-pg15:
+ services:
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-15-pgvector-0.4.1
+ command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
+ alias: postgres
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12
+ alias: rediscluster # configure connections in config/redis.yml
+ - name: redis:6.2-alpine
+ variables:
+ POSTGRES_HOST_AUTH_METHOD: trust
+ PG_VERSION: "15"
+
.use-pg12-es7-ee:
services:
- name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-12-pgvector-0.4.1
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
alias: postgres
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12
+ alias: rediscluster # configure connections in config/redis.yml
- name: redis:6.0-alpine
- name: elasticsearch:7.17.6
command: ["elasticsearch", "-E", "discovery.type=single-node", "-E", "xpack.security.enabled=false"]
- - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.0
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1
alias: zoekt-ci-image
variables:
POSTGRES_HOST_AUTH_METHOD: trust
@@ -268,10 +284,12 @@
- name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-13-pgvector-0.4.1
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
alias: postgres
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12
+ alias: rediscluster # configure connections in config/redis.yml
- name: redis:6.2-alpine
- name: elasticsearch:7.17.6
command: ["elasticsearch", "-E", "discovery.type=single-node", "-E", "xpack.security.enabled=false"]
- - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.0
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1
alias: zoekt-ci-image
variables:
POSTGRES_HOST_AUTH_METHOD: trust
@@ -284,10 +302,12 @@
- name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-14-pgvector-0.4.1
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
alias: postgres
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12
+ alias: rediscluster # configure connections in config/redis.yml
- name: redis:6.2-alpine
- name: elasticsearch:7.17.6
command: ["elasticsearch", "-E", "discovery.type=single-node", "-E", "xpack.security.enabled=false"]
- - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.0
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1
alias: zoekt-ci-image
variables:
POSTGRES_HOST_AUTH_METHOD: trust
@@ -295,14 +315,34 @@
ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060
ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070
+.use-pg15-es7-ee:
+ services:
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-15-pgvector-0.4.1
+ command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
+ alias: postgres
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12
+ alias: rediscluster # configure connections in config/redis.yml
+ - name: redis:6.2-alpine
+ - name: elasticsearch:7.17.6
+ command: ["elasticsearch", "-E", "discovery.type=single-node", "-E", "xpack.security.enabled=false"]
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1
+ alias: zoekt-ci-image
+ variables:
+ POSTGRES_HOST_AUTH_METHOD: trust
+ PG_VERSION: "15"
+ ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060
+ ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070
+
.use-pg13-es8-ee:
services:
- name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-13-pgvector-0.4.1
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
alias: postgres
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12
+ alias: rediscluster # configure connections in config/redis.yml
- name: redis:6.0-alpine
- name: elasticsearch:8.6.2
- - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.0
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1
alias: zoekt-ci-image
variables:
POSTGRES_HOST_AUTH_METHOD: trust
@@ -317,9 +357,11 @@
- name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-14-pgvector-0.4.1
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
alias: postgres
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12
+ alias: rediscluster # configure connections in config/redis.yml
- name: redis:6.0-alpine
- name: elasticsearch:8.6.2
- - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.0
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1
alias: zoekt-ci-image
variables:
POSTGRES_HOST_AUTH_METHOD: trust
@@ -329,16 +371,37 @@
ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060
ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070
+.use-pg15-es8-ee:
+ services:
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-15-pgvector-0.4.1
+ command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
+ alias: postgres
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12
+ alias: rediscluster # configure connections in config/redis.yml
+ - name: redis:6.0-alpine
+ - name: elasticsearch:8.6.2
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1
+ alias: zoekt-ci-image
+ variables:
+ POSTGRES_HOST_AUTH_METHOD: trust
+ PG_VERSION: "15"
+ ES_SETTING_DISCOVERY_TYPE: "single-node"
+ ES_SETTING_XPACK_SECURITY_ENABLED: "false"
+ ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060
+ ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070
+
.use-pg13-opensearch1-ee:
services:
- name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-13-pgvector-0.4.1
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
alias: postgres
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12
+ alias: rediscluster # configure connections in config/redis.yml
- name: redis:6.0-alpine
- name: opensearchproject/opensearch:1.3.5
alias: elasticsearch
command: ["bin/opensearch", "-E", "discovery.type=single-node", "-E", "plugins.security.disabled=true"]
- - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.0
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1
alias: zoekt-ci-image
variables:
POSTGRES_HOST_AUTH_METHOD: trust
@@ -351,11 +414,13 @@
- name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-13-pgvector-0.4.1
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
alias: postgres
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12
+ alias: rediscluster # configure connections in config/redis.yml
- name: redis:6.0-alpine
- name: opensearchproject/opensearch:2.2.1
alias: elasticsearch
command: ["bin/opensearch", "-E", "discovery.type=single-node", "-E", "plugins.security.disabled=true"]
- - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.0
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1
alias: zoekt-ci-image
variables:
POSTGRES_HOST_AUTH_METHOD: trust
@@ -368,11 +433,13 @@
- name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-14-pgvector-0.4.1
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
alias: postgres
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12
+ alias: rediscluster # configure connections in config/redis.yml
- name: redis:6.0-alpine
- name: opensearchproject/opensearch:1.3.5
alias: elasticsearch
command: ["bin/opensearch", "-E", "discovery.type=single-node", "-E", "plugins.security.disabled=true"]
- - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.0
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1
alias: zoekt-ci-image
variables:
POSTGRES_HOST_AUTH_METHOD: trust
@@ -385,11 +452,13 @@
- name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-14-pgvector-0.4.1
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
alias: postgres
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12
+ alias: rediscluster # configure connections in config/redis.yml
- name: redis:6.0-alpine
- name: opensearchproject/opensearch:2.2.1
alias: elasticsearch
command: ["bin/opensearch", "-E", "discovery.type=single-node", "-E", "plugins.security.disabled=true"]
- - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.0
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1
alias: zoekt-ci-image
variables:
POSTGRES_HOST_AUTH_METHOD: trust
@@ -397,6 +466,44 @@
ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060
ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070
+.use-pg15-opensearch1-ee:
+ services:
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-15-pgvector-0.4.1
+ command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
+ alias: postgres
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12
+ alias: rediscluster # configure connections in config/redis.yml
+ - name: redis:6.0-alpine
+ - name: opensearchproject/opensearch:1.3.5
+ alias: elasticsearch
+ command: ["bin/opensearch", "-E", "discovery.type=single-node", "-E", "plugins.security.disabled=true"]
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1
+ alias: zoekt-ci-image
+ variables:
+ POSTGRES_HOST_AUTH_METHOD: trust
+ PG_VERSION: "15"
+ ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060
+ ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070
+
+.use-pg15-opensearch2-ee:
+ services:
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:postgres-15-pgvector-0.4.1
+ command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
+ alias: postgres
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:redis-cluster-6.2.12
+ alias: rediscluster # configure connections in config/redis.yml
+ - name: redis:6.0-alpine
+ - name: opensearchproject/opensearch:2.2.1
+ alias: elasticsearch
+ command: ["bin/opensearch", "-E", "discovery.type=single-node", "-E", "plugins.security.disabled=true"]
+ - name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:zoekt-ci-image-1.1
+ alias: zoekt-ci-image
+ variables:
+ POSTGRES_HOST_AUTH_METHOD: trust
+ PG_VERSION: "15"
+ ZOEKT_INDEX_BASE_URL: http://zoekt-ci-image:6060
+ ZOEKT_SEARCH_BASE_URL: http://zoekt-ci-image:6070
+
.use-kaniko:
image:
name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:kaniko
diff --git a/.gitlab/ci/graphql.gitlab-ci.yml b/.gitlab/ci/graphql.gitlab-ci.yml
index c4c4d500fb5..e67a7753da7 100644
--- a/.gitlab/ci/graphql.gitlab-ci.yml
+++ b/.gitlab/ci/graphql.gitlab-ci.yml
@@ -3,7 +3,7 @@ graphql-verify:
SETUP_DB: "false"
extends:
- .default-retry
- - .rails-cache
+ - .ruby-cache
- .default-before_script
- .graphql:rules:graphql-verify
stage: test
diff --git a/.gitlab/ci/memory.gitlab-ci.yml b/.gitlab/ci/memory.gitlab-ci.yml
index afef2b11ee7..33fbed15a23 100644
--- a/.gitlab/ci/memory.gitlab-ci.yml
+++ b/.gitlab/ci/memory.gitlab-ci.yml
@@ -1,7 +1,7 @@
.only-code-memory-job-base:
extends:
- .default-retry
- - .rails-cache
+ - .ruby-cache
- .default-before_script
- .memory:rules
variables:
@@ -20,7 +20,7 @@ memory-on-boot:
extends:
- .only-code-memory-job-base
- .production
- - .use-pg13
+ - .use-pg14
stage: test
needs: ["setup-test-env", "compile-test-assets"]
variables:
diff --git a/.gitlab/ci/notify.gitlab-ci.yml b/.gitlab/ci/notify.gitlab-ci.yml
index 1afc4eb8c97..b8f51a2540d 100644
--- a/.gitlab/ci/notify.gitlab-ci.yml
+++ b/.gitlab/ci/notify.gitlab-ci.yml
@@ -3,31 +3,6 @@
dependencies: []
cache: {}
-create-issues-for-failing-tests:
- extends:
- - .notify-defaults
- - .notify:rules:create-issues-for-failing-tests
- image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}ruby:${RUBY_VERSION}
- variables:
- FAILED_TESTS_DIR: "${CI_PROJECT_DIR}/tmp/failed_tests"
- FAILING_ISSUES_PROJECT: "gitlab-org/quality/engineering-productivity/flaky-tests-playground"
- FAILING_ISSUE_JSON_DIR: "${CI_PROJECT_DIR}/tmp/issues"
- before_script:
- - source ./scripts/utils.sh
- - source ./scripts/rspec_helpers.sh
- - install_gitlab_gem
- script:
- - mkdir -p "${FAILING_ISSUE_JSON_DIR}"
- - retrieve_failed_tests "${FAILED_TESTS_DIR}" "json" "latest"
- - scripts/pipeline/create_test_failure_issues.rb --project "${FAILING_ISSUES_PROJECT}" --tests-report-file "${FAILED_TESTS_DIR}/rspec_failed_tests.json" --issues-json-folder "${FAILING_ISSUE_JSON_DIR}" --api-token "${FAILING_ISSUES_PROJECT_TOKEN}"
- - scripts/pipeline/create_test_failure_issues.rb --project "${FAILING_ISSUES_PROJECT}" --tests-report-file "${FAILED_TESTS_DIR}/rspec_ee_failed_tests.json" --issues-json-folder "${FAILING_ISSUE_JSON_DIR}" --api-token "${FAILING_ISSUES_PROJECT_TOKEN}"
- artifacts:
- paths:
- - ${FAILED_TESTS_DIR}/
- - ${FAILING_ISSUE_JSON_DIR}/
- when: always
- expire_in: 2 days
-
notify-package-and-test-failure:
extends:
- .notify-defaults
diff --git a/.gitlab/ci/package-and-test-nightly/main.gitlab-ci.yml b/.gitlab/ci/package-and-test-nightly/main.gitlab-ci.yml
index a5474d00cb6..34b4e853415 100644
--- a/.gitlab/ci/package-and-test-nightly/main.gitlab-ci.yml
+++ b/.gitlab/ci/package-and-test-nightly/main.gitlab-ci.yml
@@ -5,7 +5,7 @@ include:
workflow:
rules:
- - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "nightly"'
+ - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $SCHEDULE_TYPE == "nightly"'
.ce:
variables:
@@ -18,48 +18,84 @@ workflow:
# ==========================================
# Prepare stage
# ==========================================
-# TODO: enable once ee jobs are added
-# trigger-omnibus-env:
-# extends:
-# - .trigger-omnibus-env
+download-knapsack-report:
+ extends:
+ - .download-knapsack-report
+ - .rules:download-knapsack
+
+# ==========================================
+# Test stage
+# ==========================================
+
+# ------------------------------------------
+# Network limiting jobs
+# ------------------------------------------
+airgapped:
+ extends:
+ - .qa
+ - .ee
+ - .parallel
+ variables:
+ QA_SCENARIO: "Test::Instance::Airgapped"
+ QA_RSPEC_TAGS: "--tag '~github' --tag '~external_api_calls' --tag '~skip_live_env'"
+
+instance-image-slow-network:
+ extends:
+ - .qa
+ - .ee
+ - .parallel
+ variables:
+ QA_SIMULATE_SLOW_CONNECTION: "true"
-trigger-omnibus-env-ce:
+# ------------------------------------------
+# N+1 jobs
+# ------------------------------------------
+nplus1-instance-image:
extends:
- - .trigger-omnibus-env-ce
+ - .qa
+ - .ee
+ - .parallel
variables:
- FOSS_ONLY: "1" # set FOSS_ONLY because we don't pass it via trigger job
+ CACHE_NAMESPACE_NAME: "false"
+ GITLAB_QA_OPTS: "--enable-feature gitaly_enforce_requests_limits"
-# TODO: enable once ee jobs are added
-# trigger-omnibus:
-# extends:
-# - .trigger-omnibus
-# needs:
-# - trigger-omnibus-env
+# ------------------------------------------
+# Elasticsearch compatibility jobs
+# ------------------------------------------
+integration-elasticsearch-compatibility-version-7:
+ extends:
+ - .qa
+ - .ee
+ variables:
+ ELASTIC_VERSION: "7.17.0"
+ QA_SCENARIO: "Test::Integration::Elasticsearch"
-trigger-omnibus-ce:
+integration-elasticsearch-compatibility-version-8:
extends:
- - .trigger-omnibus-ce
- needs:
- - trigger-omnibus-env-ce
+ - .qa
+ - .ee
+ variables:
+ ELASTIC_VERSION: "8.6.2"
+ QA_SCENARIO: "Test::Integration::Elasticsearch"
-# TODO: enable when first parallel job is added
-# download-knapsack-report:
-# extends:
-# - .download-knapsack-report
-# - .rules:download-knapsack
+# ------------------------------------------
+# Opensearch compatibility jobs
+# ------------------------------------------
+integration-opensearch-compatibility-version-1:
+ extends:
+ - .qa
+ - .ee
+ variables:
+ OPENSEARCH_VERSION: "1.3.3"
+ QA_SCENARIO: "Test::Integration::Opensearch"
-# ==========================================
-# Test stage
-# ==========================================
-update-ee-to-ce:
+integration-opensearch-compatibility-version-2:
extends:
- .qa
- - .update-script
- - .ce
+ - .ee
variables:
- UPDATE_TYPE: minor
- UPDATE_FROM_EDITION: ee
- QA_RSPEC_TAGS: --tag smoke
+ OPENSEARCH_VERSION: "2.0.1"
+ QA_SCENARIO: "Test::Integration::Opensearch"
# ==========================================
# Post test stage
@@ -68,19 +104,17 @@ e2e-test-report:
extends:
- .e2e-test-report
-# TODO: enable when first parallel job is added
-# upload-knapsack-report:
-# extends:
-# - .upload-knapsack-report
-# - .rules:report:process-results
+upload-knapsack-report:
+ extends:
+ - .upload-knapsack-report
export-test-metrics:
extends:
- .export-test-metrics
-relate-test-failures:
+generate-test-session:
extends:
- - .relate-test-failures
+ - .generate-test-session
notify-slack:
extends:
diff --git a/.gitlab/ci/package-and-test/main.gitlab-ci.yml b/.gitlab/ci/package-and-test/main.gitlab-ci.yml
index e90c0bbc7c4..fcea49e3103 100644
--- a/.gitlab/ci/package-and-test/main.gitlab-ci.yml
+++ b/.gitlab/ci/package-and-test/main.gitlab-ci.yml
@@ -20,30 +20,6 @@ check-release-set:
echo "Omnibus installation image is set to '$RELEASE'"
fi
-trigger-omnibus-env:
- extends:
- - .trigger-omnibus-env
- - .rules:omnibus-build
-
-trigger-omnibus-env-ce:
- extends:
- - .trigger-omnibus-env-ce
- - .rules:omnibus-build-ce
-
-trigger-omnibus:
- extends:
- - .trigger-omnibus
- - .rules:omnibus-build
- needs:
- - trigger-omnibus-env
-
-trigger-omnibus-ce:
- extends:
- - .trigger-omnibus-ce
- - .rules:omnibus-build-ce
- needs:
- - trigger-omnibus-env-ce
-
download-knapsack-report:
extends:
- .download-knapsack-report
@@ -103,6 +79,19 @@ instance-ff-inverse:
# ------------------------------------------
# Jobs with parallel variant
# ------------------------------------------
+
+# ========== instance ===========
+instance:
+ extends:
+ - .parallel
+ - .qa
+ variables:
+ QA_SCENARIO: Test::Instance::Image
+ rules:
+ - !reference [.rules:test:feature-flags-set, rules] # always run instance to validate ff change
+ - !reference [.rules:test:qa-parallel, rules]
+ - if: $QA_SUITES =~ /Test::Instance::All/
+
instance-selective:
extends: .qa
variables:
@@ -110,12 +99,31 @@ instance-selective:
rules:
- !reference [.rules:test:qa-selective, rules]
- if: $QA_SUITES =~ /Test::Instance::All/
-instance:
+
+instance-selective-parallel:
extends:
- .parallel
- - instance-selective
+ - .qa
+ variables:
+ QA_SCENARIO: Test::Instance::Image
+ rules:
+ - !reference [.rules:test:qa-selective-parallel, rules]
+ - if: $QA_SUITES =~ /Test::Instance::All/
+ variables:
+ QA_TESTS: ""
+
+# ========== praefect ===========
+
+praefect:
+ extends:
+ - .parallel
+ - .qa
+ parallel: 2
+ variables:
+ QA_SCENARIO: Test::Integration::Praefect
+ QA_CAN_TEST_PRAEFECT: "true"
+ KNAPSACK_TEST_FILE_PATTERN: "qa/specs/features/**/3_create/**/*_spec.rb"
rules:
- - !reference [.rules:test:feature-flags-set, rules] # always run instance to validate ff change
- !reference [.rules:test:qa-parallel, rules]
- if: $QA_SUITES =~ /Test::Instance::All/
@@ -127,10 +135,30 @@ praefect-selective:
rules:
- !reference [.rules:test:qa-selective, rules]
- if: $QA_SUITES =~ /Test::Instance::All/
-praefect:
+
+praefect-selective-parallel:
extends:
+ - .qa
- .parallel
- - praefect-selective
+ parallel: 2
+ variables:
+ QA_SCENARIO: Test::Integration::Praefect
+ QA_CAN_TEST_PRAEFECT: "true"
+ KNAPSACK_TEST_FILE_PATTERN: "qa/specs/features/**/3_create/**/*_spec.rb"
+ rules:
+ - !reference [.rules:test:qa-selective-parallel, rules]
+ - if: $QA_SUITES =~ /Test::Instance::All/
+ variables:
+ QA_TESTS: ""
+
+# ========== relative-url ===========
+
+relative-url:
+ extends:
+ - .qa
+ - .parallel
+ variables:
+ QA_SCENARIO: Test::Instance::RelativeUrl
rules:
- !reference [.rules:test:qa-parallel, rules]
- if: $QA_SUITES =~ /Test::Instance::All/
@@ -142,10 +170,28 @@ relative-url-selective:
rules:
- !reference [.rules:test:qa-selective, rules]
- if: $QA_SUITES =~ /Test::Instance::All/
-relative-url:
+
+relative-url-selective-parallel:
extends:
+ - .qa
- .parallel
- - relative-url-selective
+ variables:
+ QA_SCENARIO: Test::Instance::RelativeUrl
+ rules:
+ - !reference [.rules:test:qa-selective-parallel, rules]
+ - if: $QA_SUITES =~ /Test::Instance::All/
+ variables:
+ QA_TESTS: ""
+
+# ========== decomposition-single-db ===========
+
+decomposition-single-db:
+ extends:
+ - .qa
+ - .parallel
+ variables:
+ QA_SCENARIO: Test::Instance::Image
+ GITLAB_QA_OPTS: --omnibus-config decomposition_single_db $EXTRA_GITLAB_QA_OPTS
rules:
- !reference [.rules:test:qa-parallel, rules]
- if: $QA_SUITES =~ /Test::Instance::All/
@@ -158,10 +204,30 @@ decomposition-single-db-selective:
rules:
- !reference [.rules:test:qa-selective, rules]
- if: $QA_SUITES =~ /Test::Instance::All/
-decomposition-single-db:
+
+decomposition-single-db-selective-parallel:
extends:
+ - .qa
- .parallel
- - decomposition-single-db-selective
+ variables:
+ QA_SCENARIO: Test::Instance::Image
+ GITLAB_QA_OPTS: --omnibus-config decomposition_single_db $EXTRA_GITLAB_QA_OPTS
+ rules:
+ - !reference [.rules:test:qa-selective-parallel, rules]
+ - if: $QA_SUITES =~ /Test::Instance::All/
+ variables:
+ QA_TESTS: ""
+
+# ========== decomposition-multiple-db ===========
+
+decomposition-multiple-db:
+ extends:
+ - .qa
+ - .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
rules:
- !reference [.rules:test:qa-parallel, rules]
- if: $QA_SUITES =~ /Test::Instance::All/
@@ -175,13 +241,33 @@ decomposition-multiple-db-selective:
rules:
- !reference [.rules:test:qa-selective, rules]
- if: $QA_SUITES =~ /Test::Instance::All/
-decomposition-multiple-db:
+
+decomposition-multiple-db-selective-parallel:
extends:
+ - .qa
- .parallel
- - 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
rules:
- - !reference [.rules:test:qa-parallel, rules]
+ - !reference [.rules:test:qa-selective-parallel, rules]
- if: $QA_SUITES =~ /Test::Instance::All/
+ variables:
+ QA_TESTS: ""
+
+# ========== object-storage ===========
+
+object-storage:
+ extends: .qa
+ parallel: 2
+ variables:
+ QA_SCENARIO: Test::Instance::Image
+ QA_RSPEC_TAGS: --tag object_storage
+ GITLAB_QA_OPTS: --omnibus-config object_storage $EXTRA_GITLAB_QA_OPTS
+ rules:
+ - !reference [.rules:test:qa-parallel, rules]
+ - if: $QA_SUITES =~ /Test::Instance::ObjectStorage/
object-storage-selective:
extends: .qa
@@ -192,12 +278,30 @@ object-storage-selective:
rules:
- !reference [.rules:test:qa-selective, rules]
- if: $QA_SUITES =~ /Test::Instance::ObjectStorage/
-object-storage:
- extends: object-storage-selective
+
+object-storage-selective-parallel:
+ extends: .qa
parallel: 2
+ variables:
+ QA_SCENARIO: Test::Instance::Image
+ QA_RSPEC_TAGS: --tag object_storage
+ GITLAB_QA_OPTS: --omnibus-config object_storage $EXTRA_GITLAB_QA_OPTS
rules:
- - !reference [.rules:test:qa-parallel, rules]
+ - !reference [.rules:test:qa-selective-parallel, rules]
- if: $QA_SUITES =~ /Test::Instance::ObjectStorage/
+ variables:
+ QA_TESTS: ""
+
+# ========== object-storage-aws ===========
+
+object-storage-aws:
+ extends: object-storage
+ variables:
+ AWS_S3_ACCESS_KEY: $QA_AWS_S3_ACCESS_KEY
+ 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
object-storage-aws-selective:
extends: object-storage-selective
@@ -207,11 +311,27 @@ object-storage-aws-selective:
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
-object-storage-aws:
- extends: object-storage-aws-selective
- parallel: 2
- rules:
- - !reference [object-storage, rules]
+
+object-storage-aws-selective-parallel:
+ extends: object-storage-selective-parallel
+ variables:
+ AWS_S3_ACCESS_KEY: $QA_AWS_S3_ACCESS_KEY
+ 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
+
+
+# ========== object-storage-gcs ===========
+
+object-storage-gcs:
+ extends: object-storage
+ variables:
+ GCS_BUCKET_NAME: $QA_GCS_BUCKET_NAME
+ 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
object-storage-gcs-selective:
extends: object-storage-selective
@@ -221,55 +341,19 @@ object-storage-gcs-selective:
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
-object-storage-gcs:
- extends: object-storage-gcs-selective
- parallel: 2
- rules:
- - !reference [object-storage, rules]
-packages-selective:
- extends: .qa
+object-storage-gcs-selective-parallel:
+ extends: object-storage-selective-parallel
variables:
- QA_SCENARIO: Test::Instance::Image
- QA_RSPEC_TAGS: --tag packages
- GITLAB_QA_OPTS: --omnibus-config packages $EXTRA_GITLAB_QA_OPTS
- rules:
- - !reference [.rules:test:qa-selective, rules]
- - if: $QA_SUITES =~ /Test::Instance::Packages/
-packages:
- extends: packages-selective
- parallel: 2
- rules:
- - !reference [.rules:test:qa-parallel, rules]
- - if: $QA_SUITES =~ /Test::Instance::Packages/
+ GCS_BUCKET_NAME: $QA_GCS_BUCKET_NAME
+ 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
# ------------------------------------------
# Non parallel jobs
# ------------------------------------------
-update-minor:
- extends:
- - .qa
- - .update-script
- variables:
- UPDATE_TYPE: 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:
- extends:
- - .qa
- - .update-script
- variables:
- UPDATE_TYPE: major
- QA_RSPEC_TAGS: --tag smoke
- rules:
- - !reference [.rules:test:update, rules]
- - if: $QA_SUITES =~ /Test::Instance::Smoke/
- - !reference [.rules:test:manual, rules]
-
gitlab-pages:
extends: .qa
variables:
@@ -474,7 +558,7 @@ elasticsearch:
- !reference [.rules:test:manual, rules]
registry-object-storage-tls:
- extends: object-storage-aws-selective
+ extends: object-storage-aws-selective-parallel
variables:
QA_SCENARIO: Test::Integration::RegistryTLS
QA_RSPEC_TAGS: ""
@@ -491,6 +575,47 @@ importers:
- if: $QA_SUITES =~ /Test::Integration::Import/
- !reference [.rules:test:manual, rules]
+# ------------------------------------------
+# Update jobs
+# ------------------------------------------
+update-minor:
+ extends:
+ - .qa
+ - .update-script
+ variables:
+ UPDATE_TYPE: 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:
+ extends:
+ - .qa
+ - .update-script
+ variables:
+ UPDATE_TYPE: 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:
+ extends:
+ - .qa
+ - .update-script
+ variables:
+ UPDATE_TYPE: minor
+ UPDATE_FROM_EDITION: ee
+ QA_RSPEC_TAGS: --tag smoke
+ rules:
+ - !reference [.rules:test:ce-only, rules]
+ - !reference [.rules:test:update, rules]
+ - if: $QA_SUITES =~ /Test::Instance::Smoke/
+ - !reference [.rules:test:manual, rules]
+
# ==========================================
# Post test stage
# ==========================================
@@ -502,18 +627,12 @@ e2e-test-report:
upload-knapsack-report:
extends:
- .upload-knapsack-report
- - .rules:report:process-results
export-test-metrics:
extends:
- .export-test-metrics
- .rules:report:process-results
-relate-test-failures:
- extends:
- - .relate-test-failures
- - .rules:report:process-results
-
generate-test-session:
extends:
- .generate-test-session
diff --git a/.gitlab/ci/preflight.gitlab-ci.yml b/.gitlab/ci/preflight.gitlab-ci.yml
index e477466e5f3..968402b2ea5 100644
--- a/.gitlab/ci/preflight.gitlab-ci.yml
+++ b/.gitlab/ci/preflight.gitlab-ci.yml
@@ -16,20 +16,23 @@
- !reference [.default-before_script, before_script]
- cd qa && bundle install
-rails-production-server-boot:
+.rails-production-server-boot:
extends:
- .preflight-job-base
- .default-before_script
- .production
- .ruby-cache
- - .setup:rules:rails-production-server-boot
+ - .preflight:rules:rails-production-server-boot
- .use-pg13
variables:
BUNDLE_WITHOUT: "development:test"
BUNDLE_WITH: "production"
- needs: []
+
+# Test the puma configuration present in `config/puma.rb.example`
+rails-production-server-boot-puma-example:
+ extends:
+ - .rails-production-server-boot
script:
- - source scripts/utils.sh
- cp config/puma.rb.example config/puma.rb
- sed --in-place "s:/home/git/gitlab:${PWD}:" config/puma.rb
- echo 'bind "tcp://127.0.0.1:3000"' >> config/puma.rb
@@ -38,17 +41,30 @@ rails-production-server-boot:
- retry_times_sleep 10 5 "curl http://127.0.0.1:3000"
- kill $(jobs -p)
+# Test the puma configuration present in
+# https://gitlab.com/gitlab-org/build/CNG/-/raw/master/gitlab-webservice/configuration/puma.rb
+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
+ - 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
+ - retry_times_sleep 10 5 "curl http://127.0.0.1:8080"
+ - kill $(jobs -p)
+
no-ee-check:
extends:
- .preflight-job-base
- - .setup:rules:no-ee-check
+ - .preflight:rules:no-ee-check
script:
- scripts/no-dir-check ee
no-jh-check:
extends:
- .preflight-job-base
- - .setup:rules:no-jh-check
+ - .preflight:rules:no-jh-check
script:
- scripts/no-dir-check jh
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
diff --git a/.gitlab/ci/qa-common/rules.gitlab-ci.yml b/.gitlab/ci/qa-common/rules.gitlab-ci.yml
index 3580339921d..b5963d24b81 100644
--- a/.gitlab/ci/qa-common/rules.gitlab-ci.yml
+++ b/.gitlab/ci/qa-common/rules.gitlab-ci.yml
@@ -1,5 +1,5 @@
# Specific specs passed
-.specific-specs: &specific-specs
+.specs-specified: &specs-specified
if: $QA_TESTS != ""
# No specific specs passed
@@ -10,6 +10,14 @@
.feature-flags-set: &feature-flags-set
if: $QA_FEATURE_FLAGS =~ /enabled|disabled/
+# Specific specs specified
+.spec-file-specified: &spec-file-specified
+ if: $QA_TESTS =~ /_spec\.rb/
+
+# Specs directory specified
+.spec-directory-specified: &spec-directory-specified
+ if: $QA_TESTS != "" && $QA_TESTS !~ /_spec\.rb/
+
# Manually trigger job on ff changes but with default ff state instead of inverted
.feature-flags-set-manual: &feature-flags-set-manual
<<: *feature-flags-set
@@ -48,18 +56,6 @@
rules:
- when: always
-.rules:omnibus-build:
- rules:
- - if: $SKIP_OMNIBUS_TRIGGER == "true"
- when: never
- - if: $FOSS_ONLY != "1"
-
-.rules:omnibus-build-ce:
- rules:
- - if: $SKIP_OMNIBUS_TRIGGER == "true"
- when: never
- - if: $FOSS_ONLY == "1"
-
.rules:update-cache:
rules:
- if: '$UPDATE_QA_CACHE == "true"'
@@ -96,11 +92,25 @@
when: never
- <<: *feature-flags-set
when: never
+ - <<: *spec-directory-specified
+ when: never
+
+.rules:test:qa-selective-parallel:
+ rules:
+ # always run parallel with full suite when framework changes present or ff state changed
+ - <<: *qa-run-all-tests
+ when: never
+ - <<: *all-specs
+ when: never
+ - <<: *feature-flags-set
+ when: never
+ - <<: *spec-file-specified
+ when: never
.rules:test:qa-parallel:
rules:
- *qa-run-all-tests
- - <<: *specific-specs
+ - <<: *specs-specified
when: manual
allow_failure: true
variables:
@@ -113,6 +123,11 @@
- *qa-run-all-tests
- *feature-flags-set-manual
+.rules:test:ce-only:
+ rules:
+ - if: $FOSS_ONLY != "1"
+ when: never
+
.rules:test:ee-only:
rules:
- if: $FOSS_ONLY == "1"
@@ -124,12 +139,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
- # update type tests are used to check if gitlab upgrade can be performed correctly (mainly migrations)
- # there isn't much benefit in running tests after update with new sidebar enabled and there
- # is also an issue to properly pass feature toggle to this job due to how gitlab-qa parses cli args
- - if: $QA_SUPER_SIDEBAR_ENABLED == "true"
+ # $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:ee-only, rules]
- !reference [.rules:test:qa, rules]
.rules:test:qa-default-branch:
diff --git a/.gitlab/ci/qa-common/variables.gitlab-ci.yml b/.gitlab/ci/qa-common/variables.gitlab-ci.yml
index 0322247a89d..817f2e0020a 100644
--- a/.gitlab/ci/qa-common/variables.gitlab-ci.yml
+++ b/.gitlab/ci/qa-common/variables.gitlab-ci.yml
@@ -3,7 +3,6 @@
variables:
REGISTRY_HOST: "registry.gitlab.com"
REGISTRY_GROUP: "gitlab-org"
- SKIP_REPORT_IN_ISSUES: "true"
SKIP_OMNIBUS_TRIGGER: "true"
OMNIBUS_GITLAB_CACHE_UPDATE: "false"
OMNIBUS_GITLAB_RUBY3_BUILD: "false"
diff --git a/.gitlab/ci/qa.gitlab-ci.yml b/.gitlab/ci/qa.gitlab-ci.yml
index 81127b7c113..6d181a59214 100644
--- a/.gitlab/ci/qa.gitlab-ci.yml
+++ b/.gitlab/ci/qa.gitlab-ci.yml
@@ -1,5 +1,5 @@
.qa-job-base:
- image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-bullseye-ruby-${RUBY_VERSION}:bundler-2.3-chrome-${CHROME_VERSION}-docker-${DOCKER_VERSION}
+ image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}:bundler-2.3-chrome-${CHROME_VERSION}-docker-${DOCKER_VERSION}
extends:
- .default-retry
- .qa-cache
@@ -27,11 +27,13 @@
RUN_WITH_BUNDLE: "true" # instructs pipeline to install and run gitlab-qa gem via bundler
QA_PATH: qa # sets the optional path for bundler to run from
DYNAMIC_PIPELINE_YML: package-and-test-pipeline.yml # yml files are generated by scripts/generate-e2e-pipeline script
+ EXTRA_GITLAB_QA_OPTS: --set-feature-flags super_sidebar_nav_enrolled=enabled
inherit:
variables:
- CHROME_VERSION
- RUBY_VERSION
- DOCKER_VERSION
+ - DEBIAN_VERSION
- REGISTRY_GROUP
- REGISTRY_HOST
- OMNIBUS_GITLAB_CACHE_EDITION
@@ -68,15 +70,6 @@ qa:master-auto-quarantine-dequarantine:
- bundle exec confiner -r .confiner/master.yml
allow_failure: true
-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
-
qa:update-qa-cache:
extends:
- .qa-job-base
@@ -86,13 +79,58 @@ qa:update-qa-cache:
script:
- echo "Cache has been updated and ready to be uploaded."
+trigger-omnibus:
+ stage: qa
+ extends:
+ - .qa:rules:trigger-omnibus
+ needs:
+ - trigger-omnibus-env
+ - build-assets-image
+ 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 as-if-foss:
+ extends:
+ - trigger-omnibus
+ - .qa:rules:trigger-omnibus-ce
+ needs:
+ - trigger-omnibus-env as-if-foss
+ - build-assets-image as-if-foss
+ variables:
+ # Override gitlab repository so that omnibus doesn't use foss repository for CE build
+ GITLAB_ALTERNATIVE_REPO: $CI_PROJECT_URL
+
e2e:package-and-test-ee:
extends:
- .e2e-trigger-base
- .qa:rules:package-and-test-ee
needs:
- - build-assets-image
- build-qa-image
+ - trigger-omnibus
- e2e-test-pipeline-generate
variables:
RELEASE: "${REGISTRY_HOST}/${REGISTRY_GROUP}/build/omnibus-gitlab-mirror/gitlab-ee:${CI_COMMIT_SHA}"
@@ -105,8 +143,8 @@ e2e:package-and-test-ce:
- e2e:package-and-test-ee
- .qa:rules:package-and-test-ce
needs:
- - build-assets-image as-if-foss
- build-qa-image as-if-foss
+ - trigger-omnibus as-if-foss
- e2e-test-pipeline-generate
variables:
FOSS_ONLY: "1"
@@ -116,27 +154,25 @@ e2e:package-and-test-ce:
ALLURE_JOB_NAME: e2e-package-and-test-ce
PIPELINE_NAME: E2E Omnibus GitLab CE
-e2e:package-and-test-super-sidebar:
+e2e:package-and-test-old-nav:
extends:
- - e2e:package-and-test-ee
- - .qa:rules:package-and-test-sidebar
- when: manual
+ - .e2e-trigger-base
+ - .qa:rules:package-and-test-old-nav
variables:
- QA_SUPER_SIDEBAR_ENABLED: "true"
- EXTRA_GITLAB_QA_OPTS: --set-feature-flags super_sidebar_nav=enabled
- QA_RUN_TYPE: e2e-package-and-test-super-sidebar
- ALLURE_JOB_NAME: e2e-package-and-test-super-sidebar
- PIPELINE_NAME: E2E Omnibus Super Sidebar
+ RELEASE: "${REGISTRY_HOST}/${REGISTRY_GROUP}/build/omnibus-gitlab-mirror/gitlab-ee:${CI_COMMIT_SHA}"
+ QA_RUN_TYPE: e2e-package-and-test-old-nav
+ ALLURE_JOB_NAME: e2e-package-and-test-old-nav
+ PIPELINE_NAME: E2E Omnibus Old Navigation
+ QA_SUPER_SIDEBAR_ENABLED: "false"
+ EXTRA_GITLAB_QA_OPTS: ""
e2e:package-and-test-nightly:
extends:
- .e2e-trigger-base
- .qa:rules:package-and-test-nightly
needs:
- - build-assets-image
- - build-assets-image as-if-foss
- build-qa-image
- - build-qa-image as-if-foss
+ - trigger-omnibus
- e2e-test-pipeline-generate
variables:
GITLAB_SEMVER_VERSION: $GITLAB_SEMVER_VERSION
@@ -151,16 +187,13 @@ e2e:test-on-gdk:
- .qa:rules:e2e:test-on-gdk
stage: qa
needs:
- # In scheduled master pipelines we wait for the image to be built.
- # In MRs we assume the last scheduled master pipeline built the image already.
- - job: build-qa-on-gdk-master-image
- optional: true
- - job: e2e-test-pipeline-generate
- artifacts: true
+ - build-gdk-image
+ - e2e-test-pipeline-generate
variables:
ALLURE_JOB_NAME: e2e-test-on-gdk
QA_RUN_TYPE: e2e-test-on-gdk
PIPELINE_NAME: E2E GDK
DYNAMIC_PIPELINE_YML: test-on-gdk-pipeline.yml
SKIP_MESSAGE: Skipping test-on-gdk due to mr containing only quarantine changes!
+ GDK_IMAGE: "${CI_REGISTRY_IMAGE}/gitlab-qa-gdk:${CI_COMMIT_SHA}"
allow_failure: true
diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml
index a4041f771d9..0df6ef0cacd 100644
--- a/.gitlab/ci/rails.gitlab-ci.yml
+++ b/.gitlab/ci/rails.gitlab-ci.yml
@@ -9,6 +9,7 @@ setup-test-env:
- .setup-test-env-cache
- .rails:rules:setup-test-env
stage: prepare
+ needs: []
variables:
SETUP_DB: "false"
script:
@@ -64,127 +65,145 @@ update-gitaly-binaries-cache:
- export BUNDLE_WITHOUT="${BUNDLE_WITHOUT}:default:test:puma:kerberos:metrics:omnibus:ed25519"
- bundle_install_script
-rspec migration pg13:
+rspec migration pg14:
extends:
- - .rspec-base-pg13
+ - .rspec-base-pg14
- .rspec-base-migration
- .rails:rules:ee-and-foss-migration
- .rspec-migration-parallel
-rspec background_migration pg13:
+rspec background_migration pg14:
extends:
- - .rspec-base-pg13
+ - .rspec-base-pg14
- .rspec-base-migration
- .rails:rules:ee-and-foss-background-migration
- .rspec-background-migration-parallel
-rspec migration pg13 single-db:
+rspec migration pg14 single-db:
extends:
- - rspec migration pg13
+ - rspec migration pg14
- .single-db-rspec
- .rails:rules:single-db
-rspec background_migration pg13 single-db:
+rspec background_migration pg14 single-db:
extends:
- - rspec background_migration pg13
+ - rspec background_migration pg14
- .single-db-rspec
- .rails:rules:single-db
-rspec migration pg13 single-db-ci-connection:
+rspec migration pg14 single-db-ci-connection:
extends:
- - rspec migration pg13
+ - rspec migration pg14
- .single-db-ci-connection-rspec
- .rails:rules:single-db-ci-connection
-rspec background_migration pg13 single-db-ci-connection:
+rspec background_migration pg14 single-db-ci-connection:
extends:
- - rspec background_migration pg13
+ - rspec background_migration pg14
- .single-db-ci-connection-rspec
- .rails:rules:single-db-ci-connection
-rspec migration pg13 praefect:
+rspec migration pg14 praefect:
extends:
- - rspec migration pg13
+ - rspec migration pg14
- .praefect-with-db
- .rails:rules:praefect-with-db
-rspec background_migration pg13 praefect:
+rspec background_migration pg14 praefect:
extends:
- - rspec background_migration pg13
+ - rspec background_migration pg14
- .praefect-with-db
- .rails:rules:praefect-with-db
-rspec unit pg13:
+rspec unit pg14:
extends:
- - .rspec-base-pg13
+ - .rspec-base-pg14
- .rails:rules:ee-and-foss-unit
- .rspec-unit-parallel
-rspec unit pg13 single-db:
+rspec unit pg14 single-redis:
+ extends:
+ - rspec unit pg14
+ - .no-redis-cluster
+ - .rails:rules:single-redis
+
+rspec unit pg14 single-db:
extends:
- - rspec unit pg13
+ - rspec unit pg14
- .single-db-rspec
- .rails:rules:single-db
-rspec unit pg13 single-db-ci-connection:
+rspec unit pg14 single-db-ci-connection:
extends:
- - rspec unit pg13
+ - rspec unit pg14
- .single-db-ci-connection-rspec
- .rails:rules:single-db-ci-connection
-rspec unit pg13 praefect:
+rspec unit pg14 praefect:
extends:
- - rspec unit pg13
+ - rspec unit pg14
- .praefect-with-db
- .rails:rules:praefect-with-db
-rspec integration pg13:
+rspec integration pg14:
extends:
- - .rspec-base-pg13
+ - .rspec-base-pg14
- .rails:rules:ee-and-foss-integration
- .rspec-integration-parallel
-rspec integration pg13 single-db:
+rspec integration pg14 single-redis:
extends:
- - rspec integration pg13
+ - rspec integration pg14
+ - .no-redis-cluster
+ - .rails:rules:single-redis
+
+rspec integration pg14 single-db:
+ extends:
+ - rspec integration pg14
- .single-db-rspec
- .rails:rules:single-db
-rspec integration pg13 single-db-ci-connection:
+rspec integration pg14 single-db-ci-connection:
extends:
- - rspec integration pg13
+ - rspec integration pg14
- .single-db-ci-connection-rspec
- .rails:rules:single-db-ci-connection
-rspec integration pg13 praefect:
+rspec integration pg14 praefect:
extends:
- - rspec integration pg13
+ - rspec integration pg14
- .praefect-with-db
- .rails:rules:praefect-with-db
-rspec system pg13:
+rspec system pg14:
extends:
- - .rspec-base-pg13
+ - .rspec-base-pg14
- .rails:rules:ee-and-foss-system
- .rspec-system-parallel
variables:
DEBUG_GITLAB_TRANSACTION_STACK: "true"
-rspec system pg13 single-db:
+rspec system pg14 single-redis:
extends:
- - rspec system pg13
+ - rspec system pg14
+ - .no-redis-cluster
+ - .rails:rules:single-redis
+
+rspec system pg14 single-db:
+ extends:
+ - rspec system pg14
- .single-db-rspec
- .rails:rules:single-db
-rspec system pg13 single-db-ci-connection:
+rspec system pg14 single-db-ci-connection:
extends:
- - rspec system pg13
+ - rspec system pg14
- .single-db-ci-connection-rspec
- .rails:rules:single-db-ci-connection
-rspec system pg13 praefect:
+rspec system pg14 praefect:
extends:
- - rspec system pg13
+ - rspec system pg14
- .praefect-with-db
- .rails:rules:praefect-with-db
@@ -198,9 +217,19 @@ rspec db-library-code pg12:
- !reference [.base-script, script]
- rspec_db_library_code
-rspec fast_spec_helper:
+# Dedicated job to test DB library code against PG13.
+# Note that these are already tested against PG13 in the `rspec unit pg13` / `rspec-ee unit pg13` jobs.
+rspec db-library-code pg13:
extends:
- .rspec-base-pg13
+ - .rails:rules:ee-and-foss-db-library-code
+ script:
+ - !reference [.base-script, script]
+ - rspec_db_library_code
+
+rspec fast_spec_helper:
+ extends:
+ - .rspec-base-pg14
- .rails:rules:ee-and-foss-fast_spec_helper
script:
- fast_spec_helper_specs=$(git grep -l -E '^require.*fast_spec_helper')
@@ -232,19 +261,15 @@ rspec:deprecations:
- .rails:rules:deprecations
stage: post-test
allow_failure: true
- # We cannot use needs since it would mean needing 84 jobs (since most are parallelized)
- # so we use `dependencies` here.
- dependencies:
- - rspec migration pg13
- - rspec background_migration pg13
- - rspec unit pg13
- - rspec integration pg13
- - rspec system pg13
- - rspec-ee migration pg13
- - rspec-ee background_migration pg13
- - rspec-ee unit pg13
- - rspec-ee integration pg13
- - rspec-ee system pg13
+ needs:
+ - job: rspec:artifact-collector unit
+ optional: true
+ - job: rspec:artifact-collector system
+ optional: true
+ - job: rspec:artifact-collector remainder
+ optional: true
+ - job: rspec:artifact-collector ee
+ optional: true
variables:
SETUP_DB: "false"
script:
@@ -257,35 +282,150 @@ rspec:deprecations:
paths:
- deprecations/
+# The jobs built upon `.artifact-collector` are to work around the
+# needs: [] limit of a maximum of 50 dependencies.
+# 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:
+ stage: post-test
+ variables:
+ GIT_STRATEGY: none
+ image: alpine:3.17
+ script:
+ - mkdir -p coverage deprecations rspec
+ - ls coverage/ deprecations/ rspec/
+ artifacts:
+ expire_in: 7d
+ when: always
+ paths:
+ - coverage/
+ - deprecations/
+ - rspec/
+
+rspec:artifact-collector unit:
+ extends:
+ - .artifact-collector
+ - .rails:rules:ee-and-foss-unit
+ needs:
+ - rspec unit pg14 # 28 jobs
+
+rspec:artifact-collector system:
+ extends:
+ - .artifact-collector
+ - .rails:rules:ee-and-foss-system
+ needs:
+ - rspec system pg14 # 28 jobs
+
+rspec:artifact-collector remainder:
+ extends:
+ - .artifact-collector
+ needs:
+ - job: rspec integration pg14 # 12 jobs
+ optional: true
+ - job: rspec migration pg14 # 8 jobs
+ optional: true
+ - job: rspec background_migration pg14 # 4 jobs
+ optional: true
+
+rspec:artifact-collector as-if-foss unit:
+ extends:
+ - .artifact-collector
+ - .rails:rules:as-if-foss-unit
+ needs:
+ - rspec unit pg14-as-if-foss # 28 jobs
+
+rspec:artifact-collector as-if-foss system:
+ extends:
+ - .artifact-collector
+ - .rails:rules:as-if-foss-system
+ needs:
+ - rspec system pg14-as-if-foss # 28 jobs
+
+rspec:artifact-collector as-if-foss remainder:
+ extends:
+ - .artifact-collector
+ needs:
+ - job: rspec integration pg14-as-if-foss # 12 jobs
+ optional: true
+ - job: rspec migration pg14-as-if-foss # 8 jobs
+ optional: true
+ - job: rspec background_migration pg14-as-if-foss # 4 jobs
+ optional: true
+
+rspec:artifact-collector single-redis:
+ extends:
+ - .artifact-collector
+ - .rails:rules:single-redis
+ needs:
+ - rspec unit pg14 single-redis # 28 jobs
+ - rspec integration pg14 single-redis # 12 jobs
+
+rspec:artifact-collector system single-redis:
+ extends:
+ - .artifact-collector
+ - .rails:rules:single-redis
+ needs:
+ - rspec system pg14 single-redis # 28 jobs
+
+rspec:artifact-collector ee single-redis:
+ extends:
+ - .artifact-collector
+ needs:
+ - job: rspec-ee unit pg14 single-redis # 18 jobs
+ optional: true
+ - job: rspec-ee integration pg14 single-redis # 6 jobs
+ optional: true
+ - job: rspec-ee system pg14 single-redis # 10 jobs
+ optional: true
+
+rspec:artifact-collector ee:
+ extends:
+ - .artifact-collector
+ needs:
+ - job: rspec-ee migration pg14 # 2 jobs
+ optional: true
+ - job: rspec-ee background_migration pg14 # 2 jobs
+ optional: true
+ - job: rspec-ee unit pg14 # 18 jobs
+ optional: true
+ - job: rspec-ee integration pg14 # 6 jobs
+ optional: true
+ - job: rspec-ee system pg14 # 10 jobs
+ optional: true
+
rspec:coverage:
extends:
- .coverage-base
- .rails:rules:rspec-coverage
stage: post-test
- # We cannot use needs since it would mean needing 84 jobs (since most are parallelized)
- # so we use `dependencies` here.
- dependencies:
+ needs:
- setup-test-env
# FOSS/EE jobs
- - rspec migration pg13
- - rspec background_migration pg13
- - rspec unit pg13
- - rspec integration pg13
- - rspec system pg13
+ - job: rspec:artifact-collector unit
+ optional: true
+ - job: rspec:artifact-collector system
+ optional: true
+ - job: rspec:artifact-collector remainder
+ optional: true
+ - job: rspec:artifact-collector single-redis
+ optional: true
+ - job: rspec:artifact-collector system single-redis
+ optional: true
# as-if-foss jobs
- - rspec migration pg13-as-if-foss
- - rspec background_migration pg13-as-if-foss
- - rspec unit pg13-as-if-foss
- - rspec integration pg13-as-if-foss
- - rspec system pg13-as-if-foss
+ - job: rspec:artifact-collector as-if-foss unit
+ optional: true
+ - job: rspec:artifact-collector as-if-foss system
+ optional: true
+ - job: rspec:artifact-collector as-if-foss remainder
+ optional: true
# EE jobs
- - rspec-ee migration pg13
- - rspec-ee background_migration pg13
- - rspec-ee unit pg13
- - rspec-ee integration pg13
- - rspec-ee system pg13
+ - job: rspec:artifact-collector ee single-redis
+ optional: true
+ - job: rspec:artifact-collector ee
+ optional: true
# Memory jobs
- - memory-on-boot
+ - job: memory-on-boot
+ optional: true
script:
- run_timed_command "bundle exec scripts/merge-simplecov"
coverage: '/LOC \((\d+\.\d+%)\) covered.$/'
@@ -342,9 +482,7 @@ rspec:flaky-tests-report:
- .default-retry
- .rails:rules:flaky-tests-report
stage: post-test
- # We cannot use needs since it would mean needing 84 jobs (since most are parallelized)
- # so we use `dependencies` here.
- dependencies: !reference ["rspec:coverage", "dependencies"]
+ needs: !reference ["rspec:coverage", "needs"]
variables:
SKIPPED_TESTS_REPORT_PATH: rspec/skipped_tests_report.txt
RETRIED_TESTS_REPORT_PATH: rspec/flaky/retried_tests_report.txt
@@ -413,214 +551,232 @@ rspec-ee:predictive:trigger:
- artifact: "${RSPEC_PREDICTIVE_PIPELINE_TEMPLATE_YML}-ee.yml"
job: rspec-predictive:pipeline-generate
-rspec migration pg13-as-if-foss:
+rspec migration pg14-as-if-foss:
extends:
- - .rspec-base-pg13-as-if-foss
+ - .rspec-base-pg14-as-if-foss
- .rspec-base-migration
- .rails:rules:as-if-foss-migration
- .rspec-migration-parallel
-rspec background_migration pg13-as-if-foss:
+rspec background_migration pg14-as-if-foss:
extends:
- - .rspec-base-pg13-as-if-foss
+ - .rspec-base-pg14-as-if-foss
- .rspec-base-migration
- .rails:rules:as-if-foss-background-migration
- .rspec-background-migration-parallel
-rspec migration pg13-as-if-foss single-db:
+rspec migration pg14-as-if-foss single-db:
extends:
- - rspec migration pg13-as-if-foss
+ - rspec migration pg14-as-if-foss
- .single-db-rspec
- .rails:rules:single-db
-rspec background_migration pg13-as-if-foss single-db:
+rspec background_migration pg14-as-if-foss single-db:
extends:
- - rspec background_migration pg13-as-if-foss
+ - rspec background_migration pg14-as-if-foss
- .single-db-rspec
- .rails:rules:single-db
-rspec migration pg13-as-if-foss single-db-ci-connection:
+rspec migration pg14-as-if-foss single-db-ci-connection:
extends:
- - rspec migration pg13-as-if-foss
+ - rspec migration pg14-as-if-foss
- .single-db-ci-connection-rspec
- .rails:rules:single-db-ci-connection
-rspec background_migration pg13-as-if-foss single-db-ci-connection:
+rspec background_migration pg14-as-if-foss single-db-ci-connection:
extends:
- - rspec background_migration pg13-as-if-foss
+ - rspec background_migration pg14-as-if-foss
- .single-db-ci-connection-rspec
- .rails:rules:single-db-ci-connection
-rspec unit pg13-as-if-foss:
+rspec unit pg14-as-if-foss:
extends:
- - .rspec-base-pg13-as-if-foss
+ - .rspec-base-pg14-as-if-foss
- .rails:rules:as-if-foss-unit
- .rspec-unit-parallel
-rspec unit pg13-as-if-foss single-db:
+rspec unit pg14-as-if-foss single-db:
extends:
- - rspec unit pg13-as-if-foss
+ - rspec unit pg14-as-if-foss
- .single-db-rspec
- .rails:rules:single-db
-rspec unit pg13-as-if-foss single-db-ci-connection:
+rspec unit pg14-as-if-foss single-db-ci-connection:
extends:
- - rspec unit pg13-as-if-foss
+ - rspec unit pg14-as-if-foss
- .single-db-ci-connection-rspec
- .rails:rules:single-db-ci-connection
-rspec integration pg13-as-if-foss:
+rspec integration pg14-as-if-foss:
extends:
- - .rspec-base-pg13-as-if-foss
+ - .rspec-base-pg14-as-if-foss
- .rails:rules:as-if-foss-integration
- .rspec-integration-parallel
-rspec integration pg13-as-if-foss single-db:
+rspec integration pg14-as-if-foss single-db:
extends:
- - rspec integration pg13-as-if-foss
+ - rspec integration pg14-as-if-foss
- .single-db-rspec
- .rails:rules:single-db
-rspec integration pg13-as-if-foss single-db-ci-connection:
+rspec integration pg14-as-if-foss single-db-ci-connection:
extends:
- - rspec integration pg13-as-if-foss
+ - rspec integration pg14-as-if-foss
- .single-db-ci-connection-rspec
- .rails:rules:single-db-ci-connection
-rspec system pg13-as-if-foss:
+rspec system pg14-as-if-foss:
extends:
- - .rspec-base-pg13-as-if-foss
+ - .rspec-base-pg14-as-if-foss
- .rails:rules:as-if-foss-system
- .rspec-system-parallel
-rspec system pg13-as-if-foss single-db:
+rspec system pg14-as-if-foss single-db:
extends:
- - rspec system pg13-as-if-foss
+ - rspec system pg14-as-if-foss
- .single-db-rspec
- .rails:rules:single-db
-rspec system pg13-as-if-foss single-db-ci-connection:
+rspec system pg14-as-if-foss single-db-ci-connection:
extends:
- - rspec system pg13-as-if-foss
+ - rspec system pg14-as-if-foss
- .single-db-ci-connection-rspec
- .rails:rules:single-db-ci-connection
-rspec-ee migration pg13:
+rspec-ee migration pg14:
extends:
- - .rspec-ee-base-pg13
+ - .rspec-ee-base-pg14
- .rspec-base-migration
- .rails:rules:ee-only-migration
- .rspec-ee-migration-parallel
-rspec-ee background_migration pg13:
+rspec-ee background_migration pg14:
extends:
- - .rspec-ee-base-pg13
+ - .rspec-ee-base-pg14
- .rspec-base-migration
- .rails:rules:ee-only-background-migration
- .rspec-ee-background-migration-parallel
-rspec-ee migration pg13 single-db:
+rspec-ee migration pg14 single-db:
extends:
- - rspec-ee migration pg13
+ - rspec-ee migration pg14
- .single-db-rspec
- .rails:rules:single-db
-rspec-ee background_migration pg13 single-db:
+rspec-ee background_migration pg14 single-db:
extends:
- - rspec-ee background_migration pg13
+ - rspec-ee background_migration pg14
- .single-db-rspec
- .rails:rules:single-db
-rspec-ee migration pg13 single-db-ci-connection:
+rspec-ee migration pg14 single-db-ci-connection:
extends:
- - rspec-ee migration pg13
+ - rspec-ee migration pg14
- .single-db-ci-connection-rspec
- .rails:rules:single-db-ci-connection
-rspec-ee background_migration pg13 single-db-ci-connection:
+rspec-ee background_migration pg14 single-db-ci-connection:
extends:
- - rspec-ee background_migration pg13
+ - rspec-ee background_migration pg14
- .single-db-ci-connection-rspec
- .rails:rules:single-db-ci-connection
-rspec-ee migration pg13 praefect:
+rspec-ee migration pg14 praefect:
extends:
- - rspec migration pg13
+ - rspec migration pg14
- .praefect-with-db
- .rails:rules:praefect-with-db
-rspec-ee background_migration pg13 praefect:
+rspec-ee background_migration pg14 praefect:
extends:
- - rspec background_migration pg13
+ - rspec background_migration pg14
- .praefect-with-db
- .rails:rules:praefect-with-db
-rspec-ee unit pg13:
+rspec-ee unit pg14:
extends:
- - .rspec-ee-base-pg13
+ - .rspec-ee-base-pg14
- .rails:rules:ee-only-unit
- .rspec-ee-unit-parallel
-rspec-ee unit pg13 es8:
+rspec-ee unit pg14 es8:
extends:
- - .rspec-ee-base-pg13-es8
+ - .rspec-ee-base-pg14-es8
- .rspec-ee-unit-parallel
-rspec-ee unit pg13 single-db:
+rspec-ee unit pg14 single-db:
extends:
- - rspec-ee unit pg13
+ - rspec-ee unit pg14
- .single-db-rspec
- .rails:rules:single-db
-rspec-ee unit pg13 single-db-ci-connection:
+rspec-ee unit pg14 single-redis:
extends:
- - rspec-ee unit pg13
+ - rspec-ee unit pg14
+ - .no-redis-cluster
+ - .rails:rules:single-redis
+
+rspec-ee unit pg14 single-db-ci-connection:
+ extends:
+ - rspec-ee unit pg14
- .single-db-ci-connection-rspec
- .rails:rules:single-db-ci-connection
-rspec-ee integration pg13:
+rspec-ee integration pg14:
extends:
- - .rspec-ee-base-pg13
+ - .rspec-ee-base-pg14
- .rails:rules:ee-only-integration
- .rspec-ee-integration-parallel
-rspec-ee integration pg13 es8:
+rspec-ee integration pg14 es8:
extends:
- - .rspec-ee-base-pg13-es8
+ - .rspec-ee-base-pg14-es8
- .rspec-ee-integration-parallel
-rspec-ee integration pg13 single-db:
+rspec-ee integration pg14 single-db:
extends:
- - rspec-ee integration pg13
+ - rspec-ee integration pg14
- .single-db-rspec
- .rails:rules:single-db
-rspec-ee integration pg13 single-db-ci-connection:
+rspec-ee integration pg14 single-redis:
+ extends:
+ - rspec-ee integration pg14
+ - .no-redis-cluster
+ - .rails:rules:single-redis
+
+rspec-ee integration pg14 single-db-ci-connection:
extends:
- - rspec-ee integration pg13
+ - rspec-ee integration pg14
- .single-db-ci-connection-rspec
- .rails:rules:single-db-ci-connection
-rspec-ee system pg13:
+rspec-ee system pg14:
extends:
- - .rspec-ee-base-pg13
+ - .rspec-ee-base-pg14
- .rails:rules:ee-only-system
- .rspec-ee-system-parallel
-rspec-ee system pg13 es8:
+rspec-ee system pg14 es8:
extends:
- - .rspec-ee-base-pg13-es8
+ - .rspec-ee-base-pg14-es8
- .rspec-ee-system-parallel
-rspec-ee system pg13 single-db:
+rspec-ee system pg14 single-db:
extends:
- - rspec-ee system pg13
+ - rspec-ee system pg14
- .single-db-rspec
- .rails:rules:single-db
-rspec-ee system pg13 single-db-ci-connection:
+rspec-ee system pg14 single-redis:
+ extends:
+ - rspec-ee system pg14
+ - .no-redis-cluster
+ - .rails:rules:single-redis
+
+rspec-ee system pg14 single-db-ci-connection:
extends:
- - rspec-ee system pg13
+ - rspec-ee system pg14
- .single-db-ci-connection-rspec
- .rails:rules:single-db-ci-connection
# EE: default refs (MRs, default branch, schedules) jobs #
@@ -662,36 +818,69 @@ rspec system pg12:
- .rails:rules:rspec-on-pg12
- .rspec-system-parallel
-# PG14
-rspec migration pg14:
+# PG13
+rspec migration pg13:
extends:
- - .rspec-base-pg14
+ - .rspec-base-pg13
- .rspec-base-migration
- .rails:rules:default-branch-schedule-nightly--code-backstage
- .rspec-migration-parallel
-rspec background_migration pg14:
+rspec background_migration pg13:
extends:
- - .rspec-base-pg14
+ - .rspec-base-pg13
- .rspec-base-migration
- .rails:rules:default-branch-schedule-nightly--code-backstage
- .rspec-background-migration-parallel
-rspec unit pg14:
+rspec unit pg13:
extends:
- - .rspec-base-pg14
+ - .rspec-base-pg13
- .rails:rules:default-branch-schedule-nightly--code-backstage
- .rspec-unit-parallel
-rspec integration pg14:
+rspec integration pg13:
extends:
- - .rspec-base-pg14
+ - .rspec-base-pg13
- .rails:rules:default-branch-schedule-nightly--code-backstage
- .rspec-integration-parallel
-rspec system pg14:
+rspec system pg13:
extends:
- - .rspec-base-pg14
+ - .rspec-base-pg13
+ - .rails:rules:default-branch-schedule-nightly--code-backstage
+ - .rspec-system-parallel
+
+# PG15
+rspec migration pg15:
+ extends:
+ - .rspec-base-pg15
+ - .rspec-base-migration
+ - .rails:rules:default-branch-schedule-nightly--code-backstage
+ - .rspec-migration-parallel
+
+rspec background_migration pg15:
+ extends:
+ - .rspec-base-pg15
+ - .rspec-base-migration
+ - .rails:rules:default-branch-schedule-nightly--code-backstage
+ - .rspec-background-migration-parallel
+
+rspec unit pg15:
+ extends:
+ - .rspec-base-pg15
+ - .rails:rules:default-branch-schedule-nightly--code-backstage
+ - .rspec-unit-parallel
+
+rspec integration pg15:
+ extends:
+ - .rspec-base-pg15
+ - .rails:rules:default-branch-schedule-nightly--code-backstage
+ - .rspec-integration-parallel
+
+rspec system pg15:
+ extends:
+ - .rspec-base-pg15
- .rails:rules:default-branch-schedule-nightly--code-backstage
- .rspec-system-parallel
# EE/FOSS: default branch nightly scheduled jobs #
@@ -801,51 +990,88 @@ rspec-ee system pg14 opensearch2:
- .rspec-ee-system-parallel
- .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only
-rspec-ee migration pg14:
+# PG15
+rspec-ee unit pg15 opensearch1:
extends:
- - .rspec-ee-base-pg14
+ - .rspec-ee-base-pg15-opensearch1
+ - .rspec-ee-unit-parallel
+ - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only
+
+rspec-ee unit pg15 opensearch2:
+ extends:
+ - .rspec-ee-base-pg15-opensearch2
+ - .rspec-ee-unit-parallel
+ - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only
+
+rspec-ee integration pg15 opensearch1:
+ extends:
+ - .rspec-ee-base-pg15-opensearch1
+ - .rspec-ee-integration-parallel
+ - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only
+
+rspec-ee integration pg15 opensearch2:
+ extends:
+ - .rspec-ee-base-pg15-opensearch2
+ - .rspec-ee-integration-parallel
+ - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only
+
+rspec-ee system pg15 opensearch1:
+ extends:
+ - .rspec-ee-base-pg15-opensearch1
+ - .rspec-ee-system-parallel
+ - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only
+
+rspec-ee system pg15 opensearch2:
+ extends:
+ - .rspec-ee-base-pg15-opensearch2
+ - .rspec-ee-system-parallel
+ - .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only
+
+rspec-ee migration pg15:
+ extends:
+ - .rspec-ee-base-pg15
- .rspec-base-migration
- .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only
- .rspec-ee-migration-parallel
-rspec-ee background_migration pg14:
+rspec-ee background_migration pg15:
extends:
- - .rspec-ee-base-pg14
+ - .rspec-ee-base-pg15
- .rspec-base-migration
- .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only
- .rspec-ee-background-migration-parallel
-rspec-ee unit pg14:
+rspec-ee unit pg15:
extends:
- - .rspec-ee-base-pg14
+ - .rspec-ee-base-pg15
- .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only
- .rspec-ee-unit-parallel
-rspec-ee unit pg14 es8:
+rspec-ee unit pg15 es8:
extends:
- - .rspec-ee-base-pg14-es8
+ - .rspec-ee-base-pg15-es8
- .rspec-ee-unit-parallel
-rspec-ee integration pg14:
+rspec-ee integration pg15:
extends:
- - .rspec-ee-base-pg14
+ - .rspec-ee-base-pg15
- .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only
- .rspec-ee-integration-parallel
-rspec-ee integration pg14 es8:
+rspec-ee integration pg15 es8:
extends:
- - .rspec-ee-base-pg14-es8
+ - .rspec-ee-base-pg15-es8
- .rspec-ee-integration-parallel
-rspec-ee system pg14:
+rspec-ee system pg15:
extends:
- - .rspec-ee-base-pg14
+ - .rspec-ee-base-pg15
- .rails:rules:default-branch-schedule-nightly--code-backstage-ee-only
- .rspec-ee-system-parallel
-rspec-ee system pg14 es8:
+rspec-ee system pg15 es8:
extends:
- - .rspec-ee-base-pg14-es8
+ - .rspec-ee-base-pg15-es8
- .rspec-ee-system-parallel
# EE: default branch nightly scheduled jobs #
#####################################
@@ -863,14 +1089,14 @@ rspec-ee system pg14 es8:
rspec fail-fast:
extends:
- - .rspec-base-pg13
- - .rspec-fail-fast # extends from .rspec-fail-fast last to override script from .rspec-base-pg13
+ - .rspec-base-pg14
+ - .rspec-fail-fast # extends from .rspec-fail-fast last to override script from .rspec-base-pg14
variables:
MATCHING_TESTS_PATH: "${RSPEC_MATCHING_TESTS_FOSS_PATH}"
rspec-ee fail-fast:
extends:
- - .rspec-ee-base-pg13
+ - .rspec-ee-base-pg14
- .rspec-fail-fast # extends from .rspec-fail-fast last to override script from .rspec-ee-base-pg13
variables:
MATCHING_TESTS_PATH: "${RSPEC_MATCHING_TESTS_EE_PATH}"
@@ -927,7 +1153,7 @@ fail-pipeline-early:
script:
- fail_pipeline_early
-.base-rspec-pg13-rerun-previous-failed-tests:
+.base-rspec-pg14-rerun-previous-failed-tests:
extends:
- .rails:rules:rerun-previous-failed-tests
stage: test
@@ -936,17 +1162,17 @@ fail-pipeline-early:
- !reference [.base-script, script]
- rspec_rerun_previous_failed_tests "${PREVIOUS_FAILED_TESTS_FILE}"
-rspec rspec-pg13-rerun-previous-failed-tests:
+rspec rspec-pg14-rerun-previous-failed-tests:
extends:
- - .rspec-base-pg13
- - .base-rspec-pg13-rerun-previous-failed-tests
+ - .rspec-base-pg14
+ - .base-rspec-pg14-rerun-previous-failed-tests
variables:
PREVIOUS_FAILED_TESTS_FILE: tmp/previous_failed_tests/rspec_failed_tests.txt
-rspec rspec-ee-pg13-rerun-previous-failed-tests:
+rspec rspec-ee-pg14-rerun-previous-failed-tests:
extends:
- - .rspec-ee-base-pg13
- - .base-rspec-pg13-rerun-previous-failed-tests
+ - .rspec-ee-base-pg14
+ - .base-rspec-pg14-rerun-previous-failed-tests
variables:
PREVIOUS_FAILED_TESTS_FILE: tmp/previous_failed_tests/rspec_ee_failed_files.txt
# EE: Canonical MR pipelines
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 84aa67de4c9..dc469c30207 100644
--- a/.gitlab/ci/rails/rspec-foss-impact.gitlab-ci.yml.erb
+++ b/.gitlab/ci/rails/rspec-foss-impact.gitlab-ci.yml.erb
@@ -22,7 +22,7 @@ dont-interrupt-me:
- echo "This jobs makes sure this pipeline won't be interrupted! See https://docs.gitlab.com/ee/ci/yaml/#interruptible."
.base-rspec-foss-impact:
- extends: .rspec-base-pg13-as-if-foss
+ extends: .rspec-base-pg14-as-if-foss
needs:
- pipeline: $PARENT_PIPELINE_ID
job: detect-tests
diff --git a/.gitlab/ci/rails/rspec-predictive.gitlab-ci.yml.erb b/.gitlab/ci/rails/rspec-predictive.gitlab-ci.yml.erb
index fcd8754c76a..ddcb335d0dd 100644
--- a/.gitlab/ci/rails/rspec-predictive.gitlab-ci.yml.erb
+++ b/.gitlab/ci/rails/rspec-predictive.gitlab-ci.yml.erb
@@ -39,7 +39,7 @@ dont-interrupt-me:
<% if test_suite_prefix.nil? %>
.base-rspec-predictive:
extends:
- - .rspec-base-pg12
+ - .rspec-base-pg13
- .base-predictive
variables:
# We're using the FOSS one here because we want to exclude EE-only ones
@@ -98,7 +98,7 @@ rspec system predictive:
<% if test_suite_prefix == 'ee/' %>
.base-rspec-ee-predictive:
extends:
- - .rspec-ee-base-pg12
+ - .rspec-ee-base-pg13
- .base-predictive
variables:
RSPEC_TESTS_FILTER_FILE: "${RSPEC_MATCHING_TESTS_EE_PATH}"
diff --git a/.gitlab/ci/rails/shared.gitlab-ci.yml b/.gitlab/ci/rails/shared.gitlab-ci.yml
index 33aef166afd..6ea6d8e523c 100644
--- a/.gitlab/ci/rails/shared.gitlab-ci.yml
+++ b/.gitlab/ci/rails/shared.gitlab-ci.yml
@@ -16,7 +16,7 @@ include:
extends:
- .default-retry
- .default-before_script
- - .rails-cache
+ - .ruby-cache
.base-script:
script:
@@ -28,6 +28,10 @@ include:
- section_start "gitaly-test-spawn" "Spawning Gitaly"; scripts/gitaly-test-spawn; section_end "gitaly-test-spawn" # Do not use 'bundle exec' here
- echo -e "\e[0Ksection_end:`date +%s`:gitaly-test-spawn\r\e[0K"
+.no-redis-cluster:
+ variables:
+ USE_REDIS_CLUSTER: "false"
+
.single-db:
variables:
DECOMPOSED_DB: "false"
@@ -71,6 +75,14 @@ include:
# and they should run on their own jobs so we don't need to run them
# in unit tests again.
- rspec_paralellized_job "--tag ~quarantine --tag ~level:background_migration"
+ after_script:
+ - echo -e "\e[0Ksection_start:`date +%s`:report_results_section[collapsed=true]\r\e[0KReport results"
+ - |
+ 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-sandbox/rails-test-failures" --token "${RAILS_TEST_FAILURES_PROJECT_TOKEN}";
+ fi
+ - echo -e "\e[0Ksection_end:`date +%s`:report_results_section\r\e[0K"
+
allow_failure:
exit_codes: !reference [.rspec-base, variables, SUCCESSFULLY_RETRIED_TEST_EXIT_CODE]
@@ -88,12 +100,14 @@ include:
- tmp/capybara/
- log/*.log
reports:
- junit: ${JUNIT_RESULT_FILE}
+ junit: "rspec/rspec-*.xml"
.rspec-base-migration:
script:
- !reference [.base-script, script]
- rspec_paralellized_job "--tag ~quarantine --tag ~zoekt"
+ after_script:
+ - !reference [.rspec-base, after_script]
.rspec-base-pg12:
extends:
@@ -105,11 +119,16 @@ include:
- .rspec-base
- .use-pg13
-.rspec-base-pg13-as-if-foss:
+.rspec-base-pg14:
+ extends:
+ - .rspec-base
+ - .use-pg14
+
+.rspec-base-pg14-as-if-foss:
extends:
- .rspec-base
- .as-if-foss
- - .use-pg13
+ - .use-pg14
needs:
- job: "setup-test-env"
- job: "retrieve-tests-metadata"
@@ -117,10 +136,10 @@ include:
- job: "detect-tests"
optional: true
-.rspec-base-pg14:
+.rspec-base-pg15:
extends:
- .rspec-base
- - .use-pg14
+ - .use-pg15
.rspec-ee-base-pg12:
extends:
@@ -173,11 +192,34 @@ include:
- .use-pg14-opensearch2-ee
- .rails:rules:run-search-tests
+.rspec-ee-base-pg15:
+ extends:
+ - .rspec-base
+ - .use-pg15-es7-ee
+
+.rspec-ee-base-pg15-es8:
+ extends:
+ - .rspec-base
+ - .use-pg15-es8-ee
+ - .rails:rules:run-search-tests
+
+.rspec-ee-base-pg15-opensearch1:
+ extends:
+ - .rspec-base
+ - .use-pg15-opensearch1-ee
+ - .rails:rules:run-search-tests
+
+.rspec-ee-base-pg15-opensearch2:
+ extends:
+ - .rspec-base
+ - .use-pg15-opensearch2-ee
+ - .rails:rules:run-search-tests
+
.db-job-base:
extends:
- .rails-job-base
- .rails:rules:ee-and-foss-migration
- - .use-pg13
+ - .use-pg14
stage: test
needs: ["setup-test-env"]
# rspec job base specs
@@ -185,6 +227,9 @@ include:
############################
# rspec job parallel configs
+# Adjusting these parallel job counts has an impact on the
+# rspec:artifact-collector jobs in .gitlab/ci/rails.gitlab-ci.yml
+# Please double-check and adjust accordingly
.rspec-migration-parallel:
parallel: 8
diff --git a/.gitlab/ci/release-environments/main.gitlab-ci.yml b/.gitlab/ci/release-environments/main.gitlab-ci.yml
index aa6afee57ae..6c28ba3e2dd 100644
--- a/.gitlab/ci/release-environments/main.gitlab-ci.yml
+++ b/.gitlab/ci/release-environments/main.gitlab-ci.yml
@@ -1,69 +1,17 @@
---
-default:
- interruptible: true
-
-stages:
- - prepare
- - deploy
-
include:
- - local: .gitlab/ci/global.gitlab-ci.yml
+ - local: .gitlab/ci/cng/main.gitlab-ci.yml
-release-environments-build-cng-env:
+review-build-cng-env:
allow_failure: true
- image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}ruby:${RUBY_VERSION}-alpine3.16
- stage: prepare
- 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 CNG pipeline.
- - pipeline: $PARENT_PIPELINE_ID
- job: build-assets-image
- variables:
- BUILD_ENV: build.env
- before_script:
- - source ./scripts/utils.sh
- - install_gitlab_gem
- script:
- - 'ruby -r./scripts/trigger-build.rb -e "puts Trigger.variables_for_env_file(Trigger::CNG.new.variables)" > $BUILD_ENV'
- - echo "GITLAB_ASSETS_TAG=$(assets_image_tag)" >> $BUILD_ENV
- - ruby -e 'puts "FULL_RUBY_VERSION=#{RUBY_VERSION}"' >> build.env
- - cat $BUILD_ENV
- artifacts:
- reports:
- dotenv: $BUILD_ENV
- paths:
- - $BUILD_ENV
- expire_in: 7 days
- when: always
-release-environments-build-cng:
- allow_failure: true
- stage: prepare
- needs: ["release-environments-build-cng-env"]
- inherit:
- variables: false
+review-build-cng:
+ needs: ["review-build-cng-env"]
variables:
- GITLAB_REF_SLUG: "${GITLAB_REF_SLUG}"
- # CNG pipeline specific variables
- GITLAB_VERSION: "${GITLAB_VERSION}"
- GITLAB_TAG: "${GITLAB_TAG}"
- GITLAB_ASSETS_TAG: "${GITLAB_ASSETS_TAG}"
- FORCE_RAILS_IMAGE_BUILDS: "${FORCE_RAILS_IMAGE_BUILDS}"
- CE_PIPELINE: "${CE_PIPELINE}" # Based on https://docs.gitlab.com/ee/ci/jobs/job_control.html#check-if-a-variable-exists, `if: '$CE_PIPELINE'` will evaluate to `false` when this variable is empty
- EE_PIPELINE: "${EE_PIPELINE}" # Based on https://docs.gitlab.com/ee/ci/jobs/job_control.html#check-if-a-variable-exists, `if: '$EE_PIPELINE'` will evaluate to `false` when this variable is empty
- 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}"
- GITALY_SERVER_VERSION: "${GITALY_SERVER_VERSION}"
- RUBY_VERSION: "${FULL_RUBY_VERSION}"
IMAGE_TAG_EXT: "-${CI_COMMIT_SHORT_SHA}"
- trigger:
- project: gitlab-org/build/CNG-mirror
- branch: $TRIGGER_BRANCH
- strategy: depend
+ allow_failure: true
-release-environments-deploy-env:
+review-deploy-env:
allow_failure: true
stage: deploy
needs: ["release-environments-build-cng"]
@@ -79,10 +27,10 @@ release-environments-deploy-env:
expire_in: 7 days
when: always
-release-environments-deploy:
+review-deploy:
allow_failure: true
stage: deploy
- needs: ["release-environments-deploy-env"]
+ needs: ["review-deploy-env"]
inherit:
variables: false
variables:
diff --git a/.gitlab/ci/reports.gitlab-ci.yml b/.gitlab/ci/reports.gitlab-ci.yml
index b072b3dc772..0290d0158b6 100644
--- a/.gitlab/ci/reports.gitlab-ci.yml
+++ b/.gitlab/ci/reports.gitlab-ci.yml
@@ -74,20 +74,13 @@ gemnasium-dependency_scanning:
gemnasium-python-dependency_scanning:
rules: !reference [".reports:rules:gemnasium-python-dependency_scanning", rules]
-yarn-audit-dependency_scanning:
- extends: .ds-analyzer
- image: "${REGISTRY_HOST}/${REGISTRY_GROUP}/security-products/analyzers/npm-audit:1"
- variables:
- TOOL: yarn
- rules: !reference [".reports:rules:yarn-audit-dependency_scanning", rules]
-
# Analyze dependencies for malicious behavior
# See https://gitlab.com/gitlab-com/gl-security/security-research/package-hunter
.package_hunter-base:
extends: .default-retry
stage: test
image:
- name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/security-products/package-hunter-cli:v1.3.3@sha256:1d3af9a61aa01549a62be17fa655fcf06271ac9e1b1e822c2a7930fa1d4a8a6b
+ name: ${REGISTRY_HOST}/${REGISTRY_GROUP}/security-products/package-hunter-cli:v2.1.0@sha256:1f1d31fdc81f6cf0ee305ff0291bfb56f22c5764fe042948ff1676f2f8c60352
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 680254a6640..3522dac39e4 100644
--- a/.gitlab/ci/review-apps/main.gitlab-ci.yml
+++ b/.gitlab/ci/review-apps/main.gitlab-ci.yml
@@ -10,6 +10,7 @@ stages:
- dast
include:
+ - local: .gitlab/ci/cng/main.gitlab-ci.yml
- local: .gitlab/ci/global.gitlab-ci.yml
- local: .gitlab/ci/review-apps/rules.gitlab-ci.yml
- local: .gitlab/ci/review-apps/qa.gitlab-ci.yml
@@ -31,63 +32,10 @@ review-build-cng-env:
extends:
- .default-retry
- .review:rules:review-build-cng
- image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}ruby:${RUBY_VERSION}-alpine3.16
- stage: prepare
- 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 CNG pipeline.
- - pipeline: $PARENT_PIPELINE_ID
- job: build-assets-image
- variables:
- BUILD_ENV: build.env
- before_script:
- - source ./scripts/utils.sh
- - install_gitlab_gem
- script:
- - 'ruby -r./scripts/trigger-build.rb -e "puts Trigger.variables_for_env_file(Trigger::CNG.new.variables)" > $BUILD_ENV'
- - echo "GITLAB_ASSETS_TAG=$(assets_image_tag)" >> $BUILD_ENV
- - ruby -e 'puts "FULL_RUBY_VERSION=#{RUBY_VERSION}"' >> build.env
- - cat $BUILD_ENV
- artifacts:
- reports:
- dotenv: $BUILD_ENV
- paths:
- - $BUILD_ENV
- expire_in: 7 days
- when: always
review-build-cng:
extends: .review:rules:review-build-cng
- stage: prepare
needs: ["review-build-cng-env"]
- inherit:
- variables: false
- variables:
- TOP_UPSTREAM_SOURCE_PROJECT: "${TOP_UPSTREAM_SOURCE_PROJECT}"
- TOP_UPSTREAM_SOURCE_REF: "${TOP_UPSTREAM_SOURCE_REF}"
- TOP_UPSTREAM_SOURCE_JOB: "${TOP_UPSTREAM_SOURCE_JOB}"
- TOP_UPSTREAM_SOURCE_SHA: "${TOP_UPSTREAM_SOURCE_SHA}"
- TOP_UPSTREAM_MERGE_REQUEST_PROJECT_ID: "${TOP_UPSTREAM_MERGE_REQUEST_PROJECT_ID}"
- TOP_UPSTREAM_MERGE_REQUEST_IID: "${TOP_UPSTREAM_MERGE_REQUEST_IID}"
- GITLAB_REF_SLUG: "${GITLAB_REF_SLUG}"
- # CNG pipeline specific variables
- GITLAB_VERSION: "${GITLAB_VERSION}"
- GITLAB_TAG: "${GITLAB_TAG}"
- GITLAB_ASSETS_TAG: "${GITLAB_ASSETS_TAG}"
- FORCE_RAILS_IMAGE_BUILDS: "${FORCE_RAILS_IMAGE_BUILDS}"
- CE_PIPELINE: "${CE_PIPELINE}" # Based on https://docs.gitlab.com/ee/ci/jobs/job_control.html#check-if-a-variable-exists, `if: '$CE_PIPELINE'` will evaluate to `false` when this variable is empty
- EE_PIPELINE: "${EE_PIPELINE}" # Based on https://docs.gitlab.com/ee/ci/jobs/job_control.html#check-if-a-variable-exists, `if: '$EE_PIPELINE'` will evaluate to `false` when this variable is empty
- 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}"
- GITALY_SERVER_VERSION: "${GITALY_SERVER_VERSION}"
- RUBY_VERSION: "${FULL_RUBY_VERSION}"
- trigger:
- project: gitlab-org/build/CNG-mirror
- branch: $TRIGGER_BRANCH
- strategy: depend
.review-workflow-base:
image: ${REVIEW_APPS_IMAGE}
@@ -96,7 +44,7 @@ review-build-cng:
variables:
HOST_SUFFIX: "${CI_ENVIRONMENT_SLUG}"
DOMAIN: "-${CI_ENVIRONMENT_SLUG}.${REVIEW_APPS_DOMAIN}"
- GITLAB_HELM_CHART_REF: "febc4ad69acb7bba0eeb4a62daa577d0b7c3ee71" # 6.9.1: https://gitlab.com/gitlab-org/charts/gitlab/-/commit/febc4ad69acb7bba0eeb4a62daa577d0b7c3ee71
+ GITLAB_HELM_CHART_REF: "75b1486a9aec212d0f49ef1251526d8e51004bbc" # 7.0.1: https://gitlab.com/gitlab-org/charts/gitlab/-/commit/75b1486a9aec212d0f49ef1251526d8e51004bbc
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}
diff --git a/.gitlab/ci/review-apps/qa.gitlab-ci.yml b/.gitlab/ci/review-apps/qa.gitlab-ci.yml
index 9dd24f20c4f..ccbdfd3c298 100644
--- a/.gitlab/ci/review-apps/qa.gitlab-ci.yml
+++ b/.gitlab/ci/review-apps/qa.gitlab-ci.yml
@@ -1,10 +1,5 @@
include:
- - project: gitlab-org/quality/pipeline-common
- ref: 5.1.1
- file:
- - /ci/base.gitlab-ci.yml
- - /ci/allure-report.yml
- - /ci/knapsack-report.yml
+ - local: .gitlab/ci/qa-common/main.gitlab-ci.yml
- template: Verify/Browser-Performance.gitlab-ci.yml
.test-variables:
@@ -21,12 +16,12 @@ include:
.bundle-base:
extends:
- .qa-cache
- image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-bullseye-ruby-${RUBY_VERSION}:bundler-2.3
+ - .ruby-image
before_script:
- cd qa && bundle install
.review-qa-base:
- image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-bullseye-ruby-${RUBY_VERSION}:bundler-2.3-git-2.36-lfs-2.9-chrome-${CHROME_VERSION}-docker-${DOCKER_VERSION}-gcloud-383-kubectl-1.23
+ 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
extends:
- .use-docker-in-docker
- .bundle-base
@@ -75,8 +70,6 @@ review-qa-smoke:
- .rules:qa-smoke
variables:
QA_SCENARIO: Test::Instance::Smoke
- QA_RUN_TYPE: review-qa-smoke
- retry: 1
review-qa-blocking:
extends:
@@ -84,7 +77,6 @@ review-qa-blocking:
- .rules:qa-blocking
variables:
QA_SCENARIO: Test::Instance::ReviewBlocking
- QA_RUN_TYPE: review-qa-blocking
retry: 1
review-qa-blocking-parallel:
extends:
@@ -98,7 +90,6 @@ review-qa-non-blocking:
- .rules:qa-non-blocking
variables:
QA_SCENARIO: Test::Instance::ReviewNonBlocking
- QA_RUN_TYPE: review-qa-non-blocking
when: manual
allow_failure: true
review-qa-non-blocking-parallel:
@@ -118,18 +109,12 @@ browser_performance:
e2e-test-report:
extends:
- - .generate-allure-report-base
+ - .e2e-test-report
- .rules:prepare-report
stage: post-qa
variables:
- ALLURE_JOB_NAME: e2e-review-qa
- ALLURE_PROJECT_PATH: $CI_PROJECT_PATH
ALLURE_RESULTS_GLOB: qa/tmp/allure-results
- ALLURE_MERGE_REQUEST_IID: $CI_MERGE_REQUEST_IID
- GITLAB_AUTH_TOKEN: $PROJECT_TOKEN_FOR_CI_SCRIPTS_API_USAGE
- GIT_STRATEGY: none
- allow_failure: true
- when: always
+ ALLURE_JOB_NAME: $QA_RUN_TYPE
upload-knapsack-report:
extends:
@@ -145,38 +130,29 @@ delete-test-resources:
- .rules:prepare-report
stage: post-qa
variables:
- QA_TEST_RESOURCES_FILE_PATTERN: $CI_PROJECT_DIR/qa/tmp/test-resources-*.json
GITLAB_QA_ACCESS_TOKEN: $REVIEW_APPS_ROOT_TOKEN
script:
- export GITLAB_ADDRESS="$QA_GITLAB_URL"
- - bundle exec rake "test_resources:delete[$QA_TEST_RESOURCES_FILE_PATTERN]"
+ - bundle exec rake "test_resources:delete[$CI_PROJECT_DIR/qa/tmp/test-resources-*.json]"
allow_failure: true
- when: always
notify-slack:
extends:
- - .notify-slack-qa
- - .qa-cache
+ - .notify-slack
- .rules:main-run
stage: post-qa
variables:
+ QA_RSPEC_XML_FILE_PATTERN: ${CI_PROJECT_DIR}/qa/tmp/rspec-*.xml
RUN_WITH_BUNDLE: "true"
- QA_PATH: qa
- ALLURE_JOB_NAME: e2e-review-qa
- SLACK_ICON_EMOJI: ci_failing
- STATUS_SYM: ☠️
- STATUS: failed
- TYPE: "(review-app) "
+ ALLURE_JOB_NAME: $QA_RUN_TYPE
when: on_failure
- script:
- - bundle exec prepare-stage-reports --input-files "${CI_PROJECT_DIR}/qa/tmp/rspec-*.xml"
- - !reference [.notify-slack-qa, script]
export-test-metrics:
extends:
+ - .export-test-metrics
- .bundle-base
- .rules:main-run
stage: post-qa
+ variables:
+ QA_METRICS_REPORT_FILE_PATTERN: tmp/test-metrics-*.json
when: always
- script:
- - bundle exec rake "ci:export_test_metrics[tmp/test-metrics-*.json]"
diff --git a/.gitlab/ci/review.gitlab-ci.yml b/.gitlab/ci/review.gitlab-ci.yml
index 6d38c651985..68bfa682d0f 100644
--- a/.gitlab/ci/review.gitlab-ci.yml
+++ b/.gitlab/ci/review.gitlab-ci.yml
@@ -90,6 +90,7 @@ start-review-app-pipeline:
- REVIEW_APPS_GCP_REGION
- REVIEW_APPS_IMAGE
- RUBY_VERSION
+ - DEBIAN_VERSION
# These variables are set in the pipeline schedules.
# They need to be explicitly passed on to the child pipeline.
@@ -100,36 +101,30 @@ start-review-app-pipeline:
SCHEDULE_TYPE: $SCHEDULE_TYPE
DAST_RUN: $DAST_RUN
SKIP_MESSAGE: Skipping review-app due to mr containing only quarantine changes!
+ QA_RUN_TYPE: e2e-review-qa
trigger:
strategy: depend
include:
- artifact: review-app-pipeline.yml
job: e2e-test-pipeline-generate
+include:
+ - remote: 'https://gitlab.com/gitlab-org/quality/pipeline-common/-/raw/6.4.0/ci/danger-review.yml'
+
danger-review:
extends:
- .default-retry
- .ruby-node-cache
- .review:rules:danger
- stage: test
- needs: []
+ image: "${DEFAULT_CI_IMAGE}"
before_script:
- source scripts/utils.sh
- bundle_install_script "--with danger"
- yarn_install_script
- script:
- # ${DANGER_DANGERFILE} is used by Jihulab for customizing danger support: https://jihulab.com/gitlab-cn/gitlab/-/blob/main-jh/jh/.gitlab-ci.yml
- - >
- if [ -z "$DANGER_GITLAB_API_TOKEN" ]; then
- run_timed_command danger_as_local
- else
- danger_id=$(echo -n ${DANGER_GITLAB_API_TOKEN} | md5sum | awk '{print $1}' | cut -c5-10)
- run_timed_command "bundle exec danger --fail-on-errors=true --verbose --danger_id=\"${danger_id}\" --dangerfile=\"${DANGER_DANGERFILE:-Dangerfile}\""
- fi
danger-review-local:
- extends:
- - danger-review
- - .review:rules:danger-local
- script:
- - run_timed_command danger_as_local
+ extends: danger-review
+ before_script:
+ - !reference ["danger-review", "before_script"]
+ # We unset DANGER_GITLAB_API_TOKEN so that Danger will run as local from `danger-review:script`
+ - unset DANGER_GITLAB_API_TOKEN
diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml
index 0b660c4c0a7..1c1f6cfa96a 100644
--- a/.gitlab/ci/rules.gitlab-ci.yml
+++ b/.gitlab/ci/rules.gitlab-ci.yml
@@ -12,10 +12,10 @@
if: '$CI_PROJECT_NAME != "gitlab-foss" && $CI_PROJECT_NAME != "gitlab-ce" && $CI_PROJECT_NAME != "gitlabhq"'
.if-jh: &if-jh
- # Example of these projects:
+ # Matches these two projects:
# https://jihulab.com/gitlab-cn/gitlab
# https://gitlab.com/gitlab-org-sandbox/gitlab-jh-validation
- if: '$CI_PROJECT_PATH =~ /^gitlab-(jh|cn)\/.*/ || $CI_PROJECT_NAME =~ /^gitlab-jh/'
+ if: '$CI_PROJECT_PATH == "gitlab-cn/gitlab" || $CI_PROJECT_PATH == "gitlab-org-sandbox/gitlab-jh-validation"'
.if-force-ci: &if-force-ci
if: '$FORCE_GITLAB_CI'
@@ -48,7 +48,7 @@
if: '($CI_MERGE_REQUEST_EVENT_TYPE == "merged_result" || $CI_MERGE_REQUEST_EVENT_TYPE == "detached") && $CI_MERGE_REQUEST_LABELS !~ /pipeline:mr-approved/'
.if-automated-merge-request: &if-automated-merge-request
- if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == "release-tools/update-gitaly" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /stable-ee$/'
+ if: '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == "release-tools/update-gitaly" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /stable-(ee|jh)$/'
.if-merge-request-targeting-stable-branch: &if-merge-request-targeting-stable-branch
if: '($CI_MERGE_REQUEST_EVENT_TYPE == "merged_result" || $CI_MERGE_REQUEST_EVENT_TYPE == "detached") && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^[\d-]+-stable(-ee)?$/'
@@ -169,6 +169,7 @@
- ".gitlab/ci/frontend.gitlab-ci.yml"
- ".gitlab/ci/build-images.gitlab-ci.yml"
- ".gitlab/ci/review.gitlab-ci.yml"
+ - ".gitlab/ci/cng/**/*"
- ".gitlab/ci/review-apps/**/*"
- "scripts/review_apps/**/*"
- "scripts/trigger-build.rb"
@@ -185,6 +186,7 @@
- ".gitlab/ci/package-and-test/*.yml"
- ".gitlab/ci/review-apps/qa.gitlab-ci.yml"
- ".gitlab/ci/review-apps/rules.gitlab-ci.yml"
+ - ".gitlab/ci/test-on-gdk/*.yml"
.gitaly-patterns: &gitaly-patterns
- "GITALY_SERVER_VERSION"
@@ -338,6 +340,24 @@
- "{,ee/,jh/}{bin,config,db,generator_templates,lib}/**/*"
- "{,ee/,jh/}spec/**/*"
+# Redis patterns + feature flags
+.redis-patterns: &redis-patterns
+ - "{,ee/,jh/}{,spec/}app/models/concerns/redis_cacheable{,_spec}.rb"
+ - "{,ee/,jh/}{,spec/}app/models/ci/build_trace_chunks/redis{,_base,_trace_chunks}{,_spec}.rb"
+ - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/usage_data_counters/{hll_redis_counter,redis_counter}{,_spec}.rb"
+ - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/usage/metrics/instrumentations/redis{_metric,hll_metric}{,_spec}.rb"
+ - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/usage/metrics/aggregates/sources/redis_hll{,_spec}.rb"
+ - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/patch/action_cable_redis_listener{,_spec}.rb"
+ - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/merge_requests/mergeability/redis_interface{,_spec}.rb"
+ - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/markdown_cache/redis/*.rb"
+ - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/redis/**/*.rb"
+ - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/instrumentation/*.rb"
+ - "{,ee/,jh/}{,spec/}lib/{,ee/,jh/}gitlab/redis.rb"
+ - "{,ee/,jh/}config/initializers/7_redis.rb"
+ # Feature flag changes
+ - "{,ee/,jh/}{,spec/}lib/feature.rb"
+ - "config/feature_flags/**/*"
+
# DB patterns + .ci-patterns
.db-patterns: &db-patterns
- "{,ee/,jh/}{,spec/}{db,migrations}/**/*"
@@ -522,9 +542,6 @@
- "config.ru"
- "{,ee/,jh/}{app,bin,config,db,generator_templates,haml_lint,lib,locale,public,scripts,storybook,symbol,vendor}/**/*"
- "doc/api/graphql/reference/*" # Files in this folder are auto-generated
- # Mapped patterns (see tests.yml)
- - "data/whats_new/*.yml"
- - "doc/index.md"
# CI changes
- ".gitlab-ci.yml"
- ".gitlab/ci/**/*"
@@ -538,6 +555,9 @@
# QA changes
- ".dockerignore"
- "{,jh/}qa/**/*"
+ # Mapped patterns (see tests.yml)
+ - "data/whats_new/*.yml"
+ - "doc/index.md"
# Workhorse changes
- "GITLAB_WORKHORSE_VERSION"
- "workhorse/**/*"
@@ -815,6 +835,7 @@
- <<: *if-merge-request-labels-pipeline-expedite
when: never
- <<: *if-merge-request-targeting-stable-branch
+ changes: *setup-test-env-patterns
- <<: *if-merge-request-labels-run-review-app
- <<: *if-merge-request
changes: *ci-build-images-patterns
@@ -856,19 +877,70 @@
.build-images:rules:build-qa-image-as-if-foss:
rules:
- !reference [".build-images:rules:build-qa-image-merge-requests", "rules"]
+ - <<: *if-default-branch-schedule-nightly
+ variables:
+ ARCH: amd64,arm64
-# We want to rebuild the master image when the full e2e test pipeline runs. Currently this happens on a 2 hour schedule.
-.build-images:rules:build-qa-on-gdk-master-image:
+# We use a multi-stage image to:
+# - (re)build the first stage in master pipelines (including scheduled pipelines), and
+# - build the final stage in code-change pipelines (including MRs), and scheduled pipelines
+# This has to match ".qa:rules:e2e:test-on-gdk" otherwise there won't be an image available to run GDK in the test jobs.
+# Unfortunately, we can't just include ".qa:rules:e2e:test-on-gdk" because some of the conditions are manual
+.build-images:rules:build-gdk-image:
rules:
- if: '$QA_RUN_TESTS_ON_GDK !~ /true|yes|1/i'
when: never
- - <<: *if-not-canonical-namespace
+ - !reference [".qa:rules:package-and-test-never-run", rules]
+ - <<: *if-default-branch-schedule-nightly # already executed in the 2-hourly schedule
when: never
- - <<: *if-not-ee
- when: never
- - <<: *if-dot-com-gitlab-org-schedule
+ - <<: *if-default-branch-refs # Includes scheduled pipelines
variables:
- ARCH: amd64,arm64
+ BUILD_GDK_BASE: "true"
+ allow_failure: true
+ # We want to also rebuild the base image if MRs change certain components.
+ - <<: *if-merge-request
+ variables:
+ BUILD_GDK_BASE: "true"
+ changes:
+ - qa/gdk/**/*
+ - Gemfile.lock
+ - yarn.lock
+ - workhorse/**/*
+ - VERSION
+ - GITLAB_METRICS_EXPORTER_VERSION
+ - GITLAB_SHELL_VERSION
+ - GITALY_SERVER_VERSION
+ allow_failure: true
+ # The rest are included to be consistent with .qa:rules:e2e:test-on-gdk
+ - <<: *if-merge-request-targeting-stable-branch
+ changes: *setup-test-env-patterns
+ allow_failure: true
+ - <<: *if-ruby2-branch
+ allow_failure: true
+ # We include the job under the matching conditions below, but unlike in .qa:rules:e2e:test-on-gdk we don't need to
+ # set OMNIBUS_GITLAB_BUILD_ON_ALL_OS when testing against GDK
+ - <<: *if-merge-request
+ changes: *dependency-patterns
+ allow_failure: true
+ - <<: *if-merge-request-labels-run-all-e2e
+ allow_failure: true
+ - <<: *if-merge-request
+ changes: *feature-flag-development-config-patterns
+ allow_failure: true
+ - <<: *if-merge-request
+ changes: *initializers-patterns
+ allow_failure: true
+ - <<: *if-merge-request
+ changes: *nodejs-patterns
+ allow_failure: true
+ - <<: *if-merge-request
+ changes: *ci-qa-patterns
+ allow_failure: true
+ - <<: *if-merge-request
+ changes: *code-qa-patterns
+ allow_failure: true
+ - <<: *if-force-ci
+ allow_failure: true
.build-images:rules:build-assets-image:
rules:
@@ -877,6 +949,7 @@
- <<: *if-merge-request-labels-pipeline-expedite
when: never
- <<: *if-merge-request-targeting-stable-branch
+ changes: *setup-test-env-patterns
- <<: *if-ruby2-branch
- <<: *if-merge-request-labels-run-review-app
- <<: *if-auto-deploy-branches
@@ -884,7 +957,8 @@
changes: *ci-build-images-patterns
- <<: *if-default-refs
changes: *code-qa-patterns
- # Rules to support .qa:rules:package-and-test-ee
+ # Rules to support .qa:rules:package-and-test
+ - <<: *if-default-branch-schedule-nightly
- <<: *if-merge-request
changes: *dependency-patterns
- <<: *if-merge-request-labels-run-all-e2e
@@ -902,8 +976,6 @@
rules:
- <<: *if-not-ee
when: never
- - <<: *if-merge-request-labels-pipeline-expedite
- when: never
- !reference [".build-images:rules:build-assets-image", "rules"]
#################
@@ -1072,10 +1144,12 @@
- <<: *if-merge-request-labels-pipeline-expedite
when: never
- <<: *if-merge-request-targeting-stable-branch
+ changes: *setup-test-env-patterns
- <<: *if-merge-request-labels-run-review-app
- <<: *if-merge-request-labels-run-all-e2e
- <<: *if-auto-deploy-branches
- <<: *if-ruby2-branch
+ - <<: *if-default-branch-schedule-nightly
- <<: *if-default-refs
changes: *ci-build-images-patterns
- <<: *if-default-refs
@@ -1280,17 +1354,6 @@
##########
# Notify #
##########
-.notify:rules:create-issues-for-failing-tests:
- rules:
- - <<: *if-not-canonical-namespace
- when: never
- # Don't report child pipeline failures
- - if: '$CI_PIPELINE_SOURCE == "parent_pipeline"'
- when: never
- - if: '$CREATE_ISSUES_FOR_FAILING_TESTS == "true"'
- when: on_failure
- allow_failure: true
-
.notify:rules:notify-package-and-test-failure:
rules:
- <<: *if-not-canonical-namespace
@@ -1298,6 +1361,7 @@
- <<: *if-security-merge-request
when: never
- <<: *if-merge-request-targeting-stable-branch
+ changes: *setup-test-env-patterns
when: always
###############
@@ -1310,6 +1374,13 @@
############
# QA rules #
############
+.qa:rules:code-merge-request-manual:
+ rules:
+ - <<: *if-merge-request
+ changes: *code-patterns
+ when: manual
+ allow_failure: true
+
.qa:rules:internal:
rules:
- <<: *if-default-refs
@@ -1341,6 +1412,7 @@
- <<: *if-merge-request-labels-pipeline-expedite
when: never
- <<: *if-merge-request-targeting-stable-branch
+ changes: *setup-test-env-patterns
allow_failure: true
- <<: *if-merge-request
changes: *code-backstage-qa-patterns
@@ -1369,7 +1441,7 @@
- <<: *if-force-ci
allow_failure: true
-.qa:rules:package-and-test-common:
+.qa:rules:package-and-test-never-run:
rules:
- <<: *if-not-canonical-namespace
when: never
@@ -1377,7 +1449,12 @@
when: never
- <<: *if-merge-request-labels-pipeline-expedite
when: never
+
+.qa:rules:package-and-test-common:
+ rules:
+ - !reference [".qa:rules:package-and-test-never-run", rules]
- <<: *if-merge-request-targeting-stable-branch
+ changes: *setup-test-env-patterns
allow_failure: true
- <<: *if-ruby2-branch
allow_failure: true
@@ -1417,17 +1494,16 @@
- <<: *if-force-ci
when: manual
allow_failure: true
- - <<: *if-merge-request
- changes: *code-patterns
- when: manual
- allow_failure: true
+ # We used to have a rule at the end here that would catch any remaining code MRs and allow the job to be run
+ # manually. That rule is now in ".qa:rules:code-merge-request-manual" so it can be included when needed and we can
+ # still use ".qa:rules:package-and-test-common" in jobs we don't want to be manual.
.qa:rules:package-and-test-schedule:
rules:
- <<: *if-dot-com-gitlab-org-schedule
allow_failure: true
variables:
- SKIP_REPORT_IN_ISSUES: "false"
+ CREATE_TEST_FAILURE_ISSUES: "true"
PROCESS_TEST_RESULTS: "true"
KNAPSACK_GENERATE_REPORT: "true"
UPDATE_QA_CACHE: "true"
@@ -1436,17 +1512,15 @@
.qa:rules:package-and-test-ee:
rules:
+ - <<: *if-default-branch-schedule-nightly # already executed in the 2-hourly schedule
+ when: never
- !reference [".qa:rules:package-and-test-common", rules]
- !reference [".qa:rules:package-and-test-schedule", rules]
+ - !reference [".qa:rules:code-merge-request-manual", rules]
.qa:rules:package-and-test-ce:
rules:
- - <<: *if-not-canonical-namespace
- when: never
- - <<: *if-not-ee
- when: never
- - <<: *if-merge-request-labels-pipeline-expedite
- when: never
+ - !reference [".qa:rules:package-and-test-never-run", rules]
- <<: *if-dot-com-gitlab-org-and-security-merge-request
changes: *ci-build-images-patterns
when: manual
@@ -1455,22 +1529,30 @@
changes: *code-qa-patterns
when: manual
allow_failure: true
+ - <<: *if-default-branch-schedule-nightly
+ allow_failure: true
+ variables:
+ CREATE_TEST_FAILURE_ISSUES: "true"
+ PROCESS_TEST_RESULTS: "true"
+ QA_SAVE_TEST_METRICS: "true"
+ QA_EXPORT_TEST_METRICS: "false"
.qa:rules:e2e:test-on-gdk:
rules:
- if: '$QA_RUN_TESTS_ON_GDK !~ /true|yes|1/i'
when: never
+ - <<: *if-default-branch-schedule-nightly # already executed in the 2-hourly schedule
+ when: never
- !reference [".qa:rules:package-and-test-common", rules]
- !reference [".qa:rules:package-and-test-schedule", rules]
+ # Run automatically in all other code MRs that weren't included in ".qa:rules:package-and-test-common".
+ - <<: *if-merge-request
+ changes: *code-patterns
+ allow_failure: true
-.qa:rules:package-and-test-sidebar:
+.qa:rules:package-and-test-old-nav:
rules:
- - <<: *if-not-canonical-namespace
- when: never
- - <<: *if-not-ee
- when: never
- - <<: *if-merge-request-labels-pipeline-expedite
- when: never
+ - !reference [".qa:rules:package-and-test-never-run", rules]
- <<: *if-merge-request
changes: *code-patterns
when: manual
@@ -1478,7 +1560,7 @@
- <<: *if-default-branch-schedule-nightly
allow_failure: true
variables:
- SKIP_REPORT_IN_ISSUES: "false"
+ CREATE_TEST_FAILURE_ISSUES: "true"
PROCESS_TEST_RESULTS: "true"
QA_SAVE_TEST_METRICS: "true"
QA_EXPORT_TEST_METRICS: "false"
@@ -1486,12 +1568,24 @@
.qa:rules:package-and-test-nightly:
rules:
- <<: *if-default-branch-schedule-nightly
+ allow_failure: true
variables:
KNAPSACK_GENERATE_REPORT: "true"
- SKIP_REPORT_IN_ISSUES: "false"
+ PROCESS_TEST_RESULTS: "true"
+ CREATE_TEST_FAILURE_ISSUES: "true"
QA_SAVE_TEST_METRICS: "true"
QA_EXPORT_TEST_METRICS: "false"
+.qa:rules:trigger-omnibus:
+ rules:
+ - !reference [".qa:rules:package-and-test-nightly", rules]
+ - !reference [".qa:rules:package-and-test-ee", rules]
+
+.qa:rules:trigger-omnibus-ce:
+ rules:
+ - !reference [".qa:rules:package-and-test-nightly", rules]
+ - !reference [".qa:rules:package-and-test-ce", rules]
+
###############
# Rails rules #
###############
@@ -1501,6 +1595,15 @@
changes: *setup-test-env-patterns
- <<: *if-merge-request-labels-run-all-rspec
+.rails:rules:single-redis:
+ rules:
+ - <<: *if-merge-request-labels-run-single-db
+ - <<: *if-merge-request-labels-pipeline-expedite
+ when: never
+ - <<: *if-merge-request
+ changes: *redis-patterns
+ - <<: *if-default-branch-schedule-nightly
+
.rails:rules:single-db:
rules:
- <<: *if-merge-request-labels-run-single-db
@@ -2210,17 +2313,6 @@
- <<: *if-default-refs
changes: *python-patterns
-.reports:rules:yarn-audit-dependency_scanning:
- rules:
- - <<: *if-merge-request-labels-pipeline-expedite
- when: never
- - if: '$DEPENDENCY_SCANNING_DISABLED || $GITLAB_FEATURES !~ /\bdependency_scanning\b/'
- when: never
- # Run Dependency Scanning on master until https://gitlab.com/gitlab-org/gitlab/-/issues/361657 is resolved
- - <<: *if-default-branch-refs
- - <<: *if-default-refs
- changes: *nodejs-patterns
-
.reports:rules:test-dast:
rules:
- <<: *if-merge-request-labels-pipeline-expedite
@@ -2411,25 +2503,6 @@
- <<: *if-default-refs
changes: *code-backstage-patterns
-.setup:rules:rails-production-server-boot:
- rules:
- - <<: *if-default-refs
- changes: *code-patterns
-
-.setup:rules:no-ee-check:
- rules:
- - <<: *if-not-foss
- when: never
- - <<: *if-default-refs
- changes: *code-backstage-patterns
-
-.setup:rules:no-jh-check:
- rules:
- - <<: *if-jh
- when: never
- - <<: *if-default-refs
- changes: *code-backstage-patterns
-
.setup:rules:verify-ruby-3.0:
rules:
- <<: *if-merge-request-labels-run-in-ruby2
@@ -2461,6 +2534,29 @@
- "scripts/rspec_helpers.sh"
#######################
+# Preflight rules #
+#######################
+
+.preflight:rules:rails-production-server-boot:
+ rules:
+ - <<: *if-default-refs
+ changes: *code-patterns
+
+.preflight:rules:no-ee-check:
+ rules:
+ - <<: *if-not-foss
+ when: never
+ - <<: *if-default-refs
+ changes: *code-backstage-patterns
+
+.preflight:rules:no-jh-check:
+ rules:
+ - <<: *if-jh
+ when: never
+ - <<: *if-default-refs
+ changes: *code-backstage-patterns
+
+#######################
# Test metadata rules #
#######################
.test-metadata:rules:retrieve-tests-metadata:
diff --git a/.gitlab/ci/setup.gitlab-ci.yml b/.gitlab/ci/setup.gitlab-ci.yml
index 36e2c338748..85409d37fa4 100644
--- a/.gitlab/ci/setup.gitlab-ci.yml
+++ b/.gitlab/ci/setup.gitlab-ci.yml
@@ -83,8 +83,8 @@ verify-approvals:
generate-frontend-fixtures-mapping:
extends:
- .setup:rules:generate-frontend-fixtures-mapping
- - .use-pg13
- - .rails-cache
+ - .use-pg14
+ - .ruby-cache
needs: ["setup-test-env"]
stage: prepare
before_script:
@@ -171,3 +171,46 @@ e2e-test-pipeline-generate:
expire_in: 1 day
paths:
- '*-pipeline.yml'
+ - "${CI_PROJECT_DIR}/qa_tests_vars.env"
+
+trigger-omnibus-env:
+ stage: prepare
+ extends:
+ - .qa:rules:package-and-test-ee
+ 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.
+ - compile-production-assets
+ variables:
+ BUILD_ENV: build.env
+ before_script:
+ - source scripts/utils.sh
+ 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 as-if-foss:
+ extends:
+ - trigger-omnibus-env
+ - .qa:rules:package-and-test-ce
+ needs:
+ - compile-production-assets as-if-foss
diff --git a/.gitlab/ci/static-analysis.gitlab-ci.yml b/.gitlab/ci/static-analysis.gitlab-ci.yml
index b9c9200d78b..b351a63ecf0 100644
--- a/.gitlab/ci/static-analysis.gitlab-ci.yml
+++ b/.gitlab/ci/static-analysis.gitlab-ci.yml
@@ -45,7 +45,7 @@ static-verification-with-database:
- .static-analysis-base
- .rubocop-job-cache
- .static-analysis:rules:static-verification-with-database
- - .use-pg13
+ - .use-pg14
script:
- bundle exec rake lint:static_verification_with_database
variables:
@@ -211,7 +211,7 @@ ping-appsec-for-sast-findings:
- .ping-appsec-for-sast-findings:rules
variables:
# Project Access Token bot ID for /gitlab-com/gl-security/appsec/sast-custom-rules
- BOT_USER_ID: 13559989
+ BOT_USER_ID: 14406065
needs:
- semgrep-appsec-custom-rules
script:
diff --git a/.gitlab/ci/test-metadata.gitlab-ci.yml b/.gitlab/ci/test-metadata.gitlab-ci.yml
index 41fd0b49173..85d3ea11ac6 100644
--- a/.gitlab/ci/test-metadata.gitlab-ci.yml
+++ b/.gitlab/ci/test-metadata.gitlab-ci.yml
@@ -17,6 +17,7 @@ retrieve-tests-metadata:
# We use a smaller image for this job only (update-tests-metadata compiles some gems)
image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}ruby:${RUBY_VERSION}-slim
stage: prepare
+ needs: []
script:
- apt-get update && apt-get install -y curl # Not present in ruby-slim, so we add it manually
- install_gitlab_gem
@@ -32,17 +33,17 @@ update-tests-metadata:
- retrieve-tests-metadata
- generate-frontend-fixtures-mapping
- setup-test-env
- - rspec migration pg13
+ - rspec migration pg14
- rspec-all frontend_fixture
- - rspec unit pg13
- - rspec integration pg13
- - rspec system pg13
- - rspec background_migration pg13
- - rspec-ee migration pg13
- - rspec-ee unit pg13
- - rspec-ee integration pg13
- - rspec-ee system pg13
- - rspec-ee background_migration pg13
+ - rspec unit pg14
+ - rspec integration pg14
+ - rspec system pg14
+ - rspec background_migration pg14
+ - rspec-ee migration pg14
+ - rspec-ee unit pg14
+ - rspec-ee integration pg14
+ - rspec-ee system pg14
+ - rspec-ee background_migration pg14
script:
- run_timed_command "retry gem install fog-aws mime-types activesupport rspec_profiling postgres-copy --no-document"
- source ./scripts/rspec_helpers.sh
diff --git a/.gitlab/ci/test-on-gdk/main.gitlab-ci.yml b/.gitlab/ci/test-on-gdk/main.gitlab-ci.yml
index 6073098ef06..767dc8433d2 100644
--- a/.gitlab/ci/test-on-gdk/main.gitlab-ci.yml
+++ b/.gitlab/ci/test-on-gdk/main.gitlab-ci.yml
@@ -1,85 +1,166 @@
include:
+ - local: .gitlab/ci/global.gitlab-ci.yml
- local: .gitlab/ci/qa-common/main.gitlab-ci.yml
- local: .gitlab/ci/qa-common/rules.gitlab-ci.yml
- local: .gitlab/ci/qa-common/variables.gitlab-ci.yml
-.run-tests:
+variables:
+ COLORIZED_LOGS: "true"
+ GIT_DEPTH: "20"
+ GIT_STRATEGY: "clone" # 'GIT_STRATEGY: clone' optimizes the pack-objects cache hit ratio
+ GIT_SUBMODULE_STRATEGY: "none"
+
+.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
+ extends:
+ - .qa-cache
stage: test
- image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images/debian-bullseye-ruby-${RUBY_VERSION}:bundler-2.3-chrome-${CHROME_VERSION}-docker-${DOCKER_VERSION}
services:
- docker:${DOCKER_VERSION}-dind
tags:
- e2e
- before_script:
- - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- - sysctl -n -w fs.inotify.max_user_watches=524288
- - echo "SUITE_RAN=true" > suite_status.env
variables:
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://docker:2375
- QA_GDK_IMAGE: "${CI_REGISTRY}/${CI_PROJECT_PATH}/gitlab-qa-gdk:master"
QA_GENERATE_ALLURE_REPORT: "true"
QA_CAN_TEST_PRAEFECT: "false"
QA_INTERCEPT_REQUESTS: "false"
- TEST_LICENSE_MODE: $QA_TEST_LICENSE_MODE
- EE_LICENSE: $QA_EE_LICENSE
- GITHUB_ACCESS_TOKEN: $QA_GITHUB_ACCESS_TOKEN
GITLAB_QA_ADMIN_ACCESS_TOKEN: $QA_ADMIN_ACCESS_TOKEN
- RSPEC_REPORT_OPTS: "--format QA::Support::JsonFormatter --out tmp/rspec-${CI_JOB_ID}.json --format RspecJunitFormatter --out tmp/rspec-${CI_JOB_ID}.xml --format html --out tmp/rspec-${CI_JOB_ID}.htm --color --format documentation"
- timeout: 2 hours
- artifacts:
- when: always
- paths:
- - test_output
- - logs
- expire_in: 7 days
- reports:
- junit: test_output/**/rspec-*.xml
- dotenv: suite_status.env
- script:
+ RSPEC_REPORT_OPTS: "--order random --force-color --format documentation --format RspecJunitFormatter --out tmp/rspec-${CI_JOB_ID}.xml --format QA::Support::JsonFormatter --out tmp/rspec-${CI_JOB_ID}.json --format html --out tmp/rspec-${CI_JOB_ID}.htm"
+ FF_NETWORK_PER_BUILD: 1
+ GDK_URL: http://gdk.test:3000
+ before_script:
+ - echo "SUITE_RAN=true" > suite_status.env
- echo -e "\e[0Ksection_start:`date +%s`:pull_image\r\e[0KPull GDK QA image"
- - docker pull ${QA_GDK_IMAGE}
+ - docker pull ${GDK_IMAGE}
- echo -e "\e[0Ksection_end:`date +%s`:pull_image\r\e[0K"
- - echo -e "\e[0Ksection_start:`date +%s`:launch_gdk_and_tests\r\e[0KLaunch GDK and run QA tests"
- - cd qa && bundle install --jobs=$(nproc) --retry=3 --quiet
- - mkdir -p $CI_PROJECT_DIR/test_output $CI_PROJECT_DIR/logs/gdk $CI_PROJECT_DIR/logs/gitlab
+ # Despite `incremental: false` and `static: true`, GDK sometimes fails to start without increasing max user watches
+ # This is why we're not running the GDK container as a service
+ - sysctl -n -w fs.inotify.max_user_watches=524288
+ - echo -e "\e[0Ksection_start:`date +%s`:launch_gdk\r\e[0KLaunch GDK"
+ - mkdir -p $CI_PROJECT_DIR/log/gdk $CI_PROJECT_DIR/log/gitlab
# This command matches the permissions of the user that runs GDK inside the container.
- - chown -R 1000:1000 $CI_PROJECT_DIR/test_output $CI_PROJECT_DIR/logs $CI_PROJECT_DIR/qa/knapsack
+ - chown -R 1000:1000 $CI_PROJECT_DIR/log
- |
- docker run --rm --name gdk --add-host gdk.test:127.0.0.1 --shm-size=2gb \
- --env-file <(bundle exec rake ci:env_var_name_list) \
- --volume /var/run/docker.sock:/var/run/docker.sock:z \
- --volume $CI_PROJECT_DIR/test_output:/home/gdk/gdk/gitlab/qa/tmp:z \
- --volume $CI_PROJECT_DIR/logs/gdk:/home/gdk/gdk/log \
- --volume $CI_PROJECT_DIR/logs/gitlab:/home/gdk/gdk/gitlab/log \
- --volume $CI_PROJECT_DIR/qa/knapsack:/home/gdk/gdk/gitlab/qa/knapsack \
- ${QA_GDK_IMAGE} "${CI_COMMIT_SHA}" "$RSPEC_REPORT_OPTS $TEST_GDK_TAGS --tag ~requires_praefect"
- # The above image's launch script takes two arguments only - first one is the commit sha and the second one Rspec Args
- allow_failure: true
+ docker run -d --rm --name gdk --network host \
+ --volume $CI_PROJECT_DIR/log/gdk:/home/gdk/gitlab-development-kit/log \
+ --volume $CI_PROJECT_DIR/log/gitlab:/home/gdk/gitlab-development-kit/gitlab/log \
+ ${GDK_IMAGE}
+ # With `FF_NETWORK_PER_BUILD=1` and `--network host` the IP of the gdk container should be 172.18.0.2, but we get it
+ # dynamically just in case
+ - echo "$(docker exec gdk bash -c "getent hosts \$HOSTNAME" | awk '{print $1}') gdk.test" >> /etc/hosts
+ - source scripts/utils.sh
+ - cd qa && bundle install
+ script:
+ - retry_exponential test_url ${GDK_URL}/users/sign_in
+ - echo -e "\e[0Ksection_end:`date +%s`:launch_gdk\r\e[0K"
+ - echo -e "\e[0Ksection_start:`date +%s`:run_tests\r\e[0KRun E2E tests"
+ - QA_COMMAND="bundle exec bin/qa Test::Instance::All ${GDK_URL} -- ${RSPEC_TAGS} ${RSPEC_REPORT_OPTS}"
+ - echo "Running - '${QA_COMMAND}'"
+ - eval "$QA_COMMAND"
+ - echo -e "\e[0Ksection_end:`date +%s`:run_tests\r\e[0K"
after_script:
- |
if [ "$CI_JOB_STATUS" == "failed" ]; then
echo "SUITE_FAILED=true" >> suite_status.env
fi
+ - docker stop gdk
+ artifacts:
+ paths:
+ - qa/tmp
+ - log
+ reports:
+ junit: qa/tmp/rspec-*.xml
+ dotenv: suite_status.env
+ expire_in: 7 days
+ when: always
+ allow_failure: true
-download-knapsack-report:
+cache-gems:
extends:
- - .download-knapsack-report
- - .rules:download-knapsack
+ - .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.
+.gdk-with-load-balancer-setup:
+ before_script:
+ - !reference [".gdk-qa-base", "before_script"]
+ - |
+ docker exec gdk bash -c "
+ gdk config set postgresql.replica.enabled true &&\
+ gdk config set postgresql.replica_2.enabled true &&\
+ gdk config set load_balancing.enabled true &&\
+ gdk reconfigure &&\
+ gdk restart"
-test-on-gdk-smoke:
+gdk-qa-smoke:
extends:
- - .run-tests
- parallel: 2
+ - .gdk-qa-base
variables:
TEST_GDK_TAGS: "--tag smoke"
+ QA_RUN_TYPE: gdk-qa-smoke
+ RSPEC_TAGS: --tag smoke
rules:
- when: always
-test-on-gdk-full:
+gdk-qa-smoke-with-load-balancer:
+ extends:
+ - .gdk-qa-base
+ - .gdk-with-load-balancer-setup
+ variables:
+ TEST_GDK_TAGS: "--tag smoke"
+ QA_RUN_TYPE: gdk-qa-smoke
+ RSPEC_TAGS: --tag smoke
+ rules:
+ - changes:
+ - ".gitlab/ci/test-on-gdk/**"
+ - "lib/gitlab/database/load_balancing/**/*"
+
+# TODO: set non manual once smoke tests prove to be stable
+gdk-qa-reliable:
+ extends:
+ - .gdk-qa-base
+ parallel: 5
+ variables:
+ QA_RUN_TYPE: gdk-qa-blocking
+ QA_KNAPSACK_REPORT_NAME: ee-instance-parallel
+ RSPEC_TAGS: --tag smoke --tag reliable
+ allow_failure: true
+ rules:
+ - when: manual
+
+gdk-qa-reliable-with-load-balancer:
extends:
- - .run-tests
+ - .gdk-qa-base
+ - .gdk-with-load-balancer-setup
parallel: 5
+ variables:
+ QA_RUN_TYPE: gdk-qa-blocking
+ QA_KNAPSACK_REPORT_NAME: ee-instance-parallel
+ RSPEC_TAGS: --tag smoke --tag reliable
+ allow_failure: true
+ rules:
+ - changes:
+ - ".gitlab/ci/test-on-gdk/**"
+ - "lib/gitlab/database/load_balancing/**/*"
+
+gdk-qa-non-blocking:
+ extends:
+ - .gdk-qa-base
+ parallel: 5
+ variables:
+ QA_RUN_TYPE: gdk-qa-non-blocking
+ QA_KNAPSACK_REPORT_NAME: ee-instance-parallel
+ QA_SKIP_SMOKE_RELIABLE: "true"
+ allow_failure: true
rules:
- when: manual
@@ -91,39 +172,37 @@ e2e-test-report:
- .e2e-test-report
- .rules:report:allure-report
variables:
- ALLURE_RESULTS_GLOB: test_output/allure-results
+ ALLURE_RESULTS_GLOB: qa/tmp/allure-results
upload-knapsack-report:
extends:
- .upload-knapsack-report
- .rules:report:process-results
variables:
- QA_KNAPSACK_REPORT_FILE_PATTERN: $CI_PROJECT_DIR/test_output/knapsack/*/*.json
+ QA_KNAPSACK_REPORT_FILE_PATTERN: $CI_PROJECT_DIR/qa/tmp/knapsack/*/*.json
export-test-metrics:
extends:
- .export-test-metrics
- .rules:report:process-results
variables:
- QA_METRICS_REPORT_FILE_PATTERN: $CI_PROJECT_DIR/test_output/test-metrics-*.json
+ QA_METRICS_REPORT_FILE_PATTERN: $CI_PROJECT_DIR/qa/tmp/test-metrics-*.json
-relate-test-failures:
- extends:
- - .relate-test-failures
- - .rules:report:process-results
+.gitlab-qa-report:
variables:
- QA_RSPEC_JSON_FILE_PATTERN: $CI_PROJECT_DIR/test_output/rspec-*.json
+ QA_RSPEC_JSON_FILE_PATTERN: $CI_PROJECT_DIR/qa/tmp/rspec-*.json
+ QA_SYSTEM_LOG_FILE_PATTERN: $CI_PROJECT_DIR/test_output/logs
generate-test-session:
extends:
- .generate-test-session
- .rules:report:process-results
variables:
- QA_RSPEC_JSON_FILE_PATTERN: $CI_PROJECT_DIR/test_output/rspec-*.json
+ QA_RSPEC_JSON_FILE_PATTERN: $CI_PROJECT_DIR/qa/tmp/rspec-*.json
notify-slack:
extends:
- .notify-slack
- .rules:report:process-results
variables:
- QA_RSPEC_XML_FILE_PATTERN: $CI_PROJECT_DIR/test_output/rspec-*.xml
+ QA_RSPEC_XML_FILE_PATTERN: $CI_PROJECT_DIR/qa/tmp/rspec-*.xml
diff --git a/.gitlab/ci/workhorse.gitlab-ci.yml b/.gitlab/ci/workhorse.gitlab-ci.yml
index ae0b15bbdb8..603f67079c2 100644
--- a/.gitlab/ci/workhorse.gitlab-ci.yml
+++ b/.gitlab/ci/workhorse.gitlab-ci.yml
@@ -26,7 +26,7 @@ workhorse:test go:
extends: .workhorse:test
parallel:
matrix:
- - GO_VERSION: ["1.18", "1.19"]
+ - GO_VERSION: ["1.18", "1.19", "1.20"]
script:
- make -C workhorse test-coverage
coverage: '/\d+.\d+%/'
@@ -38,7 +38,7 @@ workhorse:test fips:
extends: .workhorse:test
parallel:
matrix:
- - GO_VERSION: ["1.18", "1.19"]
+ - GO_VERSION: ["1.18", "1.19", "1.20"]
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:
FIPS_MODE: 1