提交 067bbd71 编写于 作者: S Stan Hu

Merge branch 'troubleshoot-migration-paths' into 'master'

Fix the `migration paths` CI job

## What does this MR do?

It fixes the `migration paths` CI job. This job started failing at the time we added a migration that is actually using Redis.

The issue was that the `config/resque.yml` file we're using is not back-compatible with the `v8.5.9` version we're checking out in the first part of the job, that's why we're using a UNIX socket for this version.

To fix the issue:

* We use 'SETUP_DB: 'false'` in the job variables to speed up the job (it does not make sense to run migration before checking out v8.5.9)
* We just copy config/resque.yml.example to config/resque.yml at is simply has correct structure when checked out from v8.5.9
* When we revert to CI_BUILD_REF, we run prepare script again, which swaps config/resque.yml again, using new version this time.

Fixes #23658.

Note: the `migration paths` CI job is run on `master` only but you can see a successful build here: https://gitlab.com/gitlab-org/gitlab-ce/commit/fd99ec1a8ecc49ef70c4358ca7be2987f2a7505f

See merge request !7092
......@@ -279,16 +279,20 @@ bundler:audit:
migration paths:
stage: test
<<: *use-db
variables:
SETUP_DB: "false"
only:
- master@gitlab-org/gitlab-ce
script:
- git checkout HEAD .
- git fetch --tags
- git checkout v8.5.9
- 'echo test: unix:/var/opt/gitlab/redis/redis.socket > config/resque.yml'
- cp config/resque.yml.example config/resque.yml
- sed -i 's/localhost/redis/g' config/resque.yml
- bundle install --without postgres production --jobs $(nproc) "${FLAGS[@]}" --retry=3
- rake db:drop db:create db:schema:load db:seed_fu
- git checkout $CI_BUILD_REF
- source scripts/prepare_build.sh
- rake db:migrate
coverage:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册