Skip to content

svhawks/docker-rails-with-pronto-for-gitlab-ci

 
 

Repository files navigation

Docker Rails with Pronto For Gitlab CI

What will happen?

Pronto messages posted to gitlab

Pronto started a discussion on commit

The Docker Rails with additions to support pronto gem for gitlab ci.

What is pronto?

A code review tool.

Included Packages

package version
ruby 2.4.1
cmake 3.4.3
libssh 1.6.0
node 8.1.2 10.12.0
libgit2 master

Add pronto to your Gemfile

gem 'pronto'
gem 'pronto-brakeman', require: false
gem 'pronto-flay', require: false
gem 'pronto-rails_best_practices', require: false
gem 'pronto-rails_schema', require: false
gem 'pronto-rubocop', require: false

More Runners

Example .gitlab-ci.yml

# image: "muhammet/docker-rails-with-pronto:latest" node v8.1.2
image: "svtek/docker-rails-with-pronto:latest" # node v10.12.0
services:
  - mysql:latest
  - redis:latest

variables:
  # Configure mysql environment variables (https://hub.docker.com/r/_/mysql/)
  MYSQL_DATABASE: blah
  MYSQL_ROOT_PASSWORD: blah

stages:
  - review

before_script:  
  - gem install bundler --no-ri --no-rdoc
  - bundle install --jobs $(nproc) "${FLAGS[@]}"

review:
  stage: review
  tags:
    - ruby
    - linux
  script:
    - PRONTO_GITLAB_API_PRIVATE_TOKEN=YOUR_PRIVATE_TOKEN pronto run -f gitlab -c origin/master

Note: If you get an error in GitLab runner like: Either installing with --full-index or running bundle update i18n-tasks replace the gem install bundler --no-ri --no-rdoc line with gem install bundler --no-ri --no-rdoc --version 1.14.6

Authors

Sahin Boydas

Founder @ RemoteTeam.com
LinkedIn
Muhammet

Developer @ MojiLaLa
Github
Sadik

Backend Engineer @ MojiLaLa
Github

Many thanks to @newsdev for Docker Rails project.