CI for Ruby on Rails on Hosted Agents
Build, lint, audit, run static analysis, and test a Ruby on Rails application using Bundler, RuboCop, Bundler-audit, Brakeman, and RSpec.
Use template →- Languages
- Ruby
- Use cases
- Continuous integration, Web application
- Platforms
- Docker, Hosted Agents
- Tools
- Bundler, RuboCop, Bundler-audit, Brakeman, RSpec
CI for Ruby on Rails on Hosted Agents
Build, lint, audit, run static analysis, and test a Ruby on Rails application using Bundler, RuboCop, Bundler-audit, Brakeman, and RSpec.
Use template →CI for Ruby on Rails on Hosted Agents
This template gives you a continuous integration (CI) pipeline that builds, lints, audits, runs static analysis, and tests a Ruby on Rails application.
At a glance:
- For Ruby on Rails applications
- Uses Bundler
- Requires Docker
- Lints code with RuboCop
- Audits gems with Bundler-audit
- Runs static analysis with Brakeman
- Tests code using RSpec
How it works
This template:
- Installs ruby gems using bundler, caching the result.
- Lints your Ruby code with RuboCop.
- Audits your gems with Bundler-audit.
- Performs static analysis of your code with Brakeman.
- Runs tests with RSpec.
The first step installs gems and caches them for the following steps. The remaining steps run in parallel. The runtime environment uses a Docker image with the latest version of Ruby.
Next steps
After you select Use template, you’ll:
- Connect the Git repository with your RoR application.
- Modify the commands if necessary.
- Configure the pipeline cluster to use hosted agents.
- Enable Git mirror in Hosted agents - Cache Storage - Settings. This will speed up git checkout.
- Run the pipeline.
You can then play around with the pipeline settings. For example, run the pipeline locally while you iterate on the definition or set a schedule to trigger a nightly build.
If you need help, please check our documentation, raise an issue, or reach out to support.