Gitlab (Server) CI: MR Gating via Aikido Dashboard with a Personal Access Token (PAT)
Introduction
You can easily configure GitLab MR Gating via the Aikido interface. This doc focusses on managing configurations in bulk - multiple repos at the same time - without code.
Use Cases
Bulk Repository Management: Easily specify and manage configurations for multiple repositories at once through the Aikido interface.
Zero Code Integration: Install the Aikido app on GitLab to manage checks without embedding any code, simplifying the setup process.
Cost Efficiency: By managing GitLab Checks through Aikido, avoid using CI minutes on GitLab, leading to significant cost savings.
Creating a Personal Access Token
Gitlab Server and Gitlab cloud support several different personal access tokens, which all work the same way. We usually recommend to create a group PAT, but for Gitlab cloud this is only possible for premium customers.
Navigate to the "Personal Access Token" settings page
For a group access token: Go to you group page > Settings > Access Tokens
For a personal access token: Go to your profile page > User settings > Access Tokens
Click on "Add new token"
Enter a name for the token, remove the expiration date and select the api scope
Click on "Create token"
Copy the token and keep it for the next step
Setting up GitLab CI
Step 1. Go to the Integrations Page and select GitLab in the CI gating section.
Step 2. Select MR Gating Configuration Via Aikido Dashboard in the modal that pops up. This will open up a new tab with GitLab to install the MR Checks App.
Step 3. Enter the access token from the previous part into the input field and click "Update token"
Step 4. Aikido redirects you to the GitLab CI page with an overview of your repos. You can start configuring your repos. We recommend starting out with 1 repo to make sure everything works well.
Step 5. Select repos in bulk and click Configure Scans button in the top right.
Step 6.This will trigger the modal to choose the severity level for failure and the scans you want to execute.
If you've added new repositories after the initial setup, you'll need to configure those repos as well.
Adding Exceptions for specific repos
You might want to have 1 specific repo where the configuration slightly differs. You can easily add exceptions by clicking the triple dots on a repo item or just select 1 or more items and go through the Configure Scans process again.
Full Flow
We have recorded a Loom video showing you the full flow, both within Aikido and GitLab. This can be viewed here.