Scope :
Create a webhook in Gitlab Repository
Register the Gitlab account in Opsera Portal
Create Data Mappings in Opsera Portal
Build Dashboard with KPIs
Section 1: Gitlab
Navigate to the repository which needs to be configured.
Settings → Webhooks → Add Webhook
Enter the payload URL provided by Opsera.
The Content Type needs to be application/json.
User may select the list of events that needs to be delivered to the payload URL mentioned.
To start with, we have selected Pull Requests and Pushes as these are the events that are currently supported by Opsera.
Add the Webhook.
Once the Webhook is added, test if the webhook is working, by selecting a Push event.
A 'HTTP 200' confirms the webhook is working as expected.
In order to configure this repository in Opsera Portal, user will need to generate a secret token in Gitlab. Go to User Settings → Access Tokens
Create a new token and provide a name as identifier. Copy the secret token that Gitlab provides and store it securely to make use of it in Opsera Portal.
Once this is set, move on to Opsera Portal to configure Tool Registry entry and Data Mappings.
Section 2: Opsera Tool Registry
Login to Opsera, and navigate to Tool Registry. Tool Registry in Opsera is a central library where all customers' tools are being configured and connections ensured.
Click on New Tool and select Gitlab from the list.
Fill in the necessary details, such as Tool Name (an identifier for the tool entry), and apply some tags. Tags can be applied at a later stage, during Data Mapping too.
Once the tool entry is created, navigate to ‘Connections’.
Provide Gitlab repository username and the Personal Access Token that was copied as a part of last step in Section 1
Click on ‘Test Connection’ to make sure that the connection between Opsera and Gitlab is established successfully.
Next, user can create Data Mappings, and configure tags to associate with each individual repository.
Section 3: Opsera Data Mappings
NOTE: To create tags, please see How To: Create & Manage Tags
Data mappings allow users to configure tags to each repository in Gitlab. These tags will be essential when configuring pipelines and insight.
Settings → Data Mappings → New Project Tag
Select the Tool Gitlab. All the accessible repositories will be listed in the repositories drop down. Select a Repository.
Provide a Project Name and apply various tags required for this repository and Save. User can always add new tags to this entry at a later time, but Insights will start reflecting data for this new tag from the point it was applied to this entry.
Section 4: Opsera Dashboard
Insights → Dashboard → New Dashboard
Provide a name for the dashboard, and apply the tags that were created while configuring the Data Mappings. These tags can also be applied later, after adding the KPIs.
Open the created dashboard and click on ‘Add KPI’.
Page redirects to the Marketplace, which is a library of 100+ KPIs specific to each tool.
In Filter by Tool → choose Gitlab
Marketplace displays the list of KPIs which are specific to Gitlab.
Add each KPI to the dashboard in the necessary order.
User may apply tags to see data more specific to each repository.