Add support for custom labels for docker containers spawned by docker executor
Description
Labels set on docker containers are currently finite.
Example:
"com.gitlab.gitlab-runner.job.before_sha": "0000000000000000000000000000000000000000",
"com.gitlab.gitlab-runner.job.id": "267162607",
"com.gitlab.gitlab-runner.job.ref": "patch-22",
"com.gitlab.gitlab-runner.job.sha": "4d78647b918f2422e78a9f68906e62e65edc3322",
"com.gitlab.gitlab-runner.project.id": "9966627",
"com.gitlab.gitlab-runner.runner.id": "K2y8MAci",
"com.gitlab.gitlab-runner.runner.local_id": "0",
"com.gitlab.gitlab-runner.type": "build",
In order to provide better logging, monitoring of jobs running, expanding on these labels from defined values would be helpful.
Proposal
Add config toml to allow extended labels to be set on all docker containers where a job runs. This should work similarly to how pod_labels work for kubernetes executor.
Mentors
@steveazz @tmaczukin
Edited by Ray Paik