Commit 201c1917 authored by Rémy Coutable's avatar Rémy Coutable Committed by Stan Hu

Merge branch 'sh-bump-ruby-and-git-image-ci' into 'master'

Bump Ruby to 2.3.7 and git to 2.17.0 in CI image

See merge request gitlab-org/gitlab-ce!18244
parent 9248aa29
image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.3.6-golang-1.9-git-2.16-chrome-63.0-node-8.x-yarn-1.2-postgresql-9.6" image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.3.7-golang-1.9-git-2.17-chrome-63.0-node-8.x-yarn-1.2-postgresql-9.6"
.dedicated-runner: &dedicated-runner .dedicated-runner: &dedicated-runner
retry: 1 retry: 1
...@@ -6,7 +6,7 @@ image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.3.6-golang-1.9-git ...@@ -6,7 +6,7 @@ image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.3.6-golang-1.9-git
- gitlab-org - gitlab-org
.default-cache: &default-cache .default-cache: &default-cache
key: "ruby-2.3.6-with-yarn" key: "ruby-2.3.7-with-yarn"
paths: paths:
- vendor/ruby - vendor/ruby
- .yarn-cache/ - .yarn-cache/
...@@ -692,7 +692,7 @@ static-analysis: ...@@ -692,7 +692,7 @@ static-analysis:
script: script:
- scripts/static-analysis - scripts/static-analysis
cache: cache:
key: "ruby-2.3.6-with-yarn-and-rubocop" key: "ruby-2.3.7-with-yarn-and-rubocop"
paths: paths:
- vendor/ruby - vendor/ruby
- .yarn-cache/ - .yarn-cache/
......
...@@ -2,6 +2,14 @@ class AuthorizedProjectsWorker ...@@ -2,6 +2,14 @@ class AuthorizedProjectsWorker
include ApplicationWorker include ApplicationWorker
prepend WaitableWorker prepend WaitableWorker
# This is a workaround for a Ruby 2.3.7 bug. rspec-mocks cannot restore the
# visibility of prepended modules. See https://github.com/rspec/rspec-mocks/issues/1231
# for more details.
if Rails.env.test?
def self.bulk_perform_and_wait(args_list, timeout: 10)
end
end
def perform(user_id) def perform(user_id)
user = User.find_by(id: user_id) user = User.find_by(id: user_id)
......
...@@ -133,9 +133,10 @@ Remove the old Ruby 1.8 if present: ...@@ -133,9 +133,10 @@ Remove the old Ruby 1.8 if present:
Download Ruby and compile it: Download Ruby and compile it:
mkdir /tmp/ruby && cd /tmp/ruby mkdir /tmp/ruby && cd /tmp/ruby
curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.6.tar.gz curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.7.tar.gz
echo '4e6a0f828819e15d274ae58485585fc8b7caace0 ruby-2.3.6.tar.gz' | shasum -c - && tar xzf ruby-2.3.6.tar.gz echo '540996fec64984ab6099e34d2f5820b14904f15a ruby-2.3.7.tar.gz' | shasum -c - && tar xzf ruby-2.3.7.tar.gz
cd ruby-2.3.6 cd ruby-2.3.7
./configure --disable-install-rdoc ./configure --disable-install-rdoc
make make
sudo make install sudo make install
......
...@@ -14,6 +14,12 @@ describe WaitableWorker do ...@@ -14,6 +14,12 @@ describe WaitableWorker do
include ApplicationWorker include ApplicationWorker
prepend WaitableWorker prepend WaitableWorker
# This is a workaround for a Ruby 2.3.7 bug. rspec-mocks cannot restore
# the visibility of prepended modules. See
# https://github.com/rspec/rspec-mocks/issues/1231 for more details.
def self.bulk_perform_inline(args_list)
end
def perform(i = 0) def perform(i = 0)
self.class.counter += i self.class.counter += i
end end
......
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