# .woloxci/metrics.json
{
"baseBranch": "development",
"projectName": "'Change me with project name'",
"tech": "ruby_on_rails",
"repoName": "repository-name",
"apmProjectName": "repository-apm-if-exists"
}
In metrics
step, we should use the same configuration for repoName
, projectName
and baseBranch
used in metrics.json
file
# .woloxci/config.yml
...
steps:
config:
- rm -rf metrics && mkdir metrics && wget -O metrics/metrics.sh https://raw.githubusercontent.com/Wolox/backend-metrics/master/ruby_on_rails/metrics.sh && chmod +x metrics/metrics.sh
- bundle install | tee -a metrics/bundle_install
analysis:
- bundle exec rubocop app spec --format simple
- bundle exec rubycritic --path ./analysis --minimum-score 80 --no-browser | tee -a metrics/rubycritic_report
setup_db:
- bundle exec rails db:create
- bundle exec rails db:schema:load
test:
- bundle exec rspec | tee -a metrics/rspec_report
security:
- bundle exec brakeman --exit-on-error
metrics:
- /metrics/metrics.sh repository-name 'Change me with project name' development
environment:
RAILS_ENV: test
GIT_COMMITTER_NAME: a
GIT_COMMITTER_EMAIL: b
LANG: C.UTF-8
ROR_WOLOX_METRICS_API_KEY: ror-api-key
jenkinsEnvironment:
- WOLOX_METRICS_API_KEY
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Run rspec tests (
bundle exec rspec spec -fd
) - Run scss lint (
bundle exec scss-lint app/assets/stylesheets/
) - Run rubocop lint (
bundle exec rubocop app spec -R
) - Push your branch (
git push origin my-new-feature
) - Create a new Pull Request
This project is written by Wolox.