Commit ac681e99 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Reorder db related jobs

This way db:check-schema will extend something from earlier lines
parent 8209d6d4
...@@ -338,30 +338,16 @@ rspec fast_spec_helper minimal: ...@@ -338,30 +338,16 @@ rspec fast_spec_helper minimal:
- .minimal-rspec-tests - .minimal-rspec-tests
- .rails:rules:ee-and-foss-fast_spec_helper:minimal - .rails:rules:ee-and-foss-fast_spec_helper:minimal
db:migrate:reset: db:rollback:
extends: .db-job-base extends: .db-job-base
script: script:
- bundle exec rake db:migrate:reset - bundle exec rake db:migrate VERSION=20181228175414
- bundle exec rake db:migrate SKIP_SCHEMA_VERSION_CHECK=true
db:check-schema:
extends:
- db:migrate-from-previous-major-version
- .rails:rules:ee-mr-and-default-branch-only
variables:
TAG_TO_CHECKOUT: "v14.4.0"
script:
- run_timed_command "bundle exec rake db:migrate"
- scripts/schema_changed.sh
- scripts/validate_migration_timestamps
db:check-migrations: db:migrate:reset:
extends: extends: .db-job-base
- .db-job-base
- .rails:rules:ee-and-foss-mr-with-migration
script: script:
- git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME:$CI_MERGE_REQUEST_TARGET_BRANCH_NAME --depth 20 - bundle exec rake db:migrate:reset
- scripts/validate_migration_schema
allow_failure: true
db:migrate-from-previous-major-version: db:migrate-from-previous-major-version:
extends: .db-job-base extends: .db-job-base
...@@ -383,11 +369,25 @@ db:migrate-from-previous-major-version: ...@@ -383,11 +369,25 @@ db:migrate-from-previous-major-version:
script: script:
- run_timed_command "bundle exec rake db:migrate" - run_timed_command "bundle exec rake db:migrate"
db:rollback: db:check-schema:
extends: .db-job-base extends:
- db:migrate-from-previous-major-version
- .rails:rules:ee-mr-and-default-branch-only
variables:
TAG_TO_CHECKOUT: "v14.4.0"
script: script:
- bundle exec rake db:migrate VERSION=20181228175414 - run_timed_command "bundle exec rake db:migrate"
- bundle exec rake db:migrate SKIP_SCHEMA_VERSION_CHECK=true - scripts/schema_changed.sh
- scripts/validate_migration_timestamps
db:check-migrations:
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/validate_migration_schema
allow_failure: true
db:gitlabcom-database-testing: db:gitlabcom-database-testing:
extends: .rails:rules:db:gitlabcom-database-testing extends: .rails:rules:db:gitlabcom-database-testing
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment