I’m trying to set up CI/CD using gitlab and I’m stuck at specific moment. Below is my
image: "ruby:2.6" before_script: - ruby -v - apt-get update -qy - apt-get install -y nodejs - apt-get install -y yarn - yarn --version - bundle install --path /cache - bundle exec rails webpacker:install test: script: - bundle exec rake db:create RAILS_ENV=test - bundle exec rake test
The CI output progresses without an error until it hits
$ bundle exec rails webpacker:install. Task is aborted with this message:
$ bundle exec rails webpacker:install rails aborted! ArgumentError: Malformed version number string 0.32+git /builds/kvinklly/sample-app/bin/rails:5:in `<top (required)>' /builds/kvinklly/sample-app/bin/spring:8:in `require' /builds/kvinklly/sample-app/bin/spring:8:in `block in <top (required)>' /builds/kvinklly/sample-app/bin/spring:5:in `tap' /builds/kvinklly/sample-app/bin/spring:5:in `<top (required)>' Tasks: TOP => webpacker:install => webpacker:check_yarn (See full trace by running task with --trace)
I noticed that the 0.32+git value is most likely the version of yarn that gets installed, and verified that is the version:
$ yarn --version 0.32+git
Is there a way to specify a newer version or the latest version of yarn during a CI script on gitlab?
I can post the gemfile, but it’s a fairly basic rails app without much added at this point.