Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ The options are usually based on the `rules` keyword to enable the task. If you

| Type | Environment Name | Default | Description |
|------------|-------------------------|-----------|-------------------------------------------------------------------------------------------------------------------|
| Ruby | `RUBY_PLATFORM` | `ruby` | The ruby plarform, available values: ruby, jruby |

| Ruby | `RUBY_VERSION` | `3.2.2` | The ruby image version |
| Ruby | `SORBET_ENABLED` | Unset | Enable Sorbet gem to type check |
| Ruby | `RSPEC_JUNIT_REPORT` | Unset | Export JUnit report for GitLab CI with [RSpec JUnit Formatter](https://github.com/sj26/rspec_junit_formatter) gem |
Expand Down Expand Up @@ -133,6 +135,7 @@ The [GitOps](https://about.gitlab.com/topics/gitops/) allow us to management dep

## Roadmap

* [x] JRuby Support
* [x] Ruby support
* [x] Rubocop
* [x] RSpec
Expand Down
2 changes: 1 addition & 1 deletion common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variables:
policy: pull

.ruby:
image: ruby:$RUBY_VERSION
image: ${RUBY_PLATFORM}:$RUBY_VERSION
Copy link
Copy Markdown
Owner

@elct9620 elct9620 Aug 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer to use rules to change it to constraint the value in ruby or jruby

job:
  # ...
  rules:
   - if: $RUBY_PLATFORM == "jruby"
      variables:
          RUBY_IMAGE: jruby

But it may constraint user to use rules

Maybe migrating to GitLab Components will be better for security
https://docs.gitlab.com/ee/ci/components/

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

before_script:
- export LANG=C.UTF-8
- export LC_ALL=C.UTF-8
Expand Down
1 change: 1 addition & 0 deletions ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ include:
- remote: https://github.com/elct9620/ruby-gitlab-ci/raw/main/common.yml#ruby.yml

variables:
RUBY_PLATFORM: ruby
RUBY_VERSION: 3.2.2
CUCUMBER_PUBLISH_QUIET: 'true'

Expand Down