Set up GitLab for Workflows

Use GitLab for Workflows 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

Step 1 Install GitLab for Workflows

To use GitLab workflow actions, you need to install GitLab for Workflows from Dynatrace Hub.

  1. In Dynatrace Hub Hub, select GitLab for Workflows.
  2. Select Install.

Step 2 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

  1. Go to Settings and select Connections > Outbound and inbound > Limit outbound connections. This opens the Settings Classic page.
  2. Select Add item and add the domain of your publicly accessible GitLab instance, for example, *.gitlab.com.
  3. Select Save changes.

Step 3 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

  1. Go to Workflows and select Settings > Authorization settings.
  2. 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.

Step 4 Authorize connection to GitLab

You need a configured connection for each of your GitLab environments.

To configure a connection

  1. Go to Settings and select Connections > Connectors > GitLab.

  2. Select Add Connection.

  3. 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.
  4. Select Create.