Expose refspec and depth to runner
What does this MR do?
This MR exposes refspecs
and depth
(for git-fetch) to runners according to this specification.
GitLab-Runner uses the exposed spec and depth in order to checkout source code.
We're going to use merge request's refs (e.g. refs/merge-requests/:iid/head
) in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/25504.
POST jobs/request
Sample response on When the job is not associated with a merge request
{
"id":6594,
"token":"FNWRozxyDZ4Q1HHWyW-1",
"allow_git_fetch":true,
"job_info":{
"name":"deploy",
"stage":"test",
"project_id":89,
"project_name":"prospective-merge-pipelines"
},
"git_info":{
"repo_url":"http://gitlab-ci-token:FNWRozxyDZ4Q1HHWyW-1@localhost:8181/root/prospective-merge-pipelines.git",
"sha":"abb6076c965eec51b92667388be8e7ef559f9ca3",
"before_sha":"0000000000000000000000000000000000000000",
"ref":"patch-7",
"ref_type":"branch",
"refspecs":[
"+refs/heads/*:refs/remotes/origin/*",
"+refs/tags/*:refs/tags/*"
],
"depth":0
},
...
}
What are the relevant issue numbers?
Related: https://gitlab.com/gitlab-org/gitlab-ee/issues/7380
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary - [-] Documentation created/updated via this MR
- [-] Documentation reviewed by technical writer or follow-up review issue created
-
Tests added for this feature/bug - [-] Tested in all supported browsers
-
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides - [-] Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process.
-
Security reports checked/validated by reviewer
Edited by Kamil Trzciński (Back 2025-01-01)