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.yml229
1 files changed, 48 insertions, 181 deletions
diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml
index 0f524f03188..c60f85634b6 100644
--- a/.gitlab/ci/rails.gitlab-ci.yml
+++ b/.gitlab/ci/rails.gitlab-ci.yml
@@ -1,160 +1,5 @@
-#######################
-# rspec job base specs
-.rails-job-base:
- extends:
- - .default-retry
- - .default-before_script
- - .rails-cache
-
-.base-script:
- script:
- - source ./scripts/rspec_helpers.sh
- # Only install knapsack after bundle install! Otherwise oddly some native
- # gems could not be found under some circumstance. No idea why, hours wasted.
- - run_timed_command "gem install knapsack --no-document"
- - echo -e "\e[0Ksection_start:`date +%s`:gitaly-test-spawn[collapsed=true]\r\e[0KStarting Gitaly"
- - run_timed_command "scripts/gitaly-test-spawn" # Do not use 'bundle exec' here
- - echo -e "\e[0Ksection_end:`date +%s`:gitaly-test-spawn\r\e[0K"
-
-.minimal-rspec-tests:
- variables:
- RSPEC_TESTS_MAPPING_ENABLED: "true"
-
-.single-db:
- variables:
- DECOMPOSED_DB: "false"
-
-.single-db-rspec:
- extends: .single-db
-
-.praefect-with-db:
- variables:
- GITALY_PRAEFECT_WITH_DB: '1'
-
-.rspec-base:
- extends:
- - .rails-job-base
- - .base-artifacts
- stage: test
- variables:
- RUBY_GC_MALLOC_LIMIT: 67108864
- RUBY_GC_MALLOC_LIMIT_MAX: 134217728
- RECORD_DEPRECATIONS: "true"
- GEO_SECONDARY_PROXY: 0
- needs: ["setup-test-env", "retrieve-tests-metadata", "compile-test-assets", "detect-tests"]
- script:
- - !reference [.base-script, script]
- - rspec_paralellized_job "--tag ~quarantine --tag ~level:migration"
-
-.base-artifacts:
- artifacts:
- expire_in: 31d
- when: always
- paths:
- - coverage/
- - crystalball/
- - deprecations/
- - knapsack/
- - rspec/
- - tmp/capybara/
- - log/*.log
- reports:
- junit: ${JUNIT_RESULT_FILE}
-
-.rspec-base-migration:
- extends:
- - .base-artifacts
- - .rails:rules:ee-and-foss-migration
- script:
- - !reference [.base-script, script]
- - rspec_paralellized_job "--tag ~quarantine --tag level:migration"
-
-.rspec-base-pg11:
- extends:
- - .rspec-base
- - .use-pg11
-
-.rspec-base-pg12:
- extends:
- - .rspec-base
- - .use-pg12
-
-.rspec-base-pg12-as-if-foss:
- extends:
- - .rspec-base
- - .as-if-foss
- - .use-pg12
- needs: ["setup-test-env", "retrieve-tests-metadata", "compile-test-assets as-if-foss", "detect-tests"]
-
-.rspec-base-pg13:
- extends:
- - .rspec-base
- - .use-pg13
-
-.rspec-ee-base-pg11:
- extends:
- - .rspec-base
- - .use-pg11-ee
-
-.rspec-ee-base-pg12:
- extends:
- - .rspec-base
- - .use-pg12-ee
-
-.rspec-ee-base-pg12-es8:
- extends:
- - .rspec-base
- - .use-pg12-es8-ee
- - .rails:rules:run-search-tests
-
-.rspec-ee-base-pg12-opensearch1:
- extends:
- - .rspec-base
- - .use-pg12-opensearch1-ee
- - .rails:rules:run-search-tests
-
-.rspec-ee-base-pg13:
- extends:
- - .rspec-base
- - .use-pg13-ee
-
-.db-job-base:
- extends:
- - .rails-job-base
- - .rails:rules:ee-and-foss-migration
- - .use-pg12
- stage: test
- needs: ["setup-test-env"]
-# rspec job base specs
-######################
-
-############################
-# rspec job parallel configs
-.rspec-migration-parallel:
- parallel: 12
-
-.rspec-ee-migration-parallel:
- parallel: 4
-
-.rspec-unit-parallel:
- parallel: 28
-
-.rspec-ee-unit-parallel:
- parallel: 18
-
-.rspec-integration-parallel:
- parallel: 12
-
-.rspec-ee-integration-parallel:
- parallel: 6
-
-.rspec-system-parallel:
- parallel: 28
-
-.rspec-ee-system-parallel:
- parallel: 10
-# rspec job parallel configs
-############################
+include:
+ - local: .gitlab/ci/rails/shared.gitlab-ci.yml
###############################################################
# EE/FOSS: default refs (MRs, default branch, schedules) jobs #
@@ -168,7 +13,7 @@ setup-test-env:
SETUP_DB: "false"
script:
- echo $CI_MERGE_REQUEST_APPROVED
- - source scripts/gitlab_workhorse_component_helpers.sh
+ - source scripts/gitlab_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"
@@ -197,22 +42,6 @@ setup-test-env:
- ${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
@@ -407,6 +236,21 @@ db:check-migrations-single-db:
- .single-db
- .rails:rules:single-db
+db:post_deployment_migrations_validator:
+ extends:
+ - .db-job-base
+ - .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
+ - scripts/post_deployment_migrations_validator
+ allow_failure: true
+
+db:post_deployment_migrations_validator-single-db:
+ extends:
+ - db:post_deployment_migrations_validator
+ - .single-db
+ - .rails:rules:single-db
+
db:migrate-non-superuser:
extends:
- .db-job-base
@@ -943,18 +787,41 @@ rspec fail-fast:
paths:
- tmp/capybara/
-rspec foss-impact:
+rspec-foss-impact:pipeline-generate:
extends:
- - .rspec-base-pg12-as-if-foss
- .rails:rules:rspec-foss-impact
- needs: ["setup-test-env", "retrieve-tests-metadata", "compile-test-assets as-if-foss", "detect-tests"]
+ stage: prepare
+ needs: ["detect-tests"]
script:
- - !reference [.base-script, script]
- - rspec_matched_foss_tests "${RSPEC_MATCHING_TESTS_PATH}" "--tag ~quarantine"
+ - scripts/generate-rspec-foss-impact-pipeline "${RSPEC_MATCHING_TESTS_FOSS_PATH}" "${RSPEC_FOSS_IMPACT_PIPELINE_YML}"
artifacts:
- expire_in: 7d
+ expire_in: 1 day
paths:
- - tmp/capybara/
+ - $RSPEC_FOSS_IMPACT_PIPELINE_YML
+
+rspec-foss-impact:trigger:
+ extends:
+ - .rails:rules:rspec-foss-impact
+ stage: test
+ needs:
+ - job: "setup-test-env"
+ artifacts: false
+ - job: "retrieve-tests-metadata"
+ artifacts: false
+ - job: "compile-test-assets as-if-foss"
+ artifacts: false
+ - job: "rspec-foss-impact:pipeline-generate"
+ artifacts: true
+ variables:
+ PARENT_PIPELINE_ID: $CI_PIPELINE_ID
+ trigger:
+ strategy: depend
+ forward:
+ yaml_variables: true
+ pipeline_variables: true
+ include:
+ - artifact: $RSPEC_FOSS_IMPACT_PIPELINE_YML
+ job: rspec-foss-impact:pipeline-generate
fail-pipeline-early:
extends: