Skip to content

Commit

Permalink
Merge pull request #86 from FundingCircle/update-ci
Browse files Browse the repository at this point in the history
Update ruby versions in ci
  • Loading branch information
bliof-fc authored Apr 3, 2020
2 parents d6a60ad + 04648b2 commit 13c3653
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 47 deletions.
88 changes: 46 additions & 42 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
version: 2

defaults: &defaults
docker:
- image: quay.io/fundingcircle/centos-ruby:ci-rvm
auth:
username: $DOCKER_USERNAME
password: $DOCKER_PASSWORD
environment:
RACK_ENV: test
VAULT_VERSION: 0.10.4

aliases:
environment: &environment
RACK_ENV: test
VAULT_VERSION: 0.10.4
BUNDLER_VERSION: 2.1.4
command: &ruby-command |
gem install bundler:$BUNDLER_VERSION
bundle check --path=vendor/bundle || bundle install --binstubs --jobs 4 --path=vendor/bundle --retry 3
bundle exec rake app:db:create
bundle exec rake app:db:schema:load
Expand Down Expand Up @@ -68,12 +60,11 @@ aliases:


jobs:
test_ruby_2_3:
test_ruby_2_4:
docker:
- image: circleci/ruby:2.3
- image: circleci/ruby:2.4
environment:
RACK_ENV: test
VAULT_VERSION: 0.10.4
<<: *environment
steps:
- checkout
- run: *install-vault
Expand All @@ -82,42 +73,54 @@ jobs:
- run: *rails51
- run: *rails52

test_ruby_2_4:
test_ruby_2_5:
docker:
- image: circleci/ruby:2.4
- image: circleci/ruby:2.5
environment:
RACK_ENV: test
VAULT_VERSION: 0.10.4
<<: *environment
steps:
- checkout
- run: *install-vault
- run: *rails4
- run: *rails5
- run: *rails51
- run: *rails52
- run: *rails6

test_ruby_2_5:
test_ruby_2_6:
docker:
- image: circleci/ruby:2.5
- image: circleci/ruby:2.6
environment:
RACK_ENV: test
VAULT_VERSION: 0.10.4
<<: *environment
steps:
- checkout
- run: *install-vault
- run: *rails5
- run: *rails51
- run: *rails52
- run: *rails6

test_ruby_2_7:
docker:
- image: circleci/ruby:2.7
environment:
<<: *environment
steps:
- checkout
- run: *install-vault
- run: *rails4
- run: *rails5
- run: *rails51
- run: *rails52
- run: *rails6

publish-pre-release:
<<: *defaults
docker:
- image: circleci/ruby:2.7
environment:
<<: *environment

steps:
- checkout
- run: yum -y install curl
- run: yum clean all

- run:
name: Login to JFrog
Expand All @@ -126,10 +129,6 @@ jobs:
curl --user "$ARTIFACTORY_USER:$ARTIFACTORY_PASSWORD" https://fundingcircle.jfrog.io/fundingcircle/api/gems/rubygems/api/v1/api_key.yaml > ~/.gem/credentials
chmod 600 ~/.gem/credentials
- run:
shell: /bin/bash -l
command: rvm use --default 2.5.1

- run:
name: Install Gem Versioner
shell: /bin/bash -l
Expand All @@ -149,12 +148,13 @@ jobs:
gem push "$package" --host https://fundingcircle.jfrog.io/fundingcircle/api/gems/rubygems-pre-releases
publish-release:
<<: *defaults
docker:
- image: circleci/ruby:2.7
environment:
<<: *environment

steps:
- checkout
- run: yum -y install curl
- run: yum clean all

- run:
name: Login to JFrog
Expand All @@ -163,10 +163,6 @@ jobs:
curl --user "$ARTIFACTORY_USER:$ARTIFACTORY_PASSWORD" https://fundingcircle.jfrog.io/fundingcircle/api/gems/rubygems/api/v1/api_key.yaml > ~/.gem/credentials
chmod 600 ~/.gem/credentials
- run:
shell: /bin/bash -l
command: rvm use --default 2.5.1

- run:
name: Install Gem Versioner
shell: /bin/bash -l
Expand All @@ -190,19 +186,25 @@ workflows:

test-and-release:
jobs:
- test_ruby_2_3:
- test_ruby_2_4:
context: org-global
filters:
tags:
only: /.*/

- test_ruby_2_4:
- test_ruby_2_5:
context: org-global
filters:
tags:
only: /.*/

- test_ruby_2_5:
- test_ruby_2_6:
context: org-global
filters:
tags:
only: /.*/

- test_ruby_2_7:
context: org-global
filters:
tags:
Expand All @@ -216,9 +218,10 @@ workflows:
tags:
ignore: /.*/
requires:
- test_ruby_2_3
- test_ruby_2_4
- test_ruby_2_5
- test_ruby_2_6
- test_ruby_2_7

- publish-release:
context: org-global
Expand All @@ -228,6 +231,7 @@ workflows:
tags:
only: /^v[0-9]+(\.[0-9]+)*$/
requires:
- test_ruby_2_3
- test_ruby_2_4
- test_ruby_2_5
- test_ruby_2_6
- test_ruby_2_7
2 changes: 1 addition & 1 deletion gemfiles/rails_4.2.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -146,4 +146,4 @@ DEPENDENCIES
sqlite3 (~> 1.3.13)

BUNDLED WITH
1.17.3
2.1.2
2 changes: 1 addition & 1 deletion gemfiles/rails_5.0.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,4 @@ DEPENDENCIES
sqlite3 (~> 1.3.13)

BUNDLED WITH
1.17.3
2.1.2
2 changes: 1 addition & 1 deletion gemfiles/rails_5.1.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,4 @@ DEPENDENCIES
sqlite3 (~> 1.3.13)

BUNDLED WITH
1.17.3
2.1.2
2 changes: 1 addition & 1 deletion gemfiles/rails_5.2.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,4 @@ DEPENDENCIES
sqlite3 (~> 1.3.13)

BUNDLED WITH
1.17.3
2.1.2
2 changes: 1 addition & 1 deletion gemfiles/rails_6.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,4 @@ DEPENDENCIES
sqlite3 (~> 1.4)

BUNDLED WITH
1.17.3
2.1.2

0 comments on commit 13c3653

Please sign in to comment.