Add RUBY_PLATFORM variable to able to support JRUBY#8
Add RUBY_PLATFORM variable to able to support JRUBY#8ryudoawaru wants to merge 1 commit intoelct9620:mainfrom
Conversation
|
|
||
| .ruby: | ||
| image: ruby:$RUBY_VERSION | ||
| image: ${RUBY_PLATFORM}:$RUBY_VERSION |
There was a problem hiding this comment.
Prefer to use rules to change it to constraint the value in ruby or jruby
job:
# ...
rules:
- if: $RUBY_PLATFORM == "jruby"
variables:
RUBY_IMAGE: jrubyBut it may constraint user to use rules
Maybe migrating to GitLab Components will be better for security
https://docs.gitlab.com/ee/ci/components/
There was a problem hiding this comment.
https://docs.gitlab.com/ee/ci/yaml/index.html#specinputs
The spec:inputs seems to work correctly for non-components.
GitLab Component only work for same GitLab server or use mirror (Premium or higher)
|
It should work: include:
remote: https://github.com/elct9620/ruby-gitlab-ci/raw/main/rails.yml
inputs:
platform: jrubyHowever, the include:
- remote: https://github.com/elct9620/ruby-gitlab-ci/raw/main/rails.yml
inputs:
platform: jruby
- remote: https://github.com/elct9620/ruby-gitlab-ci/raw/main/docker.yml
inputs:
platform: jruby
To resolve it, we have to remove |
|
Due to the |
This PR makes it possible to support JRuby by setting
RUBY_PLATFORMvariable.