-
- Downloads
gitlab_runner: Fix broken "Running on ..." in the libvirt-executor
The prepare stage runs "echo "Running on $(hostname)...""[1], resulting in "bash: line 7: hostname: command not found" and it outputting "Running on ..." as the hostname command is provided by inetutils, which is not installed. Fix it by "monkey patching" it to use "hostnamectl hostname" and inject the hostname with SMBIOS[2][3]. Injecting creds with SMBIOS may also be useful in the future, e.g. for injecting an ephemeral SSH public key. [1] https://gitlab.com/gitlab-org/gitlab-runner/-/blob/v17.5.2/shells/bash.go?ref_type=tags#L452-L456 [2] https://systemd.io/CREDENTIALS/ [3] https://github.com/systemd/systemd/pull/30814
parent
2a1a488a
No related branches found
No related tags found
Showing
- roles/gitlab_runner/files/libvirt-executor 7 additions, 1 deletionroles/gitlab_runner/files/libvirt-executor
- roles/gitlab_runner/files/libvirt-executor-update-base-image 3 additions, 1 deletionroles/gitlab_runner/files/libvirt-executor-update-base-image
- roles/gitlab_runner/templates/domain_template.xml.j2 6 additions, 0 deletionsroles/gitlab_runner/templates/domain_template.xml.j2
Please register or sign in to comment