Recipes: Continuous Integration on GitLab

Continuous Integration works by pushing small code chunks to your application’s code base hosted in a Git repository, and, to every push, run a pipeline of scripts to build, test, and validate the code changes before merging them into the main branch. This recipe helps you set up CI/CD on GitLab and automate your production build!.

Prerequisites

Directions

  1. Create a gatsby site
  1. Change directory and start a development server
  1. Stop your development server (Ctrl + C on your command line in most cases)

  2. Create a .gitlab-ci.yml with the following content:

  1. git push <you-remote-gitlab-repo>
  2. Check out your pipeline under the CI/CD option.

Additional resources