Add deployment tier to CI_JOB_JWT
What does this MR do and why?
Related to #363590 (closed)
Screenshots or screen recordings
Used https://jwt.io/ to decode the payloads.
deployment_tier
is not in $CI_JOB_JWT
from a non-deployment job:
{
"namespace_id": "1",
"namespace_path": "root",
"project_id": "21",
"project_path": "root/go-app",
"user_id": "1",
"user_login": "root",
"user_email": "admin@example.com",
"pipeline_id": "44",
"pipeline_source": "web",
"job_id": "615",
"ref": "main",
"ref_type": "branch",
"ref_protected": "true",
"jti": "de25c618-cb9b-49cc-a439-191167be5f9d",
"iss": "127.0.0.1",
"iat": 1656605611,
"nbf": 1656605606,
"exp": 1656609211,
"sub": "job_615"
}
deployment_tier
is in $CI_JOB_JWT
from a deployment job (environment: production
):
{
"namespace_id": "1",
"namespace_path": "root",
"project_id": "21",
"project_path": "root/go-app",
"user_id": "1",
"user_login": "root",
"user_email": "admin@example.com",
"pipeline_id": "44",
"pipeline_source": "web",
"job_id": "616",
"ref": "main",
"ref_type": "branch",
"ref_protected": "true",
"environment": "production",
"environment_protected": "false",
"deployment_tier": "production",
"jti": "4dd7468a-07ef-4e6d-8c4b-366706d782b7",
"iss": "127.0.0.1",
"iat": 1656605614,
"nbf": 1656605609,
"exp": 1656609214,
"sub": "job_616"
}
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Alishan Ladhani