Public Repository

Last pushed: a year ago
Short Description
Containerized pronto to run automatic code reviews in Gitlab CI using the Docker executor
Full Description

Latest version: 0.4 (disable broken pronto-poper)
Stable version: 0.4

docker-pronto

This image simplifies using Pronto automatic code reviews in your Gitlab instance.

At the moment, only some runners are supported. Soon many others will be added.

Check the source at http://code.seiel.com.ar/nachokb/docker-pronto

Runners

  1. Ruby
    1. Rubocop: enforce the Ruby Style Guide
    2. pronto-commentator: insert configurable comments whenever specified files
      change
    3. Poper: enforce rule on commits messages
    4. Flay: static analysis for Ruby code
    5. Reek: code-smell detection for Ruby code
    6. Fasterer: propose performance improvements for Ruby code
    7. Ruby on Rails
      1. Brakeman: security analysis for Ruby on Rails projects
  2. HAML
    1. HAML Lint: enforce rules on HAML style

Usage

  1. make sure you've got an instance of a runner with docker executor,
  2. in GitLab, create a user who will add comments to your commits, make sure
    it's got permission to read and comment on your project,
  3. in GitLab, go to your project's settings and then to Variables, and set these:
    1. GITLAB_API_ENDPOINT: e.g. https://your.instance/api/v3
    2. GITLAB_API_PRIVATE_TOKEN: get this by impersonating the user above and
      going to profile / account, it's the first field,
  4. add this to your .gitlab-ci.yml:
pronto:
  image: seielit/docker-pronto:stable
  stage: build
  allow_failure: true
  script:
    - echo Gitlab Instance $GITLAB_API_ENDPOINT [$GITLAB_API_PRIVATE_TOKEN]
    - pronto list
    - pronto verbose-version
    - pronto run -f gitlab
  tags:
    - docker

Maintenance Info

Cheatsheet for Docker commands:

  • docker login --username=XYZ
  • docker build -t docker-pronto .
  • docker tag deadbeef seielit/docker-pronto:0.1
  • docker tag deadbeef seielit/docker-pronto:latest
  • docker push seielit/docker-pronto

Future Work

  1. Specify which runners to use
    1. might need improvements upstream (reading RUNNERS env var)
  2. pronto-poper: add a rule for using a regex to match commit messages
    1. can I do something like this for branch names?
  3. add runners depending on nodejs and others
Docker Pull Command
Owner
seielit