GitLab

GitLab is a well-known source code repository that supports loading catalog entities from gitlab.com or a self-hosted GitLab. This documentation covers setting up GitLab integration with TIBCO Developer Hub. You might need to make code changes in the backend to support this integration.

Location

Add catalog entities to static catalog configuration, or register with the catalog-import plugin. You have to use the following configuration from our app-config and supply the GITLAB_TOKEN as a Kubernetes secret object. Then, generate a TOKEN for a specific group in your GitLab integration. Go to your group and navigate to Settings > Access Tokens.

integrations:
  gitlab:
    - host: gitlab.com
      token: ${GITLAB_TOKEN}

Some enterprises have a private GitLab instance deployed in their respective environments. To support that, refer to this additional content. All the environment variables must be supplied via Kubernetes Secret Object only.

Discovery

The GitLab integration has a unique entity provider for discovering catalog entities from GitLab. The entity provider can crawl the GitLab instance and register entities matching the configured paths. This can be useful as an alternative to static locations or manually adding things to the catalog. To use the discovery provider, you must have a GitLab integration set up with a token (refer to the above section). Then, you can add a provider config per group to the catalog configuration:

catalog:
  locations:
    - type: gitlab-discovery
	// this is a sample URL, replace it with your own values
      target: https://gitlab.com/group/subgroup/blob/main/catalog-info.yaml

To make the catalog import seamless, this alternative processor crawls through your GitLab group/subgroup to fetch catalog entities.

  • The above configuration must be applied as a custom configuration while Provisioning TIBCO Developer Hub from TIBCO Control Plane.

  • The subgroup part in the above URL is not necessary. You can keep the group name (optional), and allow proper permissions to the token to fetch the subgroup and other repositories from it.

  • The above URL represents a structure and doesn’t point anywhere. It is for the processor to understand the structure of your group/subgroup.

    • group: Represents a Group in your GitLab instance.

    • subgroup: If the token contains all the necessary permissions (optional).

    • blob/main/catalog-info.yaml: Look every repository for this file location. This is because all the entity kinds in Backstage are structured in a way that you can find in a catalog-info.yaml file.