summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2016-10-25 18:15:04 +0000
committerStan Hu <stanhu@gmail.com>2016-10-25 18:15:04 +0000
commit067bbd71973409be1d8f6aaa8ef3bfc7c862b2e4 (patch)
treeff36a53f8e1a411b149c6b1f37082caec2344bf8 /.gitlab-ci.yml
parent774548be1fbc88041d58a2e66e19971e6f678d4c (diff)
parenta84c97186e6ff07db4ee6e202862a8ecb199f6cb (diff)
downloadgitlab-ce-067bbd71973409be1d8f6aaa8ef3bfc7c862b2e4.tar.gz
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
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml6
1 files changed, 5 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9c4b4acbaf5..474bf6765f4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -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: