Configure GitLab for Workflows
Use GitLab for Workflows to integrate your Dynatrace environment with GitLab repositories. This integration enables you to use GitLab for Workflows actions in your workflow to manage issues and merge requests automatically based on your monitoring data and events.
Steps
Install GitLab for Workflows
Add a host to the Allow-list in Limit outbound connections
Grant permissions to Workflows
Authorize connection to GitLab
Install GitLab for Workflows
To use GitLab workflow actions, you need to install GitLab for Workflows from Dynatrace Hub.
- In Dynatrace Hub , select GitLab for Workflows.
- Select Install.
Add a host to the Allow-list in Limit outbound connections
By adding the GitLab host called *.gitlab.com
to the Allow-list in Limit outbound connections, you can granularly control the web services connected to your Dynatrace environment.
To set up the connection between GitLab and your Dynatrace environment
- Go to Settings and select Connections > Outbound and inbound > Limit outbound connections. This opens the Settings Classic page.
- Select Add item and add the domain of your publicly accessible GitLab instance, for example,
*.gitlab.com
. - Select Save changes.
Grant permissions to Workflows
Aside from permissions required by Workflows to run actions on your behalf, there are additional permissions required to use GitLab for Workflows actions.
To fine-tune permissions granted to Workflows
- Go to Workflows and select Settings > Authorization settings.
- Select the following permission besides the general Workflows permission:
app-settings:objects:read
To learn more about Workflows user permissions, see User permissions for workflows.
Authorize connection to GitLab
You need a configured connection for each of your GitLab environments.
To configure a connection
-
Go to Settings and select Connections > Connectors > GitLab.
-
Select Connection.
-
Define your GitLab connection.
- Connection name: Provide a meaningful name for your connection.
- GitLab URL: Add the URL of your GitLab environment.
- GitLab token: Provide your GitLab API token.
-
Select Create.