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/rails.gitlab-ci.yml')
-rw-r--r--.gitlab/ci/rails.gitlab-ci.yml204
1 files changed, 109 insertions, 95 deletions
diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml
index 8a4ea690c60..1c745e6d986 100644
--- a/.gitlab/ci/rails.gitlab-ci.yml
+++ b/.gitlab/ci/rails.gitlab-ci.yml
@@ -18,15 +18,14 @@
variables:
RSPEC_TESTS_MAPPING_ENABLED: "true"
-.decomposed-database:
+.single-db:
variables:
- DECOMPOSED_DB: "true"
+ DECOMPOSED_DB: "false"
-.decomposed-database-rspec:
- extends: .decomposed-database
+.single-db-rspec:
+ extends: .single-db
variables:
- GITLAB_LOAD_BALANCING_REUSE_PRIMARY_ci: "main"
- GITLAB_USE_MODEL_LOAD_BALANCING: "true"
+ GITLAB_USE_MODEL_LOAD_BALANCING: "false"
.rspec-base:
extends:
@@ -182,7 +181,7 @@
# rspec job parallel configs
############################
-#######################################################
+###############################################################
# EE/FOSS: default refs (MRs, default branch, schedules) jobs #
setup-test-env:
extends:
@@ -193,40 +192,53 @@ setup-test-env:
variables:
SETUP_DB: "false"
script:
+ - source scripts/gitlab_workhorse_component_helpers.sh
+ - run_timed_command "download_and_extract_gitlab_workhorse_package" || true
- run_timed_command "scripts/setup-test-env"
+ - run_timed_command "select_gitlab_workhorse_essentials"
- echo -e "\e[0Ksection_start:`date +%s`:gitaly-test-build[collapsed=true]\r\e[0KCompiling Gitaly binaries"
- run_timed_command "scripts/gitaly-test-build" # Do not use 'bundle exec' here
- echo -e "\e[0Ksection_end:`date +%s`:gitaly-test-build\r\e[0K"
-
artifacts:
expire_in: 7d
paths:
- config/secrets.yml
- - tmp/tests/gitaly/_build/bin/
- - tmp/tests/gitaly/_build/deps/git/install
- - tmp/tests/gitaly/config.toml
- - tmp/tests/gitaly/gitaly2.config.toml
- - tmp/tests/gitaly/internal/
- - tmp/tests/gitaly/internal_gitaly2/
- - tmp/tests/gitaly/internal_sockets/
- - tmp/tests/gitaly/Makefile
- - tmp/tests/gitaly/praefect.config.toml
- - tmp/tests/gitaly/ruby/
- - tmp/tests/gitlab-elasticsearch-indexer/bin/gitlab-elasticsearch-indexer
- - tmp/tests/gitlab-shell/
- - tmp/tests/gitlab-test-fork/
- - tmp/tests/gitlab-test-fork_bare/
- - tmp/tests/gitlab-test/
- - tmp/tests/gitlab-workhorse/gitlab-zip-metadata
- - tmp/tests/gitlab-workhorse/gitlab-zip-cat
- - tmp/tests/gitlab-workhorse/gitlab-workhorse
- - tmp/tests/gitlab-workhorse/gitlab-resize-image
- - tmp/tests/gitlab-workhorse/config.toml
- - tmp/tests/gitlab-workhorse/WORKHORSE_TREE
- - tmp/tests/repositories/
- - tmp/tests/second_storage/
+ - ${TMP_TEST_FOLDER}/gitaly/_build/bin/
+ - ${TMP_TEST_FOLDER}/gitaly/_build/deps/git/install
+ - ${TMP_TEST_FOLDER}/gitaly/config.toml
+ - ${TMP_TEST_FOLDER}/gitaly/gitaly2.config.toml
+ - ${TMP_TEST_FOLDER}/gitaly/internal/
+ - ${TMP_TEST_FOLDER}/gitaly/internal_gitaly2/
+ - ${TMP_TEST_FOLDER}/gitaly/internal_sockets/
+ - ${TMP_TEST_FOLDER}/gitaly/Makefile
+ - ${TMP_TEST_FOLDER}/gitaly/praefect.config.toml
+ - ${TMP_TEST_FOLDER}/gitaly/ruby/
+ - ${TMP_TEST_FOLDER}/gitlab-elasticsearch-indexer/bin/gitlab-elasticsearch-indexer
+ - ${TMP_TEST_FOLDER}/gitlab-shell/
+ - ${TMP_TEST_FOLDER}/gitlab-test-fork/
+ - ${TMP_TEST_FOLDER}/gitlab-test-fork_bare/
+ - ${TMP_TEST_FOLDER}/gitlab-test/
+ - ${TMP_TEST_FOLDER}/repositories/
+ - ${TMP_TEST_FOLDER}/second_storage/
+ - ${TMP_TEST_GITLAB_WORKHORSE_PATH}/
when: always
+build-components:
+ extends:
+ - setup-test-env
+ - .rails:rules:build-components
+ script:
+ - source scripts/gitlab_workhorse_component_helpers.sh
+ - 'gitlab_workhorse_archive_doesnt_exist || { echoinfo "INFO: Exiting early as package exists."; exit 0; }'
+ - run_timed_command "scripts/setup-test-env"
+ - run_timed_command "select_gitlab_workhorse_essentials"
+ - run_timed_command "create_gitlab_workhorse_package"
+ - run_timed_command "upload_gitlab_workhorse_package"
+ artifacts:
+ expire_in: 7d
+ paths:
+ - ${TMP_TEST_GITLAB_WORKHORSE_PATH}/
+
update-setup-test-env-cache:
extends:
- setup-test-env
@@ -264,11 +276,11 @@ rspec migration pg12 minimal:
- .minimal-rspec-tests
- .rails:rules:ee-and-foss-migration:minimal
-rspec migration pg12 decomposed:
+rspec migration pg12 single-db:
extends:
- rspec migration pg12
- - .decomposed-database-rspec
- - .rails:rules:decomposed-databases
+ - .single-db-rspec
+ - .rails:rules:single-db
rspec unit pg12:
extends:
@@ -282,11 +294,11 @@ rspec unit pg12 minimal:
- .minimal-rspec-tests
- .rails:rules:ee-and-foss-unit:minimal
-rspec unit pg12 decomposed:
+rspec unit pg12 single-db:
extends:
- rspec unit pg12
- - .decomposed-database-rspec
- - .rails:rules:decomposed-databases
+ - .single-db-rspec
+ - .rails:rules:single-db
rspec integration pg12:
extends:
@@ -300,11 +312,11 @@ rspec integration pg12 minimal:
- .minimal-rspec-tests
- .rails:rules:ee-and-foss-integration:minimal
-rspec integration pg12 decomposed:
+rspec integration pg12 single-db:
extends:
- rspec integration pg12
- - .decomposed-database-rspec
- - .rails:rules:decomposed-databases
+ - .single-db-rspec
+ - .rails:rules:single-db
rspec system pg12:
extends:
@@ -320,11 +332,11 @@ rspec system pg12 minimal:
- .minimal-rspec-tests
- .rails:rules:ee-and-foss-system:minimal
-rspec system pg12 decomposed:
+rspec system pg12 single-db:
extends:
- rspec system pg12
- - .decomposed-database-rspec
- - .rails:rules:decomposed-databases
+ - .single-db-rspec
+ - .rails:rules:single-db
# Dedicated job to test DB library code against PG11.
# Note that these are already tested against PG12 in the `rspec unit pg12` / `rspec-ee unit pg12` jobs.
@@ -351,22 +363,22 @@ db:rollback:
- scripts/db_tasks db:migrate VERSION=20210301200959
- scripts/db_tasks db:migrate SKIP_SCHEMA_VERSION_CHECK=true
-db:rollback decomposed:
+db:rollback single-db:
extends:
- db:rollback
- - .decomposed-database
- - .rails:rules:decomposed-databases
+ - .single-db
+ - .rails:rules:single-db
db:migrate:reset:
extends: .db-job-base
script:
- bundle exec rake db:migrate:reset
-db:migrate:reset decomposed:
+db:migrate:reset single-db:
extends:
- db:migrate:reset
- - .decomposed-database
- - .rails:rules:decomposed-databases
+ - .single-db
+ - .rails:rules:single-db
db:migrate-from-previous-major-version:
extends: .db-job-base
@@ -375,6 +387,8 @@ db:migrate-from-previous-major-version:
SETUP_DB: "false"
PROJECT_TO_CHECKOUT: "gitlab-foss"
TAG_TO_CHECKOUT: "v13.12.9"
+ # FIXME: make this job work with `GITLAB_USE_MODEL_LOAD_BALANCING: true`, see https://gitlab.com/gitlab-org/gitlab/-/issues/355573
+ GITLAB_USE_MODEL_LOAD_BALANCING: "false"
before_script:
- !reference [.default-before_script, before_script]
- '[[ -d "ee/" ]] || export PROJECT_TO_CHECKOUT="gitlab"'
@@ -388,11 +402,11 @@ db:migrate-from-previous-major-version:
script:
- run_timed_command "scripts/db_tasks db:migrate"
-db:migrate-from-previous-major-version-decomposed:
+db:migrate-from-previous-major-version-single-db:
extends:
- db:migrate-from-previous-major-version
- - .decomposed-database
- - .rails:rules:decomposed-databases
+ - .single-db
+ - .rails:rules:single-db
.db:check-schema-base:
extends:
@@ -409,9 +423,9 @@ db:check-schema:
- db:migrate-from-previous-major-version
- .db:check-schema-base
-db:check-schema-decomposed:
+db:check-schema-single-db:
extends:
- - db:migrate-from-previous-major-version-decomposed
+ - db:migrate-from-previous-major-version-single-db
- .db:check-schema-base
db:check-migrations:
@@ -423,11 +437,11 @@ db:check-migrations:
- scripts/validate_migration_schema
allow_failure: true
-db:check-migrations-decomposed:
+db:check-migrations-single-db:
extends:
- db:check-migrations
- - .decomposed-database
- - .rails:rules:decomposed-databases
+ - .single-db
+ - .rails:rules:single-db
db:migrate-non-superuser:
extends:
@@ -534,11 +548,11 @@ rspec:coverage:
- rspec unit pg12 minimal
- rspec integration pg12 minimal
- rspec system pg12 minimal
- # FOSS/EE decomposed jobs
- - rspec migration pg12 decomposed
- - rspec unit pg12 decomposed
- - rspec integration pg12 decomposed
- - rspec system pg12 decomposed
+ # FOSS/EE single-db jobs
+ - rspec migration pg12 single-db
+ - rspec unit pg12 single-db
+ - rspec integration pg12 single-db
+ - rspec system pg12 single-db
# EE jobs
- rspec-ee migration pg12
- rspec-ee unit pg12
@@ -549,11 +563,11 @@ rspec:coverage:
- rspec-ee unit pg12 minimal
- rspec-ee integration pg12 minimal
- rspec-ee system pg12 minimal
- # EE decomposed jobs
- - rspec-ee migration pg12 decomposed
- - rspec-ee unit pg12 decomposed
- - rspec-ee integration pg12 decomposed
- - rspec-ee system pg12 decomposed
+ # EE single-db jobs
+ - rspec-ee migration pg12 single-db
+ - rspec-ee unit pg12 single-db
+ - rspec-ee integration pg12 single-db
+ - rspec-ee system pg12 single-db
# Geo jobs
- rspec-ee unit pg12 geo
- rspec-ee integration pg12 geo
@@ -567,16 +581,16 @@ rspec:coverage:
# As-if-FOSS jobs
- rspec migration pg12-as-if-foss
- rspec migration pg12-as-if-foss minimal
- - rspec migration pg12-as-if-foss decomposed
+ - rspec migration pg12-as-if-foss single-db
- rspec unit pg12-as-if-foss
- rspec unit pg12-as-if-foss minimal
- - rspec unit pg12-as-if-foss decomposed
+ - rspec unit pg12-as-if-foss single-db
- rspec integration pg12-as-if-foss
- rspec integration pg12-as-if-foss minimal
- - rspec integration pg12-as-if-foss decomposed
+ - rspec integration pg12-as-if-foss single-db
- rspec system pg12-as-if-foss
- rspec system pg12-as-if-foss minimal
- - rspec system pg12-as-if-foss decomposed
+ - rspec system pg12-as-if-foss single-db
script:
- run_timed_command "bundle exec scripts/merge-simplecov"
coverage: '/LOC \((\d+\.\d+%)\) covered.$/'
@@ -666,11 +680,11 @@ rspec migration pg12-as-if-foss minimal:
- .minimal-rspec-tests
- .rails:rules:as-if-foss-migration:minimal
-rspec migration pg12-as-if-foss decomposed:
+rspec migration pg12-as-if-foss single-db:
extends:
- rspec migration pg12-as-if-foss
- - .decomposed-database-rspec
- - .rails:rules:decomposed-databases
+ - .single-db-rspec
+ - .rails:rules:single-db
rspec unit pg12-as-if-foss:
extends:
@@ -684,11 +698,11 @@ rspec unit pg12-as-if-foss minimal:
- .minimal-rspec-tests
- .rails:rules:as-if-foss-unit:minimal
-rspec unit pg12-as-if-foss decomposed:
+rspec unit pg12-as-if-foss single-db:
extends:
- rspec unit pg12-as-if-foss
- - .decomposed-database-rspec
- - .rails:rules:decomposed-databases
+ - .single-db-rspec
+ - .rails:rules:single-db
rspec integration pg12-as-if-foss:
extends:
@@ -702,11 +716,11 @@ rspec integration pg12-as-if-foss minimal:
- .minimal-rspec-tests
- .rails:rules:as-if-foss-integration:minimal
-rspec integration pg12-as-if-foss decomposed:
+rspec integration pg12-as-if-foss single-db:
extends:
- rspec integration pg12-as-if-foss
- - .decomposed-database-rspec
- - .rails:rules:decomposed-databases
+ - .single-db-rspec
+ - .rails:rules:single-db
rspec system pg12-as-if-foss:
extends:
@@ -720,11 +734,11 @@ rspec system pg12-as-if-foss minimal:
- .minimal-rspec-tests
- .rails:rules:as-if-foss-system:minimal
-rspec system pg12-as-if-foss decomposed:
+rspec system pg12-as-if-foss single-db:
extends:
- rspec system pg12-as-if-foss
- - .decomposed-database-rspec
- - .rails:rules:decomposed-databases
+ - .single-db-rspec
+ - .rails:rules:single-db
rspec migration pg12-as-if-jh:
extends:
@@ -764,11 +778,11 @@ rspec-ee migration pg12 minimal:
- .minimal-rspec-tests
- .rails:rules:ee-only-migration:minimal
-rspec-ee migration pg12 decomposed:
+rspec-ee migration pg12 single-db:
extends:
- rspec-ee migration pg12
- - .decomposed-database-rspec
- - .rails:rules:decomposed-databases
+ - .single-db-rspec
+ - .rails:rules:single-db
rspec-ee unit pg12:
extends:
@@ -782,11 +796,11 @@ rspec-ee unit pg12 minimal:
- .minimal-rspec-tests
- .rails:rules:ee-only-unit:minimal
-rspec-ee unit pg12 decomposed:
+rspec-ee unit pg12 single-db:
extends:
- rspec-ee unit pg12
- - .decomposed-database-rspec
- - .rails:rules:decomposed-databases
+ - .single-db-rspec
+ - .rails:rules:single-db
rspec-ee integration pg12:
extends:
@@ -800,11 +814,11 @@ rspec-ee integration pg12 minimal:
- .minimal-rspec-tests
- .rails:rules:ee-only-integration:minimal
-rspec-ee integration pg12 decomposed:
+rspec-ee integration pg12 single-db:
extends:
- rspec-ee integration pg12
- - .decomposed-database-rspec
- - .rails:rules:decomposed-databases
+ - .single-db-rspec
+ - .rails:rules:single-db
rspec-ee system pg12:
extends:
@@ -818,11 +832,11 @@ rspec-ee system pg12 minimal:
- .minimal-rspec-tests
- .rails:rules:ee-only-system:minimal
-rspec-ee system pg12 decomposed:
+rspec-ee system pg12 single-db:
extends:
- rspec-ee system pg12
- - .decomposed-database-rspec
- - .rails:rules:decomposed-databases
+ - .single-db-rspec
+ - .rails:rules:single-db
rspec-ee unit pg12 geo:
extends: