Why GitLab is the best (especially for researchers + reproducibility)

Vicky Steeves | Librarian @ NYU | @VickySteeves

SciPy 2017 | July 13, 2017

GitLab is a git-based hosting service (they store your git repos!)

It's really different from other similar services for many reasons which you can find on their site (https://about.gitlab.com/comparison/) but I want to go over a few key reasons that make it ideal for researchers and in particular, building reproducibly.

1. Integrated CI

You don't need to hack GitHub and Travis to deploy CI and pages. GitLab has integrated CI -- hosting, LFS, and CI is free for public & private repos!!

You can use the Docker Container Registry, a secure, private Docker registry with GitLab CI to run each job in a separate & isolated container using the predefined image that is set up in .gitlab-ci.yml. You build docker containers inside the CI job!

This makes it easier to have a simple and reproducible build environment that can also run on your local workstation, regardless of it's operating system -- plus, saves time!

Example of .gitlab-ci.yml for a website

FYI, GitLab knows to syntax-check .gitlab-ci.yml!

image: registry.gitlab.com/paddy-hack/nikola:7.8.7

  - nikola build
  - master

    - nikola build
    - public
  - master

More GitLab CI Goodness

  • Build of a project can trigger a build of another, and GitLab shows the full picture -- AKA, multi-project pipelines
  • Expose artifacts built from CI
  • GitLab can test your code on your own server, or deploy to your server
  • Autoscaling CI Runners -- You can automatically spin up and down VMs to make sure your builds get processed immediately.
  • With Review Apps you can spin up dynamic environments for your merge requests and preview your branch in a live environment.

2. Auto Sync with Remotes

If your collaborators are on another platform, or you want to simply be more discoverable, you can sync between remotes automatically, either pushing or pulling!

3. It's Open Source

3a. Put it on your own server!

3b. Modify it the way you want on your server.

Related -- they come out with a stable version 1x/month, so new features are added super quick!

Other nice features

  • 4 levels of user permissions with optional expiration dates
  • Work-in-Progress Protection - add 'WIP' to the title of a merge request to prevent anyone from merging it
  • Due dates for individual issues
  • Move issues between projects
  • Ease of migration from other providers
  • Issue boards, each list of an issue board is based on a label that exists in your issue tracker
  • When a user is mentioned in or assigned to a merge request it will be included in the user Todos, easier to track

GitLab is #1 & I love talking about it. Look at the beautiful features about.gitlab.com/features

Also feel free to hit me up about it --

Email me: vicky.steeves@nyu.edu

Tweet me: @VickySteeves

Get this Presentation: