diff options
Diffstat (limited to '.gitlab/ci')
-rw-r--r-- | .gitlab/ci/dev-fixtures.gitlab-ci.yml | 6 | ||||
-rw-r--r-- | .gitlab/ci/docs.gitlab-ci.yml | 4 | ||||
-rw-r--r-- | .gitlab/ci/frontend.gitlab-ci.yml | 4 | ||||
-rw-r--r-- | .gitlab/ci/memory.gitlab-ci.yml | 6 | ||||
-rw-r--r-- | .gitlab/ci/rails.gitlab-ci.yml | 330 | ||||
-rw-r--r-- | .gitlab/ci/rules.gitlab-ci.yml | 43 | ||||
-rw-r--r-- | .gitlab/ci/setup.gitlab-ci.yml | 2 | ||||
-rw-r--r-- | .gitlab/ci/test-metadata.gitlab-ci.yml | 24 |
8 files changed, 210 insertions, 209 deletions
diff --git a/.gitlab/ci/dev-fixtures.gitlab-ci.yml b/.gitlab/ci/dev-fixtures.gitlab-ci.yml index 27ceb6f37db..a642a80eb85 100644 --- a/.gitlab/ci/dev-fixtures.gitlab-ci.yml +++ b/.gitlab/ci/dev-fixtures.gitlab-ci.yml @@ -3,9 +3,9 @@ - .default-retry - .default-cache - .default-before_script - - .use-pg11 + - .use-pg9 stage: test - needs: ["setup-test-env pg11"] + needs: ["setup-test-env pg9"] variables: FIXTURE_PATH: "db/fixtures/development" SEED_CYCLE_ANALYTICS: "true" @@ -26,7 +26,7 @@ run-dev-fixtures-ee: extends: - .run-dev-fixtures - .dev-fixtures:rules:ee-only - - .use-pg11-ee + - .use-pg9-ee script: - scripts/gitaly-test-spawn - cp ee/db/fixtures/development/* $FIXTURE_PATH diff --git a/.gitlab/ci/docs.gitlab-ci.yml b/.gitlab/ci/docs.gitlab-ci.yml index b8a66decbb7..0b4e124331f 100644 --- a/.gitlab/ci/docs.gitlab-ci.yml +++ b/.gitlab/ci/docs.gitlab-ci.yml @@ -66,9 +66,9 @@ graphql-reference-verify: - .default-cache - .default-before_script - .docs:rules:graphql-reference-verify - - .use-pg11 + - .use-pg9 stage: test - needs: ["setup-test-env pg11"] + needs: ["setup-test-env pg9"] script: - bundle exec rake gitlab:graphql:check_docs - bundle exec rake gitlab:graphql:check_schema diff --git a/.gitlab/ci/frontend.gitlab-ci.yml b/.gitlab/ci/frontend.gitlab-ci.yml index 737f4405fd7..597e9966625 100644 --- a/.gitlab/ci/frontend.gitlab-ci.yml +++ b/.gitlab/ci/frontend.gitlab-ci.yml @@ -129,9 +129,9 @@ compile-assets pull-cache as-if-foss: - .default-retry - .default-cache - .default-before_script - - .use-pg11 + - .use-pg9 stage: fixtures - needs: ["setup-test-env pg11", "compile-assets pull-cache"] + needs: ["setup-test-env pg9", "compile-assets pull-cache"] script: - date - scripts/gitaly-test-spawn diff --git a/.gitlab/ci/memory.gitlab-ci.yml b/.gitlab/ci/memory.gitlab-ci.yml index af75ff257ea..92468925dd7 100644 --- a/.gitlab/ci/memory.gitlab-ci.yml +++ b/.gitlab/ci/memory.gitlab-ci.yml @@ -8,7 +8,7 @@ memory-static: extends: .only-code-memory-job-base stage: test - needs: ["setup-test-env pg11"] + needs: ["setup-test-env pg9"] variables: SETUP_DB: "false" script: @@ -36,9 +36,9 @@ memory-static: memory-on-boot: extends: - .only-code-memory-job-base - - .use-pg11 + - .use-pg9 stage: test - needs: ["setup-test-env pg11", "compile-assets pull-cache"] + needs: ["setup-test-env pg9", "compile-assets pull-cache"] variables: NODE_ENV: "production" RAILS_ENV: "production" diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml index 85a9ddd8f2e..17c9d03eb98 100644 --- a/.gitlab/ci/rails.gitlab-ci.yml +++ b/.gitlab/ci/rails.gitlab-ci.yml @@ -1,5 +1,5 @@ .rails:needs:setup-and-assets: - needs: ["setup-test-env pg11", "compile-assets pull-cache"] + needs: ["setup-test-env pg9", "compile-assets pull-cache"] .rails-job-base: extends: @@ -7,8 +7,8 @@ - .default-cache - .default-before_script -#################### -# EE and FOSS jobs # +####################################################### +# EE/FOSS: default refs (MRs, master, schedules) jobs # .base-setup-test-env: extends: - .rails-job-base @@ -28,19 +28,19 @@ setup-test-env pg11: extends: - .base-setup-test-env - - .rails:rules:default-refs-code-backstage-qa + - .rails:rules:master-push--master-schedule-2-hourly--code-backstage - .use-pg11 setup-test-env pg10: extends: - .base-setup-test-env - - .rails:rules:master-refs-code-backstage + - .rails:rules:master-schedule-nightly--code-backstage - .use-pg10 setup-test-env pg9: extends: - .base-setup-test-env - - .rails:rules:nightly-master-refs-code-backstage + - .rails:rules:default-refs-code-backstage-qa - .use-pg9 static-analysis: @@ -55,7 +55,7 @@ static-analysis: script: - scripts/static-analysis cache: - key: "ruby-2.6.5-pg11-rubocop" + key: "ruby-2.6.5-pg9-rubocop" paths: - vendor/ruby - tmp/rubocop_cache @@ -75,7 +75,7 @@ downtime_check: .rspec-base: extends: .rails-job-base stage: test - needs: ["setup-test-env pg11", "retrieve-tests-metadata", "compile-assets pull-cache"] + needs: ["setup-test-env pg9", "retrieve-tests-metadata", "compile-assets pull-cache"] script: - source scripts/rspec_helpers.sh - rspec_paralellized_job "--tag ~quarantine --tag ~geo --tag ~level:migration" @@ -93,37 +93,37 @@ downtime_check: reports: junit: junit_rspec.xml -.rspec-base-pg11: +.rspec-base-pg9: extends: - .rspec-base - .rails:rules:ee-and-foss - - .use-pg11 + - .use-pg9 .rspec-base-migration: script: - source scripts/rspec_helpers.sh - rspec_paralellized_job "--tag ~quarantine --tag ~geo --tag level:migration" -rspec migration pg11: +rspec migration pg9: extends: - - .rspec-base-pg11 + - .rspec-base-pg9 - .rspec-base-migration parallel: 5 -rspec unit pg11: - extends: .rspec-base-pg11 +rspec unit pg9: + extends: .rspec-base-pg9 parallel: 20 -rspec integration pg11: - extends: .rspec-base-pg11 +rspec integration pg9: + extends: .rspec-base-pg9 parallel: 8 -rspec system pg11: - extends: .rspec-base-pg11 +rspec system pg9: + extends: .rspec-base-pg9 parallel: 24 rspec fast_spec_helper: - extends: .rspec-base-pg11 + extends: .rspec-base-pg9 script: - bin/rspec spec/fast_spec_helper.rb @@ -131,9 +131,9 @@ rspec fast_spec_helper: extends: - .rails-job-base - .rails:rules:ee-and-foss - - .use-pg11 + - .use-pg9 stage: test - needs: ["setup-test-env pg11"] + needs: ["setup-test-env pg9"] db:migrate:reset: extends: .db-job-base @@ -202,18 +202,18 @@ rspec:coverage: # We cannot use needs since it would mean needing 84 jobs (since most are parallelized) # so we use `dependencies` here. dependencies: - - setup-test-env pg11 - - rspec migration pg11 - - rspec unit pg11 - - rspec integration pg11 - - rspec system pg11 - - rspec-ee migration pg11 - - rspec-ee unit pg11 - - rspec-ee integration pg11 - - rspec-ee system pg11 - - rspec-ee unit pg11 geo - - rspec-ee integration pg11 geo - - rspec-ee system pg11 geo + - setup-test-env pg9 + - rspec migration pg9 + - rspec unit pg9 + - rspec integration pg9 + - rspec system pg9 + - rspec-ee migration pg9 + - rspec-ee unit pg9 + - rspec-ee integration pg9 + - rspec-ee system pg9 + - rspec-ee unit pg9 geo + - rspec-ee integration pg9 geo + - rspec-ee system pg9 geo - memory-static - memory-on-boot variables: @@ -231,206 +231,206 @@ rspec:coverage: - coverage/index.html - coverage/assets/ - tmp/memory_test/ -# EE and FOSS jobs # -#################### +# EE/FOSS: default refs (MRs, master, schedules) jobs # +####################################################### -#################### -# master-only jobs # -.rspec-base-pg10: +################################################## +# EE: default refs (MRs, master, schedules) jobs # +.rspec-base-ee: extends: - .rspec-base - - .rails:rules:master-refs-code-backstage - - .use-pg10 - needs: ["setup-test-env pg10", "retrieve-tests-metadata", "compile-assets pull-cache"] + - .rails:rules:ee-only -rspec migration pg10: +.rspec-base-pg9-as-if-foss: extends: - - .rspec-base-pg10 - - .rspec-base-migration - parallel: 5 - -rspec unit pg10: - extends: .rspec-base-pg10 - parallel: 20 - -rspec integration pg10: - extends: .rspec-base-pg10 - parallel: 8 - -rspec system pg10: - extends: .rspec-base-pg10 - parallel: 24 -# master-only jobs # -#################### + - .rspec-base-ee + - .as-if-foss + - .use-pg9 + needs: ["setup-test-env pg9", "retrieve-tests-metadata", "compile-assets pull-cache as-if-foss"] -###################### -# nightly-only jobs # -.rspec-base-pg9: +.rspec-ee-base-pg9: extends: - - .rspec-base - - .rails:rules:nightly-master-refs-code-backstage - - .use-pg9 - needs: ["setup-test-env pg9", "retrieve-tests-metadata", "compile-assets pull-cache"] + - .rspec-base-ee + - .use-pg9-ee -rspec migration pg9: +rspec migration pg9-as-if-foss: extends: - - .rspec-base-pg9 + - .rspec-base-pg9-as-if-foss - .rspec-base-migration parallel: 5 -rspec unit pg9: - extends: .rspec-base-pg9 +rspec unit pg9-as-if-foss: + extends: .rspec-base-pg9-as-if-foss parallel: 20 -rspec integration pg9: - extends: .rspec-base-pg9 +rspec integration pg9-as-if-foss: + extends: .rspec-base-pg9-as-if-foss parallel: 8 -rspec system pg9: - extends: .rspec-base-pg9 +rspec system pg9-as-if-foss: + extends: .rspec-base-pg9-as-if-foss parallel: 24 -# nightly-only jobs # -##################### -####################### -# EE master-only jobs # -.rspec-ee-base-pg10: +rspec-ee migration pg9: extends: - - .rspec-base-ee - - .use-pg10-ee - needs: ["setup-test-env pg10", "retrieve-tests-metadata", "compile-assets pull-cache"] - -rspec-ee migration pg10: - extends: - - .rspec-ee-base-pg10 + - .rspec-ee-base-pg9 - .rspec-base-migration - - .rails:rules:master-refs-code-backstage parallel: 2 -rspec-ee unit pg10: - extends: - - .rspec-ee-base-pg10 - - .rails:rules:master-refs-code-backstage +rspec-ee unit pg9: + extends: .rspec-ee-base-pg9 parallel: 10 -rspec-ee integration pg10: - extends: - - .rspec-ee-base-pg10 - - .rails:rules:master-refs-code-backstage +rspec-ee integration pg9: + extends: .rspec-ee-base-pg9 parallel: 4 -rspec-ee system pg10: - extends: - - .rspec-ee-base-pg10 - - .rails:rules:master-refs-code-backstage +rspec-ee system pg9: + extends: .rspec-ee-base-pg9 parallel: 6 -# EE master-only jobs # -####################### -################ -# EE-only jobs # -.rspec-base-ee: +.rspec-ee-base-geo: + extends: .rspec-base-ee + script: + - source scripts/rspec_helpers.sh + - scripts/prepare_postgres_fdw.sh + - rspec_paralellized_job "--tag ~quarantine --tag geo" + +.rspec-ee-base-geo-pg9: extends: - - .rspec-base - - .rails:rules:ee-only + - .rspec-ee-base-geo + - .use-pg9-ee -.rspec-base-pg11-as-if-foss: +rspec-ee unit pg9 geo: + extends: .rspec-ee-base-geo-pg9 + parallel: 2 + +rspec-ee integration pg9 geo: + extends: .rspec-ee-base-geo-pg9 + +rspec-ee system pg9 geo: + extends: .rspec-ee-base-geo-pg9 + +db:rollback geo: extends: - - .rspec-base-ee - - .as-if-foss - - .use-pg11 - needs: ["setup-test-env pg11", "retrieve-tests-metadata", "compile-assets pull-cache as-if-foss"] + - db:rollback + - .rails:rules:ee-only + script: + - bundle exec rake geo:db:migrate VERSION=20170627195211 + - bundle exec rake geo:db:migrate +# EE: default refs (MRs, master, schedules) jobs # +################################################## -.rspec-ee-base-pg11: +#################################################################### +# EE/FOSS: master non-scheduled and master 2-hourly scheduled jobs # +.rspec-base-pg11: extends: - - .rspec-base-ee - - .use-pg11-ee + - .rspec-base + - .rails:rules:master-push--master-schedule-2-hourly--code-backstage + - .use-pg11 + needs: ["setup-test-env pg11", "retrieve-tests-metadata", "compile-assets pull-cache"] -rspec migration pg11-as-if-foss: +rspec migration pg11: extends: - - .rspec-base-pg11-as-if-foss + - .rspec-base-pg11 - .rspec-base-migration parallel: 5 -rspec unit pg11-as-if-foss: - extends: .rspec-base-pg11-as-if-foss +rspec unit pg11: + extends: .rspec-base-pg11 parallel: 20 -rspec integration pg11-as-if-foss: - extends: .rspec-base-pg11-as-if-foss +rspec integration pg11: + extends: .rspec-base-pg11 parallel: 8 -rspec system pg11-as-if-foss: - extends: .rspec-base-pg11-as-if-foss +rspec system pg11: + extends: .rspec-base-pg11 parallel: 24 +# EE/FOSS: master non-scheduled and master 2-hourly scheduled jobs # +#################################################################### + +############################################################### +# EE: master non-scheduled and master 2-hourly scheduled jobs # +.rspec-ee-base-pg11: + extends: + - .rspec-base-ee + - .use-pg11-ee + needs: ["setup-test-env pg11", "retrieve-tests-metadata", "compile-assets pull-cache"] rspec-ee migration pg11: extends: - .rspec-ee-base-pg11 - .rspec-base-migration + - .rails:rules:master-push--master-schedule-2-hourly--code-backstage parallel: 2 rspec-ee unit pg11: - extends: .rspec-ee-base-pg11 + extends: + - .rspec-ee-base-pg11 + - .rails:rules:master-push--master-schedule-2-hourly--code-backstage parallel: 10 rspec-ee integration pg11: - extends: .rspec-ee-base-pg11 + extends: + - .rspec-ee-base-pg11 + - .rails:rules:master-push--master-schedule-2-hourly--code-backstage parallel: 4 rspec-ee system pg11: - extends: .rspec-ee-base-pg11 + extends: + - .rspec-ee-base-pg11 + - .rails:rules:master-push--master-schedule-2-hourly--code-backstage parallel: 6 +# EE: master non-scheduled and master 2-hourly scheduled jobs # +############################################################### -.rspec-ee-base-geo: - extends: .rspec-base-ee - script: - - source scripts/rspec_helpers.sh - - scripts/prepare_postgres_fdw.sh - - rspec_paralellized_job "--tag ~quarantine --tag geo" - -.rspec-ee-base-geo-pg11: +########################################## +# EE/FOSS: master nightly scheduled jobs # +.rspec-base-pg10: extends: - - .rspec-ee-base-geo - - .use-pg11-ee + - .rspec-base + - .rails:rules:master-schedule-nightly--code-backstage + - .use-pg10 + needs: ["setup-test-env pg10", "retrieve-tests-metadata", "compile-assets pull-cache"] -rspec-ee unit pg11 geo: - extends: .rspec-ee-base-geo-pg11 - parallel: 2 +rspec migration pg10: + extends: + - .rspec-base-pg10 + - .rspec-base-migration + parallel: 5 -rspec-ee integration pg11 geo: - extends: .rspec-ee-base-geo-pg11 +rspec unit pg10: + extends: .rspec-base-pg10 + parallel: 20 -rspec-ee system pg11 geo: - extends: .rspec-ee-base-geo-pg11 +rspec integration pg10: + extends: .rspec-base-pg10 + parallel: 8 -db:rollback geo: - extends: - - db:rollback - - .rails:rules:ee-only - script: - - bundle exec rake geo:db:migrate VERSION=20170627195211 - - bundle exec rake geo:db:migrate -# EE-only jobs # -################ +rspec system pg10: + extends: .rspec-base-pg10 + parallel: 24 +# EE/FOSS: master nightly scheduled jobs # +########################################## -######################## -# EE nightly-only jobs # -.rspec-ee-base-geo-pg9: +############################## +# EE: nightly scheduled jobs # +.rspec-ee-base-geo-pg10: extends: - .rspec-ee-base-geo - - .use-pg9-ee - - .rails:rules:nightly-master-refs-code-backstage-ee-only - needs: ["setup-test-env pg9", "retrieve-tests-metadata", "compile-assets pull-cache"] + - .use-pg10-ee + - .rails:rules:master-schedule-nightly--code-backstage-ee-only + needs: ["setup-test-env pg10", "retrieve-tests-metadata", "compile-assets pull-cache"] -rspec-ee unit pg9 geo: - extends: .rspec-ee-base-geo-pg9 +rspec-ee unit pg10 geo: + extends: .rspec-ee-base-geo-pg10 parallel: 2 -rspec-ee integration pg9 geo: - extends: .rspec-ee-base-geo-pg9 +rspec-ee integration pg10 geo: + extends: .rspec-ee-base-geo-pg10 -rspec-ee system pg9 geo: - extends: .rspec-ee-base-geo-pg9 -# EE nightly-only jobs # -######################## +rspec-ee system pg10 geo: + extends: .rspec-ee-base-geo-pg10 +# EE: nightly scheduled jobs # +############################## diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml index 1a54a88c3f5..e0ec20cfd9d 100644 --- a/.gitlab/ci/rules.gitlab-ci.yml +++ b/.gitlab/ci/rules.gitlab-ci.yml @@ -16,6 +16,15 @@ .if-master-refs: &if-master-refs if: '$CI_COMMIT_REF_NAME == "master"' +.if-master-push: &if-master-push + if: '$CI_COMMIT_BRANCH == "master" && $CI_PIPELINE_SOURCE == "push"' + +.if-master-schedule-2-hourly: &if-master-schedule-2-hourly + if: '$CI_COMMIT_BRANCH == "master" && $CI_PIPELINE_SOURCE == "schedule" && $FREQUENCY == "2-hourly"' + +.if-master-schedule-nightly: &if-master-schedule-nightly + if: '$CI_COMMIT_BRANCH == "master" && $CI_PIPELINE_SOURCE == "schedule" && $FREQUENCY == "nightly"' + .if-auto-deploy-branches: &if-auto-deploy-branches if: '$CI_COMMIT_BRANCH =~ /^\d+-\d+-auto-deploy-\d+$/' @@ -25,9 +34,6 @@ .if-merge-request: &if-merge-request if: '$CI_MERGE_REQUEST_IID' -.if-nightly-master-schedule: &if-nightly-master-schedule - if: '$NIGHTLY && $CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE == "schedule"' - .if-dot-com-gitlab-org-schedule: &if-dot-com-gitlab-org-schedule if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE == "gitlab-org" && $CI_PIPELINE_SOURCE == "schedule"' @@ -360,36 +366,33 @@ rules: - <<: *if-default-refs changes: *code-backstage-patterns - when: on_success .rails:rules:default-refs-code-backstage-qa: rules: - <<: *if-default-refs changes: *code-backstage-qa-patterns - when: on_success -.rails:rules:master-refs-code-backstage: +.rails:rules:master-push--master-schedule-2-hourly--code-backstage: rules: - - <<: *if-master-refs + - <<: *if-master-push changes: *code-backstage-patterns - when: on_success - - changes: [".gitlab/ci/rails.gitlab-ci.yml"] + - <<: *if-master-schedule-2-hourly + - <<: *if-merge-request + changes: [".gitlab/ci/rails.gitlab-ci.yml"] -.rails:rules:nightly-master-refs-code-backstage: +.rails:rules:master-schedule-nightly--code-backstage: rules: - - <<: *if-nightly-master-schedule - changes: *code-backstage-patterns - when: on_success - - changes: [".gitlab/ci/rails.gitlab-ci.yml"] + - <<: *if-master-schedule-nightly + - <<: *if-merge-request + changes: [".gitlab/ci/rails.gitlab-ci.yml"] -.rails:rules:nightly-master-refs-code-backstage-ee-only: +.rails:rules:master-schedule-nightly--code-backstage-ee-only: rules: - <<: *if-not-ee when: never - - <<: *if-nightly-master-schedule - changes: *code-backstage-patterns - when: on_success - - changes: [".gitlab/ci/rails.gitlab-ci.yml"] + - <<: *if-master-schedule-nightly + - <<: *if-merge-request + changes: [".gitlab/ci/rails.gitlab-ci.yml"] .rails:rules:ee-only: rules: @@ -397,7 +400,6 @@ when: never - <<: *if-default-refs changes: *code-backstage-patterns - when: on_success .rails:rules:ee-mr-and-master-only: rules: @@ -412,7 +414,6 @@ rules: - <<: *if-merge-request changes: *code-backstage-patterns - when: on_success ################## # Releases rules # diff --git a/.gitlab/ci/setup.gitlab-ci.yml b/.gitlab/ci/setup.gitlab-ci.yml index e79f3939bc7..2d827046538 100644 --- a/.gitlab/ci/setup.gitlab-ci.yml +++ b/.gitlab/ci/setup.gitlab-ci.yml @@ -7,7 +7,7 @@ cache gems: - .default-before_script - .setup:rules:cache-gems stage: test - needs: ["setup-test-env pg11"] + needs: ["setup-test-env pg9"] variables: SETUP_DB: "false" script: diff --git a/.gitlab/ci/test-metadata.gitlab-ci.yml b/.gitlab/ci/test-metadata.gitlab-ci.yml index db176b00e08..198c0ff1e46 100644 --- a/.gitlab/ci/test-metadata.gitlab-ci.yml +++ b/.gitlab/ci/test-metadata.gitlab-ci.yml @@ -32,18 +32,18 @@ update-tests-metadata: - .test-metadata:rules:update-tests-metadata stage: post-test dependencies: - - setup-test-env pg11 - - rspec migration pg11 - - rspec unit pg11 - - rspec integration pg11 - - rspec system pg11 - - rspec-ee migration pg11 - - rspec-ee unit pg11 - - rspec-ee integration pg11 - - rspec-ee system pg11 - - rspec-ee unit pg11 geo - - rspec-ee integration pg11 geo - - rspec-ee system pg11 geo + - setup-test-env pg9 + - rspec migration pg9 + - rspec unit pg9 + - rspec integration pg9 + - rspec system pg9 + - rspec-ee migration pg9 + - rspec-ee unit pg9 + - rspec-ee integration pg9 + - rspec-ee system pg9 + - rspec-ee unit pg9 geo + - rspec-ee integration pg9 geo + - rspec-ee system pg9 geo cache: policy: push script: |