Skip to content
Snippets Groups Projects

Add option to specify clone path

1 unresolved thread

What does this MR do?

Replaces !876 (closed).

It adds support for specifying GIT_CLONE_PATH, enabled by default for docker/kubernetes executor.

Please read: !876 (closed)

Why was this MR needed?

Closes #2211 (closed)

Are there points in the code the reviewer needs to double check?

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Added tests for this feature/bug
  • In case of conflicts with master - branch was rebased

What are the relevant issue numbers?

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
  • Steve Xuereb
  • Steve Xuereb
  • assigned to @ayufan

  • Stefan Weber mentioned in merge request !1228 (closed)

    mentioned in merge request !1228 (closed)

  • Kamil Trzciński added 26 commits

    added 26 commits

    Compare with previous version

  • Brendan O'Leary mentioned in issue #2900

    mentioned in issue #2900

  • Kamil Trzciński assigned to @steveazz

    assigned to @steveazz

  • Kamil Trzciński added 2 commits

    added 2 commits

    • e64555c0 - Fix docker executor commands
    • 5bfbae5c - Strong validate that `GIT_CLONE_PATH` is used within `CI_BUILDS_DIR`.

    Compare with previous version

  • Author Maintainer

    @steveazz This incorporates the !1282 (merged).

    • Author Maintainer
      Resolved by Kamil Trzciński

      @steveazz

      I made a change.

      This implementation currently requires that GIT_CLONE_PATH is within the builds_dir. This makes this feature still vaiable, but it will not make it spread across every unsafe path :) For easy discovery of builds_dir the Runner variable is introduced $CI_BUILDS_DIR.

      We can relax this later.

  • added 1 commit

    • 4ae6a063 - Strong validate that `GIT_CLONE_PATH` is used within `CI_BUILDS_DIR`.

    Compare with previous version

  • Steve Xuereb mentioned in merge request !1282 (merged)

    mentioned in merge request !1282 (merged)

  • Steve Xuereb changed the description

    changed the description

  • Steve Xuereb
  • Steve Xuereb
  • 743 743 Runner will try to download the proper image. This of course means that the image should be uploaded to the registry
    744 744 before upgrading the Runner, otherwise the jobs will start failing with a "No such image" error.
    745 745
    746 ## The `[runners.custom_build_dir]` section
  • Steve Xuereb
  • Steve Xuereb
  • Steve Xuereb
  • assigned to @ayufan

  • Kamil Trzciński assigned to @steveazz

    assigned to @steveazz

  • Manual QA

    I have the .gitlab-ci.yml pipeline specified below for testing:

    .giltab-ci.yml
    image: golang:1.12
    
    test:
      stage: test
      script:
      - pwd
      - ls -la
      - ls -la go/src/gitlab-org/
      - echo $CI_PROJECT_DIR

    And having builds_dir inside of runner configuration to /go

    No GIT_CLONE_PATH specified (default behavior) :white_check_mark:

    Job Log

    Screen_Shot_2019-04-03_at_15.56.31

    GIT_CLONE_PATH specified inside of builds_dir :white_check_mark:

    Job Log

    Screen_Shot_2019-04-03_at_16.00.55

    GIT_CLONE_PATH specified outside of builds_dir :white_check_mark:

    Job Log

    Screen_Shot_2019-04-03_at_16.03.18

  • assigned to @ayufan

  • Steve Xuereb assigned to @steveazz

    assigned to @steveazz

  • assigned to @ayufan

  • Kamil Trzciński changed the description

    changed the description

  • Tomasz Maczukin
  • Tomasz Maczukin
  • Tomasz Maczukin
  • Tomasz Maczukin
  • Kamil Trzciński added 14 commits

    added 14 commits

    • 4ae6a063...5140f2e7 - 11 commits from branch master
    • c9bd231f - Add custom clone path for the build
    • f4645bfb - Strong validate that `GIT_CLONE_PATH` is used within `CI_BUILDS_DIR`.
    • f11f3097 - Remove commands/register.go changes as they are unneeded

    Compare with previous version

  • Kamil Trzciński resolved all discussions

    resolved all discussions

  • mentioned in issue #4113 (closed)

  • I can't seem to approve this because there is a commit of mine. But LGTM, the only thing we need to check now is documentation :rocket:

    Thank you @ayufan for pushing this forward :rocket:

  • Author Maintainer

    I also changed runners.custom_build_dir.enable to runners.custom_build_dir.enabled.

  • added 1 commit

    • 46c7aea8 - Remove commands/register.go changes as they are unneeded

    Compare with previous version

  • added 1 commit

    • 6d124010 - Remove commands/register.go changes as they are unneeded

    Compare with previous version

  • Kamil Trzciński marked the checklist item blocked by !1282 (merged) as completed

    marked the checklist item blocked by !1282 (merged) as completed

  • Kamil Trzciński marked the checklist item In case of conflicts with master - branch was rebased as completed

    marked the checklist item In case of conflicts with master - branch was rebased as completed

  • Kamil Trzciński marked the checklist item Documentation created/updated as completed

    marked the checklist item Documentation created/updated as completed

  • Kamil Trzciński marked the checklist item Added tests for this feature/bug as completed

    marked the checklist item Added tests for this feature/bug as completed

  • Kamil Trzciński marked the checklist item Documentation created/updated as incomplete

    marked the checklist item Documentation created/updated as incomplete

  • Kamil Trzciński marked the checklist item Added tests for this feature/bug as incomplete

    marked the checklist item Added tests for this feature/bug as incomplete

  • Kamil Trzciński marked the checklist item In case of conflicts with master - branch was rebased as incomplete

    marked the checklist item In case of conflicts with master - branch was rebased as incomplete

  • Kamil Trzciński marked the checklist item blocked by !1282 (merged) as incomplete

    marked the checklist item blocked by !1282 (merged) as incomplete

  • Tomasz Maczukin approved this merge request

    approved this merge request

  • It looks good now and the tests are passing. The documentation is being handled separately by gitlab-org/gitlab-ce!20427, so let's merge this one.

    Thanks @ayufan for finalizing the work on this feature!

  • Tomasz Maczukin mentioned in commit 302c5edb

    mentioned in commit 302c5edb

  • mentioned in issue #2211 (closed)

  • Steve Xuereb mentioned in commit 83b390ee

    mentioned in commit 83b390ee

  • Steve Xuereb mentioned in merge request !1301 (merged)

    mentioned in merge request !1301 (merged)

  • Steve Xuereb mentioned in commit b9d932d9

    mentioned in commit b9d932d9

  • André Hänsel mentioned in issue #4777

    mentioned in issue #4777

  • Eric Schulte mentioned in issue #25717

    mentioned in issue #25717

  • Marvin Gaube mentioned in issue #26414

    mentioned in issue #26414

  • Please register or sign in to reply
    Loading