Skip to content

Commit

Permalink
Generate .gitlab-ci.yml files for Ruby template (#12750)
Browse files Browse the repository at this point in the history
  • Loading branch information
brodock authored Jul 3, 2022
1 parent 2d3bfaf commit b97a4ad
Show file tree
Hide file tree
Showing 12 changed files with 162 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ public void processOpts() {
supportingFiles.add(new SupportingFile("Gemfile.mustache", "", "Gemfile"));
supportingFiles.add(new SupportingFile("rubocop.mustache", "", ".rubocop.yml"));
supportingFiles.add(new SupportingFile("travis.mustache", "", ".travis.yml"));
supportingFiles.add(new SupportingFile("gitlab-ci.mustache", "", ".gitlab-ci.yml"));
supportingFiles.add(new SupportingFile("gemspec.mustache", "", gemName + ".gemspec"));
supportingFiles.add(new SupportingFile("configuration.mustache", gemFolder, "configuration.rb"));
supportingFiles.add(new SupportingFile("api_client.mustache", gemFolder, "api_client.rb"));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.ruby: &ruby
variables:
LANG: "C.UTF-8"
before_script:
- ruby -v
- bundle config set --local deployment true
- bundle install -j $(nproc)
parallel:
matrix:
- RUBY_VERSION: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0']
image: "ruby:$RUBY_VERSION"
cache:
paths:
- vendor/ruby
key: 'ruby-$RUBY_VERSION'

gem:
extends: .ruby
script:
- bundle exec rspec
- bundle exec rake build
- bundle exec rake install
artifacts:
paths:
- pkg/*.gem

26 changes: 26 additions & 0 deletions samples/client/petstore/ruby-faraday/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.ruby: &ruby
variables:
LANG: "C.UTF-8"
before_script:
- ruby -v
- bundle config set --local deployment true
- bundle install -j $(nproc)
parallel:
matrix:
- RUBY_VERSION: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0']
image: "ruby:$RUBY_VERSION"
cache:
paths:
- vendor/ruby
key: 'ruby-$RUBY_VERSION'

gem:
extends: .ruby
script:
- bundle exec rspec
- bundle exec rake build
- bundle exec rake install
artifacts:
paths:
- pkg/*.gem

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.gitignore
.gitlab-ci.yml
.rspec
.rubocop.yml
.travis.yml
Expand Down
26 changes: 26 additions & 0 deletions samples/client/petstore/ruby/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.ruby: &ruby
variables:
LANG: "C.UTF-8"
before_script:
- ruby -v
- bundle config set --local deployment true
- bundle install -j $(nproc)
parallel:
matrix:
- RUBY_VERSION: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0']
image: "ruby:$RUBY_VERSION"
cache:
paths:
- vendor/ruby
key: 'ruby-$RUBY_VERSION'

gem:
extends: .ruby
script:
- bundle exec rspec
- bundle exec rake build
- bundle exec rake install
artifacts:
paths:
- pkg/*.gem

1 change: 1 addition & 0 deletions samples/client/petstore/ruby/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.gitignore
.gitlab-ci.yml
.rspec
.rubocop.yml
.travis.yml
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.ruby: &ruby
variables:
LANG: "C.UTF-8"
before_script:
- ruby -v
- bundle config set --local deployment true
- bundle install -j $(nproc)
parallel:
matrix:
- RUBY_VERSION: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0']
image: "ruby:$RUBY_VERSION"
cache:
paths:
- vendor/ruby
key: 'ruby-$RUBY_VERSION'

gem:
extends: .ruby
script:
- bundle exec rspec
- bundle exec rake build
- bundle exec rake install
artifacts:
paths:
- pkg/*.gem

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.gitignore
.gitlab-ci.yml
.rspec
.rubocop.yml
.travis.yml
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.ruby: &ruby
variables:
LANG: "C.UTF-8"
before_script:
- ruby -v
- bundle config set --local deployment true
- bundle install -j $(nproc)
parallel:
matrix:
- RUBY_VERSION: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0']
image: "ruby:$RUBY_VERSION"
cache:
paths:
- vendor/ruby
key: 'ruby-$RUBY_VERSION'

gem:
extends: .ruby
script:
- bundle exec rspec
- bundle exec rake build
- bundle exec rake install
artifacts:
paths:
- pkg/*.gem

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.gitignore
.gitlab-ci.yml
.rspec
.rubocop.yml
.travis.yml
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.ruby: &ruby
variables:
LANG: "C.UTF-8"
before_script:
- ruby -v
- bundle config set --local deployment true
- bundle install -j $(nproc)
parallel:
matrix:
- RUBY_VERSION: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0']
image: "ruby:$RUBY_VERSION"
cache:
paths:
- vendor/ruby
key: 'ruby-$RUBY_VERSION'

gem:
extends: .ruby
script:
- bundle exec rspec
- bundle exec rake build
- bundle exec rake install
artifacts:
paths:
- pkg/*.gem

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.gitignore
.gitlab-ci.yml
.rspec
.rubocop.yml
.travis.yml
Expand Down

0 comments on commit b97a4ad

Please sign in to comment.