Skip to content
Snippets Groups Projects

Expose refspec and depth to runner

Merged Shinya Maeda requested to merge expose-merge-ref-to-runner into master

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.

Sample response on POST jobs/request

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?

Edited by Kamil Trzciński

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Shinya Maeda resolved all discussions

    resolved all discussions

  • Shinya Maeda added 1 commit

    added 1 commit

    Compare with previous version

  • Shinya Maeda mentioned in merge request !25237 (closed)

    mentioned in merge request !25237 (closed)

  • Shinya Maeda added 1 commit

    added 1 commit

    Compare with previous version

  • Shinya Maeda added 1 commit

    added 1 commit

    • f7770354 - Support backward compatibility

    Compare with previous version

  • Shinya Maeda added 1 commit

    added 1 commit

    Compare with previous version

  • Shinya Maeda changed the description

    changed the description

  • Author Maintainer

    @ayufan This is a counter part of gitlab-runner!1092 (closed). Would you mind to perform an early review?

  • assigned to @ayufan

  • Shinya Maeda added 60 commits

    added 60 commits

    Compare with previous version

  • Shinya Maeda added 1 commit

    added 1 commit

    Compare with previous version

  • Author Maintainer

    Screenshot_from_2019-02-15_14-37-18

  • Author Maintainer

    I think showing full ref path is correct behavior. It indicates that the pipeline used the merge ref, not branch ref.

    However, this breaks the functinoality to jump to the proper branch page.

  • Author Maintainer

    Screenshot_from_2019-02-15_14-40-04

  • Shinya Maeda added 1 commit

    added 1 commit

    Compare with previous version

  • Shinya Maeda added 83 commits

    added 83 commits

    Compare with previous version

  • Shinya Maeda added 1 commit

    added 1 commit

    • 283546f9 - Support fork workflow (Public only)

    Compare with previous version

  • Shinya Maeda added 1 commit

    added 1 commit

    Compare with previous version

  • Shinya Maeda changed title from Expose merge ref to runner to Expose ref-spec and depth to runner (and expose merge ref)

    changed title from Expose merge ref to runner to Expose ref-spec and depth to runner (and expose merge ref)

  • Shinya Maeda assigned to @dosuken123

    assigned to @dosuken123

  • Shinya Maeda added 1 commit

    added 1 commit

    Compare with previous version

  • Shinya Maeda changed title from Expose ref-spec and depth to runner (and expose merge ref) to Expose refspec and depth to runner (and expose merge ref)

    changed title from Expose ref-spec and depth to runner (and expose merge ref) to Expose refspec and depth to runner (and expose merge ref)

  • Shinya Maeda added 1 commit

    added 1 commit

    • 48fa9fb5 - Expose refspec and depth to runner

    Compare with previous version

  • Shinya Maeda changed the description

    changed the description

  • Shinya Maeda added 1 commit

    added 1 commit

    • 8263463e - Expose refspec and depth to runner

    Compare with previous version

  • Shinya Maeda changed the description

    changed the description

  • Author Maintainer

    I'm going to decouple merge ref related changes to https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/25344

  • Shinya Maeda added 1 commit

    added 1 commit

    • 34efa286 - Expose refspec and depth to runner

    Compare with previous version

  • Shinya Maeda changed title from Expose refspec and depth to runner (and expose merge ref) to Expose refspec and depth to runner

    changed title from Expose refspec and depth to runner (and expose merge ref) to Expose refspec and depth to runner

  • Shinya Maeda added 1 commit

    added 1 commit

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading