Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Deployment Frequency Metric - How to populate from GitLab

robbie.kohler
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 9, 2024

Hi, I connected to GitLab to Compass and I see metrics for the following:

  • Build Success Rate
  • Pull Request Cycle Time
  • Build Time
  • Open Pull Requests


It shows "Deployment Frequency" as having "no events" though. Is there something specific that needs to be configured on the GitLab CI side for the project to automatically know when deployments are going to Production?

1 answer

1 vote
Steffen Opel _Utoolity_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 29, 2024

Hi @robbie.kohler, and welcome to the Atlassian Community!

The sibling GitHub app documents a fairly advanced GitHub environment name mapping to infer the environment type.

This kind of documentation is missing for the GitLab app, but without being an active GitLab user myself, there seems to be the concept of environment tiers, which are indeed used in the GitLab app's source code, see e.g. mapEnvTierToCompassDeploymentEnv:

 

export const mapEnvTierToCompassDeploymentEnv = (env: EnvironmentTier): CompassDeploymentEventEnvironmentCategory => {

  switch (env) {
    case EnvironmentTier.PRODUCTION:
      return CompassDeploymentEventEnvironmentCategory.Production;

    case EnvironmentTier.STAGING:
      return CompassDeploymentEventEnvironmentCategory.Staging;

    case EnvironmentTier.TESTING:
      return CompassDeploymentEventEnvironmentCategory.Testing;

    case EnvironmentTier.DEVELOPMENT:
      return CompassDeploymentEventEnvironmentCategory.Development;

    case EnvironmentTier.OTHER:

    default:
      return CompassDeploymentEventEnvironmentCategory.Unmapped;

  }
};

Accordingly, you can probably make the events show up when you ensure that your GitLab environments have either the staging or production tier.

Good luck! 

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events