Skip to main content

GitLab

Overview

GitLab GitLab is a DevOps platform that automates the software development lifecycle with integrated CI/CD features, enabling you to deploy applications quickly and securely.

By connecting GitLab Actions with Shipfox, you can track the execution of your pipelines, identify performance bottlenecks, troubleshoot operational issues, and optimize your deployment processes.

Setup

Generate a secret token

  1. On the Shipfox dashboard, go to your organization's GitLab settings.
  2. In the Secret tokens section, click on Generate (you can set a name for the token to help you identify it).
  3. A window will display with the token, copy it, and store it somewhere safe. It will not be displayed again.

Setup GitLab webhooks

Detailed documentation on setting webhooks in GitLab can be found here.

  1. In GitLab go to your project or group webhook settings.
  2. Click on Add new webhook.
  3. In the URL field, set https://edge.shipfox.io/webhook/gitlab.
  4. In the Secret token field, past the token created in the previous section.
  5. In the Trigger field, select Job events and Pipeline events.
  6. Click on Save changes.

🎉 Setup done, Shipfox will automatically start to ingest any new events

Backfill with historical data

It is possible to ingest historical data from GitLab, which allows you to get started straight away.

Generate an access token

Shipfox needs a Group or Project access token with API read access to the projects you want to import. Detailed documentation on managing access tokens can be found here.

For security purpose, we recommend that you use short-lived tokens with a limited scope for the import jobs.

  1. In GitLab go to your project or group access tokens settings.
  2. Click on Add new token.
  3. Choose a token name you will remember (example: Shipfox backfill).
  4. For Expiration date we recommend a short lived one, such as a week.
  5. For Select a role select Guest.
  6. For Select scopes select read_api.
  7. Click on Create project access token.
  8. Copy the generated token, it won't be displayed again.

Launch an import task

  1. On the Shipfox dashboard, go to your organization's GitLab settings.
  2. In the Import from GitLab section, click on Import GitLab data.
  3. Input the repository information and date from which you want to import data.
  4. Paste the access token you generated in the previous section.
  5. Click Import.

You import job has now started, you will be able to track its status from this settings page.

warning

Due to rate-limit constraints of the GitLab API, import jobs can take a lot of time. With a complex CI, importing multiple months of data can take more than a day. We can also import only 1 repository at a time per GitLab token, therefore if you launch multiple jobs in parallel, they will be ran sequentially.