Mention the runner name/description in the first log line (for docker executor build jobs)
Description
In case of failed docker build there is no indicator on which runner the build failed to pull. If the underlying reason is a misconfiguration of the runner, this missing information makes it harder to debug the issue if there are more than a few runners.
For example the build log of a failed docker pull on an old (1.4) runner:
Running with gitlab-ci-multi-runner 1.4.1 (fae8f18)
Using Docker executor with image registry.examle.tld/user/project:latest ...
EOF
2 problems:
- The runner is outdated (1.4.1 < 1.8.1) and I don't know on which host this runner is outdated
- The registry exists and is working, since I don't know which runner processed the build job I can not debug that issue. (it's bit of a made up example, since the old runner has no auth information how to access the gitlab registry, but still…)
Proposal
If the docker pull succeeds, we get to know which runner executes the job, like in this example:
Running with gitlab-ci-multi-runner 1.8.0 (734bc5d)
Using Docker executor with image registry.example.tld/user/prioject:latest ...
Pulling docker image registry.example.tld/user/prioject:latest ...
Running on runner-d4782c03-project-109-concurrent-0 via my-custom-runner-name...
Cloning repository...
[…]
in this case my-custom-runner-name
.
I propose to show the runner name right in first line like so:
Running with gitlab-ci-multi-runner 1.8.0 (734bc5d) via my-custom-runner-name…
Using Docker executor with image registry.example.tld/user/prioject:latest ...
Pulling docker image registry.example.tld/user/prioject:latest ...
Running in container, named runner-d4782c03-project-109-concurrent-0 ...
Cloning repository...
[…]