3

Hello can anybody tell me what exactly the deployment_tier for environments is for in gitlab-ci?

https://docs.gitlab.com/ee/ci/yaml/index.html#environmentdeployment_tier https://docs.gitlab.com/ee/ci/environments/index.html#deployment-tier-of-environments

Is this just like a label for the environment or does it actually has any functionality?

Marcel
  • 1,606
  • 16
  • 29

2 Answers2

5

It's used primarily for VSA analytics and DORA metrics features of GitLab. By default, GitLab only counts "production" deployments in its metrics and analytics. GitLab determines whether a deployment is "production" or not by the name: of the environment. Basically, if your environment is named "production" or production/* it will be considered a production deployment.

However, some GitLab users may prefer to use a different environment name, such as us-east-1 or whatever for their production environments, but they still want these deployments to be included in the VSA analytics and DORA metrics as "production" deployments. This is where deployment_tier comes in. By setting the deployment_tier to production you can have environments not following the naming pattern to be considered in your VSA analytics and DORA metrics.

TL;DR yes, it is just a label and, aside from metrics/analytics, it does not otherwise materially affect functionality.

sytech
  • 29,298
  • 3
  • 45
  • 86
0

Aother usage, introduced by GitLab 15.2 (July 2022)

Fetch secrets based on deployment tier

Secrets can be assigned based on the deployment tier of an environment. In this release, we include the deployment_tier in the JSON Web Token (CI_JOB_JWT) so that users can fetch secrets per a specific deployment tier.

See Documentation and Issue.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250