GitLab CI

This chapter shows how to integrate with FeaturePeek when using GitLab CI/CD as Continuous Integration pipeline for a GitHub repo.

Prerequisite: You should create a FeaturePeek account and configure your peek.yml file before following the steps in this chapter.

Example config file

If you already have your config file set up, simply append the FeaturePeek CI command after your build phase.

Add a .gitlab-ci.yml file inside your repo's root directory if you don't have one already. A Jekyll project, for example, would have a GitLab CI config file that looks like this:

# /.gitlab-ci.yml
image: ruby:2.5
- apt-get update
- apt-get install -y sqlite3 libsqlite3-dev nodejs
- ruby -v
- which ruby
- gem install bundler --no-document
- bundle install --jobs $(nproc) "${FLAGS[@]}"
- bundle exec jekyll build
- bash <(curl -s
- bundle exec rspec
- bundle exec rubocop

Note: The command in the snippet above is just for static builds — if you are building a Docker image, you'll need to pass in more arguments.

Try it out

Try opening a new pull request that contain the changes in this chapter. When your CI finishes successfully, you should see the FeaturePeek bot comment a link on your pull request. If not, consult our Troubleshooting section.