/
AllAi DevOps on GitLab - Installation Guide

AllAi DevOps on GitLab - Installation Guide

Introduction

AllAi DevOps is an AI DevOps platform that is tightly integrated with Gitlab. AllAi DevOps is intended to help in the development process by providing useful features that save time for developers and reviewers.

Getting started

AllAi DevOps setup is slightly different on Gitlab. Since Gitlab does not have the ‘installable app’ as Github does, the setup follow other steps. AllAi DevOps on Gitlab can be configured in a:

  1. Project (Repository) level;

  2. User level;

  3. Group (organization) level.

In any of the scenarios, the configuration steps are the same. The only difference is where the configuration is performed: project settings / user settings/ group settings.

In order to setup AllAi DevOps on Gitlab, it is necessary to configure:

  1. Create an API token;

  2. Configure Webhooks.

Setting up AllAi DevOps on a Group (organization)

It is necessary to have Gitlab Ultimate plan to change these settings.

First step is to create an access token with API scope:

image-20240229-111534.png

 

In next screen, after clicking “Add token“, you should add a name for the token, any name will work, just put a name that you’ll remember that this token is being used by AllAi DevOps. It is necessary to mark api

under scope options. AllAi DevOps needs access to the API to read PRs and create suggestions.

image-20240229-111553.png

 

After the token is created, it is necessary to configure webhooks:

image-20240229-111605.png

 

In the webhooks screen, after clicking 'Add webhook', you should enter the following information:

URL: https://devops.allai.digital/webhooks/gitlab

Secret token: anything, it should be a secure string, like a password.

image-20240229-111627.png

 

Under triggers, the following events should be marked:

  • Push events

  • Comments

  • Merge request events

  • Release events

image-20240229-111639.png

 

After the webhook is added, the last step is to configure the credentials on AllAi DevOps servers, for that, it is required for the client to email allai@osf.digital with the following info (created in previous steps):

  • API token;

  • Webhook secret.

  • GitLab instance URL (for Enterprise clients using on-premise instances)

 

Please take into consideration:

Docstrings are generated for functions and methods of the following languages:

  • JavaScript (SFRA and LWC);

  • TypeScript;

  • Python;

  • Apex.

To be eligible for a docstring generation in the PR:

  • a function or a method must have at least one line changed;

The code checks follow the same rules.

Enterprise clients

Enterprise clients often use an on-premises version of code versioning platforms (Gitlab) behind a company firewall.

In this case, the IT department of the company needs to whitelist which IPs can interact with the versioning platform. To solve this, we attached a static IP to AllAi internal lambdas.

The client needs to perform the following configurations:

  • For outbound connections, they need to be able to make requests to https://devops.allai.digital

  • For inbound connections, they need to whitelist this IP (we are going to call their gitlab apis from this ip): 52.20.17.233

Email template:

To: allai@osf.digital

Cc: cristina.calota@osf.digital

Subject: Installation Confirmation - [Your Organization Name]

Hello AllAi Team

We completed the installation steps and waiting for your confirmation.

  • API token: <API token>

  • Webhook secret: <Webhook secret.>

  • Gitlab Instance url

Thanks in advance.

Related content