Commit 62bd2aca authored by Jan Provaznik's avatar Jan Provaznik

Switch rails 4 to 5 in gitlab-ci

CI jobs will be triggered both with rails 4 and 5
to make sure we keep backward compatibility if it turns out
we have to switch back to rails 4.

Rails 4 jobs are not allowed to fail for now, these jobs will be
removed in a follow-up MR next cycle.
parent 547dc7ac
......@@ -75,15 +75,15 @@ stages:
- mysql:5.7
- redis:alpine
.rails5: &rails5
allow_failure: true
.rails4: &rails4
allow_failure: false
only:
variables:
- $CI_COMMIT_REF_NAME =~ /rails5/
- $RAILS5_ENABLED
- $CI_COMMIT_REF_NAME =~ /norails4/
- $RAILS5_DISABLED
variables:
BUNDLE_GEMFILE: "Gemfile.rails5"
RAILS5: "true"
BUNDLE_GEMFILE: "Gemfile.rails4"
RAILS5: "false"
# Skip all jobs except the ones that begin with 'docs/'.
# Used for commits including ONLY documentation changes.
......@@ -177,17 +177,17 @@ stages:
<<: *rspec-metadata
<<: *use-pg
.rspec-metadata-pg-rails5: &rspec-metadata-pg-rails5
.rspec-metadata-pg-rails4: &rspec-metadata-pg-rails4
<<: *rspec-metadata-pg
<<: *rails5
<<: *rails4
.rspec-metadata-mysql: &rspec-metadata-mysql
<<: *rspec-metadata
<<: *use-mysql
.rspec-metadata-mysql-rails5: &rspec-metadata-mysql-rails5
.rspec-metadata-mysql-rails4: &rspec-metadata-mysql-rails4
<<: *rspec-metadata-mysql
<<: *rails5
<<: *rails4
.only-canonical-masters: &only-canonical-masters
only:
......@@ -429,7 +429,7 @@ setup-test-env:
script:
- bundle exec ruby -Ispec -e 'require "spec_helper" ; TestEnv.init'
- scripts/gitaly-test-build # Do not use 'bundle exec' here
- BUNDLE_GEMFILE=Gemfile.rails5 bundle install $BUNDLE_INSTALL_FLAGS
- BUNDLE_GEMFILE=Gemfile.rails4 bundle install $BUNDLE_INSTALL_FLAGS
artifacts:
expire_in: 7d
paths:
......@@ -521,67 +521,67 @@ rspec-mysql 27 30: *rspec-metadata-mysql
rspec-mysql 28 30: *rspec-metadata-mysql
rspec-mysql 29 30: *rspec-metadata-mysql
rspec-pg-rails5 0 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 1 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 2 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 3 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 4 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 5 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 6 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 7 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 8 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 9 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 10 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 11 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 12 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 13 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 14 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 15 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 16 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 17 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 18 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 19 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 20 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 21 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 22 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 23 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 24 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 25 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 26 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 27 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 28 30: *rspec-metadata-pg-rails5
rspec-pg-rails5 29 30: *rspec-metadata-pg-rails5
rspec-mysql-rails5 0 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 1 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 2 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 3 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 4 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 5 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 6 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 7 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 8 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 9 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 10 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 11 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 12 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 13 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 14 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 15 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 16 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 17 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 18 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 19 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 20 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 21 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 22 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 23 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 24 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 25 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 26 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 27 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 28 30: *rspec-metadata-mysql-rails5
rspec-mysql-rails5 29 30: *rspec-metadata-mysql-rails5
rspec-pg-rails4 0 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 1 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 2 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 3 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 4 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 5 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 6 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 7 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 8 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 9 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 10 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 11 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 12 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 13 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 14 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 15 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 16 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 17 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 18 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 19 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 20 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 21 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 22 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 23 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 24 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 25 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 26 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 27 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 28 30: *rspec-metadata-pg-rails4
rspec-pg-rails4 29 30: *rspec-metadata-pg-rails4
rspec-mysql-rails4 0 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 1 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 2 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 3 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 4 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 5 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 6 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 7 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 8 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 9 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 10 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 11 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 12 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 13 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 14 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 15 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 16 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 17 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 18 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 19 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 20 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 21 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 22 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 23 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 24 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 25 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 26 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 27 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 28 30: *rspec-metadata-mysql-rails4
rspec-mysql-rails4 29 30: *rspec-metadata-mysql-rails4
static-analysis:
<<: *dedicated-no-docs-no-db-pull-cache-job
......@@ -627,11 +627,11 @@ downtime_check:
- /(^docs[\/-].*|.*-docs$)/
- /(^qa[\/-].*|.*-qa$)/
rails5_gemfile_lock_check:
rails4_gemfile_lock_check:
<<: *dedicated-no-docs-no-db-pull-cache-job
<<: *except-docs-and-qa
script:
- scripts/rails5-gemfile-lock-check
- scripts/rails4-gemfile-lock-check
ee_compat_check:
<<: *rake-exec
......
#!/usr/bin/env bash
echo -e "=> Checking if Gemfile.rails4.lock is up-to-date...\\n"
cp Gemfile.rails4.lock Gemfile.rails4.lock.orig
BUNDLE_GEMFILE=Gemfile.rails4 bundle install "$BUNDLE_INSTALL_FLAGS"
diff -u Gemfile.rails4.lock.orig Gemfile.rails4.lock >/dev/null 2>&1
if [ $? == 1 ]
then
diff -u Gemfile.rails4.lock.orig Gemfile.rails4.lock
echo -e "\\n✖ ERROR: Gemfile.rails4.lock is not up-to-date!
Please run 'BUNDLE_GEMFILE=Gemfile.rails4 bundle install'\\n" >&2
exit 1
fi
echo "✔ Gemfile.rails4.lock is up-to-date"
exit 0
#!/usr/bin/env bash
echo -e "=> Checking if Gemfile.rails5.lock is up-to-date...\\n"
cp Gemfile.rails5.lock Gemfile.rails5.lock.orig
BUNDLE_GEMFILE=Gemfile.rails5 bundle install "$BUNDLE_INSTALL_FLAGS"
diff -u Gemfile.rails5.lock.orig Gemfile.rails5.lock >/dev/null 2>&1
if [ $? == 1 ]
then
diff -u Gemfile.rails5.lock.orig Gemfile.rails5.lock
echo -e "\\n✖ ERROR: Gemfile.rails5.lock is not up-to-date!
Please run 'BUNDLE_GEMFILE=Gemfile.rails5 bundle install'\\n" >&2
exit 1
fi
echo "✔ Gemfile.rails5.lock is up-to-date"
exit 0
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