Commit 5d51bd17 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'blackst0ne-add-gemfile-rails5-lock-check' into 'master'

Add CI job to check Gemfile.rails5.lock

See merge request gitlab-org/gitlab-ce!19605
parents 09d0dbb9 e23fb005
...@@ -415,6 +415,7 @@ setup-test-env: ...@@ -415,6 +415,7 @@ setup-test-env:
script: script:
- bundle exec ruby -Ispec -e 'require "spec_helper" ; TestEnv.init' - bundle exec ruby -Ispec -e 'require "spec_helper" ; TestEnv.init'
- scripts/gitaly-test-build # Do not use 'bundle exec' here - scripts/gitaly-test-build # Do not use 'bundle exec' here
- BUNDLE_GEMFILE=Gemfile.rails5 bundle install $BUNDLE_INSTALL_FLAGS
artifacts: artifacts:
expire_in: 7d expire_in: 7d
paths: paths:
...@@ -590,6 +591,12 @@ downtime_check: ...@@ -590,6 +591,12 @@ downtime_check:
- /(^docs[\/-].*|.*-docs$)/ - /(^docs[\/-].*|.*-docs$)/
- /(^qa[\/-].*|.*-qa$)/ - /(^qa[\/-].*|.*-qa$)/
rails5_gemfile_lock_check:
<<: *dedicated-no-docs-no-db-pull-cache-job
<<: *except-docs-and-qa
script:
- scripts/rails5-gemfile-lock-check
ee_compat_check: ee_compat_check:
<<: *rake-exec <<: *rake-exec
except: except:
......
---
title: Add CI job to check Gemfile.rails5.lock
merge_request: 19605
author: "@blackst0ne"
type: other
#!/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