Commit 21459f1a authored by Stan Hu's avatar Stan Hu
Browse files

Merge branch 'sh-upgrade-ruby-2.7.2-ci' into 'master'

Upgrade to Ruby v2.7.2

See merge request gitlab-org/gitlab!44223
parents 213b2354 e2f8775e
......@@ -17,7 +17,7 @@ stages:
# in cases where jobs require Docker-in-Docker, the job
# definition must be extended with `.use-docker-in-docker`
default:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.6-golang-1.14-git-2.28-lfs-2.9-chrome-85-node-12.18-yarn-1.22-postgresql-11-graphicsmagick-1.3.34"
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2-golang-1.14-git-2.28-lfs-2.9-chrome-85-node-12.18-yarn-1.22-postgresql-11-graphicsmagick-1.3.34"
tags:
- gitlab-org
# All jobs are interruptible by default
......
cloud-native-image:
extends: .cng:rules
image: ruby:2.6-alpine
image: ruby:2.7-alpine
dependencies: []
stage: post-test
variables:
......
......@@ -2,7 +2,7 @@
extends:
- .default-retry
- .docs:rules:review-docs
image: ruby:2.6-alpine
image: ruby:2.7-alpine
stage: review
needs: []
variables:
......
......@@ -15,7 +15,7 @@
extends:
- .frontend-base
- .assets-compile-cache
image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.6-git-2.28-lfs-2.9-node-12.18-yarn-1.22-graphicsmagick-1.3.34
image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2-git-2.28-lfs-2.9-node-12.18-yarn-1.22-graphicsmagick-1.3.34
variables:
WEBPACK_VENDOR_DLL: "true"
stage: prepare
......
......@@ -18,7 +18,7 @@
 
.rails-cache:
cache:
key: "rails-v2"
key: "rails-v3"
paths:
- vendor/ruby/
- vendor/gitaly-ruby/
......@@ -27,7 +27,7 @@
 
.static-analysis-cache:
cache:
key: "static-analysis-v1"
key: "static-analysis-v2"
paths:
- vendor/ruby/
- node_modules/
......@@ -43,7 +43,7 @@
 
.qa-cache:
cache:
key: "qa-v1"
key: "qa-v2"
paths:
- qa/vendor/ruby/
policy: pull
......@@ -71,7 +71,7 @@
policy: pull
 
.use-pg11:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.6-golang-1.14-git-2.28-lfs-2.9-chrome-85-node-12.18-yarn-1.22-postgresql-11-graphicsmagick-1.3.34"
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2-golang-1.14-git-2.28-lfs-2.9-chrome-85-node-12.18-yarn-1.22-postgresql-11-graphicsmagick-1.3.34"
services:
- name: postgres:11.6
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
......@@ -80,7 +80,7 @@
POSTGRES_HOST_AUTH_METHOD: trust
 
.use-pg12:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.6-golang-1.14-git-2.28-lfs-2.9-chrome-85-node-12.18-yarn-1.22-postgresql-12-graphicsmagick-1.3.34"
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2-golang-1.14-git-2.28-lfs-2.9-chrome-85-node-12.18-yarn-1.22-postgresql-12-graphicsmagick-1.3.34"
services:
- name: postgres:12
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
......@@ -89,7 +89,7 @@
POSTGRES_HOST_AUTH_METHOD: trust
 
.use-pg11-ee:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.6-golang-1.14-git-2.28-lfs-2.9-chrome-85-node-12.18-yarn-1.22-postgresql-11-graphicsmagick-1.3.34"
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2-golang-1.14-git-2.28-lfs-2.9-chrome-85-node-12.18-yarn-1.22-postgresql-11-graphicsmagick-1.3.34"
services:
- name: postgres:11.6
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
......@@ -100,7 +100,7 @@
POSTGRES_HOST_AUTH_METHOD: trust
 
.use-pg12-ee:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.6-golang-1.14-git-2.28-lfs-2.9-chrome-85-node-12.18-yarn-1.22-postgresql-12-graphicsmagick-1.3.34"
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2-golang-1.14-git-2.28-lfs-2.9-chrome-85-node-12.18-yarn-1.22-postgresql-12-graphicsmagick-1.3.34"
services:
- name: postgres:12
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
......
......@@ -7,7 +7,8 @@
before_script:
- '[ "$FOSS_ONLY" = "1" ] && rm -rf ee/ qa/spec/ee/ qa/qa/specs/features/ee/ qa/qa/ee/ qa/qa/ee.rb'
- cd qa/
- bundle install --clean --jobs=$(nproc) --path=vendor --retry=3 --quiet
- gem install bundler -v 1.17.3
- bundle install --clean --jobs=$(nproc) --path=vendor --retry=3 --without=development --quiet
- bundle check
 
qa:internal:
......@@ -47,7 +48,7 @@ update-qa-cache:
policy: push # We want to rebuild the cache from scratch to ensure stale dependencies are cleaned up.
 
.package-and-qa-base:
image: ruby:2.6-alpine
image: ruby:2.7-alpine
stage: qa
retry: 0
script:
......
......@@ -181,6 +181,7 @@ update-coverage-cache:
- .shared:rules:update-cache
stage: prepare
script:
- run_timed_command "gem install bundler -v 1.17.3"
- run_timed_command "bundle install --jobs=$(nproc) --path=vendor --retry=3 --quiet --without default development test production puma unicorn kerberos metrics omnibus ed25519"
cache:
policy: push # We want to rebuild the cache from scratch to ensure stale dependencies are cleaned up.
......@@ -358,6 +359,7 @@ rspec:coverage:
- memory-static
- memory-on-boot
script:
- run_timed_command "gem install bundler -v 1.17.3"
- run_timed_command "bundle install --jobs=$(nproc) --path=vendor --retry=3 --quiet --without default development test production puma unicorn kerberos metrics omnibus ed25519"
- run_timed_command "bundle exec scripts/merge-simplecov"
- run_timed_command "bundle exec scripts/gather-test-memory-data"
......
......@@ -25,7 +25,7 @@ review-build-cng:
extends:
- .default-retry
- .review:rules:review-build-cng
image: ruby:2.6-alpine
image: ruby:2.7-alpine
stage: review-prepare
before_script:
- source ./scripts/utils.sh
......@@ -122,7 +122,7 @@ review-stop:
extends:
- .default-retry
- .use-docker-in-docker
image: registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-qa-alpine-ruby-2.6
image: registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-qa-alpine-ruby-2.7
stage: qa
# This is needed so that manual jobs with needs don't block the pipeline.
# See https://gitlab.com/gitlab-org/gitlab/-/issues/199979.
......@@ -199,7 +199,7 @@ review-performance:
parallel-spec-reports:
extends:
- .review:rules:mr-only-manual
image: ruby:2.6-alpine
image: ruby:2.7-alpine
stage: post-qa
dependencies: ["review-qa-all"]
variables:
......
......@@ -52,7 +52,7 @@ no_ee_check:
verify-tests-yml:
extends:
- .setup:rules:verify-tests-yml
image: ruby:2.6-alpine
image: ruby:2.7-alpine
stage: test
needs: []
script:
......@@ -61,7 +61,7 @@ verify-tests-yml:
- scripts/verify-tff-mapping
 
.detect-test-base:
image: ruby:2.6-alpine
image: ruby:2.7-alpine
needs: []
stage: prepare
script:
......
......@@ -79,7 +79,7 @@ Instructions on how to start GitLab and how to run the tests can be found in the
GitLab is a Ruby on Rails application that runs on the following software:
 
- Ubuntu/Debian/CentOS/RHEL/OpenSUSE
- Ruby (MRI) 2.6.6
- Ruby (MRI) 2.7.2
- Git 2.24+
- Redis 4.0+
- PostgreSQL 11+
......
---
title: Update to Ruby v2.7.2
merge_request: 44223
author:
type: other
......@@ -243,9 +243,9 @@ Download Ruby and compile it:
 
```shell
mkdir /tmp/ruby && cd /tmp/ruby
curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.6.tar.gz
echo '2d78048e293817f38d4ede4ebc7873013e97bb0b ruby-2.6.6.tar.gz' | shasum -c - && tar xzf ruby-2.6.6.tar.gz
cd ruby-2.6.6
curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.2.tar.gz
echo 'cb9731a17487e0ad84037490a6baf8bfa31a09e8 ruby-2.7.2.tar.gz' | shasum -c - && tar xzf ruby-2.7.2.tar.gz
cd ruby-2.7.2
 
./configure --disable-install-rdoc
make
......
......@@ -775,11 +775,11 @@ or using the appropriate [`ASDF_<tool>_VERSION`](https://asdf-vm.com/#/core-conf
activate the appropriate version.
 
For example, the following `.tool-versions` file will activate version `12.16.3` of [Node.js](https://nodejs.org/)
and version `2.6.6` of [Ruby](https://www.ruby-lang.org/).
and version `2.7.2` of [Ruby](https://www.ruby-lang.org/).
 
```plaintext
nodejs 12.16.3
ruby 2.6.6
ruby 2.7.2
```
 
The next example shows how to activate the same versions of the tools mentioned above by using environment variables defined in your
......@@ -792,7 +792,7 @@ include:
license_scanning:
variables:
ASDF_NODEJS_VERSION: '12.16.3'
ASDF_RUBY_VERSION: '2.6.6'
ASDF_RUBY_VERSION: '2.7.2'
```
 
A full list of variables can be found in [environment variables](#available-variables).
......
......@@ -229,7 +229,7 @@ def update_merge_request(opts)
context 'when reassigned' do
it 'schedules for analytics metric update' do
expect(Analytics::CodeReviewMetricsWorker)
.to receive(:perform_async).with('Analytics::RefreshReassignData', merge_request.id, {})
.to receive(:perform_async).with('Analytics::RefreshReassignData', merge_request.id)
 
update_merge_request({ assignee_ids: [user2.id] })
end
......
FROM ruby:2.6-stretch
FROM ruby:2.7-buster
LABEL maintainer="GitLab Quality Department <quality@gitlab.com>"
 
ENV DEBIAN_FRONTEND="noninteractive"
......@@ -65,7 +65,7 @@ COPY VERSION ./ee/app/models/license.r[b] /home/gitlab/ee/app/models/
COPY ./lib/gitlab.rb /home/gitlab/lib/
COPY ./lib/gitlab/utils.rb /home/gitlab/lib/gitlab/
COPY ./INSTALLATION_TYPE ./VERSION /home/gitlab/
RUN cd /home/gitlab/qa/ && bundle install --jobs=$(nproc) --retry=3 --quiet
RUN cd /home/gitlab/qa/ && gem install bundler:1.17.3 && bundle install --jobs=$(nproc) --retry=3 --without=development --quiet
COPY ./qa /home/gitlab/qa
 
ENTRYPOINT ["bin/test"]
......@@ -29,7 +29,7 @@ def executor
end
 
def executor_image
@executor_image || 'registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-qa-alpine-ruby-2.6'
@executor_image || 'registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-qa-alpine-ruby-2.7'
end
 
def fabricate_via_api!
......
......@@ -21,7 +21,7 @@ def initialize(name)
@name = name || "qa-runner-#{SecureRandom.hex(4)}"
@run_untagged = true
@executor = :shell
@executor_image = 'registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-qa-alpine-ruby-2.6'
@executor_image = 'registry.gitlab.com/gitlab-org/gitlab-build-images:gitlab-qa-alpine-ruby-2.7'
 
super()
end
......
......@@ -5,6 +5,8 @@ export USE_BUNDLE_INSTALL=${USE_BUNDLE_INSTALL:-true}
export BUNDLE_INSTALL_FLAGS=${BUNDLE_INSTALL_FLAGS:-"--without=production development --jobs=$(nproc) --path=vendor --retry=3 --quiet"}
 
if [ "$USE_BUNDLE_INSTALL" != "false" ]; then
# This is for backwards compatibility for Gitaly
run_timed_command "gem install bundler:1.17.3"
bundle --version
run_timed_command "bundle install --clean ${BUNDLE_INSTALL_FLAGS}"
run_timed_command "bundle check"
......
......@@ -59,7 +59,7 @@
end
 
it 'tracks the event' do
expect(Gitlab::Tracking).to receive(:event).with(anything, 'list_repositories', {})
expect(Gitlab::Tracking).to receive(:event).with(anything, 'list_repositories')
 
go_to_index(format: :json)
end
......@@ -133,7 +133,7 @@
end
 
it 'tracks the event' do
expect(Gitlab::Tracking).to receive(:event).with(anything, 'delete_repository', {})
expect(Gitlab::Tracking).to receive(:event).with(anything, 'delete_repository')
allow(DeleteContainerRepositoryWorker).to receive(:perform_async).with(user.id, repository.id)
 
delete_repository(repository)
......
Supports Markdown
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