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')
-rw-r--r--.gitlab/ci/rails/rspec-foss-impact.gitlab-ci.yml.erb50
-rw-r--r--.gitlab/ci/rails/shared.gitlab-ci.yml172
2 files changed, 222 insertions, 0 deletions
diff --git a/.gitlab/ci/rails/rspec-foss-impact.gitlab-ci.yml.erb b/.gitlab/ci/rails/rspec-foss-impact.gitlab-ci.yml.erb
new file mode 100644
index 00000000000..4ae4cb75a25
--- /dev/null
+++ b/.gitlab/ci/rails/rspec-foss-impact.gitlab-ci.yml.erb
@@ -0,0 +1,50 @@
+# RSpec FOSS impact pipeline loaded dynamically by script: scripts/generate-rspec-foss-impact-pipeline
+
+include:
+ - local: .gitlab/ci/rails/shared.gitlab-ci.yml
+
+default:
+ image: $DEFAULT_CI_IMAGE
+ tags:
+ - gitlab-org
+ # Default job timeout set to 90m https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/10520
+ timeout: 90m
+ interruptible: true
+
+stages:
+ - test
+
+dont-interrupt-me:
+ extends: .rules:dont-interrupt
+ stage: .pre
+ interruptible: false
+ script:
+ - echo "This jobs makes sure this pipeline won't be interrupted! See https://docs.gitlab.com/ee/ci/yaml/#interruptible."
+
+rspec foss-impact:
+ extends: .rspec-base-pg12-as-if-foss
+ needs:
+ - pipeline: $PARENT_PIPELINE_ID
+ job: detect-tests
+ - pipeline: $PARENT_PIPELINE_ID
+ job: setup-test-env
+ - pipeline: $PARENT_PIPELINE_ID
+ job: retrieve-tests-metadata
+ - pipeline: $PARENT_PIPELINE_ID
+ job: compile-test-assets as-if-foss
+ rules:
+ - when: always
+ variables:
+ RSPEC_TESTS_FILTER_FILE: "${RSPEC_MATCHING_TESTS_FOSS_PATH}"
+ RSPEC_TESTS_MAPPING_ENABLED: "true"
+<% if Integer(parallel_value) > 1 %>
+ parallel: <%= parallel_value %>
+<% end %>
+ script:
+ - !reference [.base-script, script]
+ - rspec_paralellized_job "--tag ~quarantine --tag ~level:migration"
+ artifacts:
+ expire_in: 7d
+ paths:
+ - "${RSPEC_MATCHING_TESTS_FOSS_PATH}"
+ - tmp/capybara/
diff --git a/.gitlab/ci/rails/shared.gitlab-ci.yml b/.gitlab/ci/rails/shared.gitlab-ci.yml
new file mode 100644
index 00000000000..60c9826abfe
--- /dev/null
+++ b/.gitlab/ci/rails/shared.gitlab-ci.yml
@@ -0,0 +1,172 @@
+include:
+ - local: .gitlab/ci/global.gitlab-ci.yml
+ - local: .gitlab/ci/rules.gitlab-ci.yml
+
+.rules:dont-interrupt:
+ rules:
+ - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
+ allow_failure: true
+ - if: $CI_MERGE_REQUEST_IID
+ when: manual
+ allow_failure: true
+
+#######################
+# 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
+ RSPEC_TESTS_FILTER_FILE: "${RSPEC_MATCHING_TESTS_PATH}"
+ 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
+ variables:
+ RSPEC_TESTS_FILTER_FILE: "${RSPEC_MATCHING_TESTS_PATH}"
+ 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
+############################