File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -193,11 +193,24 @@ jobs:
193193 command : ruby --version | grep "2.7.0"
194194 - store_artifacts :
195195 path : /home/circleci/.rvm/log
196-
196+ install-already-present-version :
197+ parameters :
198+ version :
199+ type : string
200+ docker :
201+ - image : cimg/ruby:<<parameters.version>>
202+ steps :
203+ - ruby/install :
204+ version : <<parameters.version>>
197205workflows :
198206 test-deploy :
199207 jobs :
200208 # Make sure to include "filters: *filters" in every test job you want to run as part of your deployment.
209+ - install-already-present-version :
210+ filters : *filters
211+ matrix :
212+ parameters :
213+ version : [3.4.2, 2.7.6, 3.0.7]
201214 - install-deps :
202215 name : install-deps-medium
203216 executor :
Original file line number Diff line number Diff line change @@ -4,6 +4,13 @@ RUBY_VERSION_MAJOR=$(echo "$PARAM_RUBY_VERSION" | cut -d. -f1)
44RUBY_VERSION_MINOR=$( echo " $PARAM_RUBY_VERSION " | cut -d. -f2)
55detected_platform=" $( uname -s | tr ' [:upper:]' ' [:lower:]' ) "
66
7+ if command -v ruby > /dev/null 2>&1 ; then
8+ if ruby --version | grep -q " $PARAM_RUBY_VERSION " ; then
9+ echo " Ruby $PARAM_RUBY_VERSION is already installed, exitting."
10+ exit 0
11+ fi
12+ fi
13+
714# When on MacOS, and versions minor or equal to 3.0.x. These are the versions depending on OpenSSL 1.1
815if [[ " $RUBY_VERSION_MAJOR " -le 2 || ( " $RUBY_VERSION_MAJOR " -eq 3 && " $RUBY_VERSION_MINOR " -eq 0 ) ]]; then
916 if [[ " $detected_platform " = " darwin" ]]; then
You can’t perform that action at this time.
0 commit comments