Add pipeline_ref and pipeline_sha claims to Ci::JwtV2
What does this MR do and why?
Field | Description |
---|---|
pipeline_ref |
Fully qualified reference to the pipeline definition, defaults to .gitlab-ci.yml . May point to an arbitrary HTTP remote depending on project configuration. |
pipeline_sha |
Git commit SHA for the pipeline_ref (only populated when pipeline_ref is local to the GitLab instance). |
Related to #404722 (closed)
Screenshots or screen recordings
"pipeline_ref": "https://gitlab.example.com/my-group/my-project/-/blob/714a629c0b401fdce83e847fc9589983fc6f46bc/.gitlab-ci.yml",
"pipeline_sha": "714a629c0b401fdce83e847fc9589983fc6f46bc",
How to set up and validate locally
build = Ci::Build.last
Gitlab::Ci::Jwt.new(build, ttl: 1.hour).payload
Gitlab::Ci::JwtV2.new(build, aud: 'my-aud', ttl: 1.hour).payload
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