Expose SSH project URL to runners
1. Description including problem, use cases, benefits, and/or goals
1.1 Introduction
When a runner asks for pending builds (with a POST
to /ci/api/v1/builds/regigister.json
), the CI server answers with a bunch of data (JSON formatted) containing, among other stuff, the 'repo_url'
value which contains the HTTPS clone/fetch repo URL.
The runner then uses this URL to do a clone/fetch to get an updated copy of the repo, and then runs the tests.
1.2 Problem
In some scenarios, the HTTPS clone/fetch URL is not available. As an example, this happens when the HTTPS has mutual authentication (with client certificates), or when there are proxies or filtering involved. See https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/1150
2. Proposal
Return also the SSH URL, in a field named (for example) 'repo_ssh_url'
, so the runner can decide what protocol to use.
3. Links / references
See the same issue on the official runner: https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/1150