Skip to content
Snippets Groups Projects

gitlab_runner: Add VM based executor (libvirt-executor)

Merged Kristian Klausen requested to merge klausenbusk/infrastructure:custom-executor into master
Compare and Show latest version
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -78,7 +78,6 @@ create_vm_template() {
ssh pacman -Sy --noconfirm --needed archlinux-keyring
ssh pacman -Syu --noconfirm git git-lfs gitlab-runner
ssh "sed -E 's/^#(IgnorePkg *=)/\1 linux/' -i /etc/pacman.conf"
ssh rm /etc/machine-id /var/lib/dbus/machine-id
# Reboot to be sure the network is working
virsh shutdown "${vm_name}"
@@ -86,6 +85,7 @@ create_vm_template() {
virsh start "${vm_name}"
vm_ip=""
wait_for_ssh "${vm_name}"
ssh rm /etc/machine-id /var/lib/dbus/machine-id
virsh shutdown "${vm_name}"
wait_for_vm_shutdown "${vm_name}"
@@ -112,7 +112,7 @@ prepare() {
run() {
vm_name="$(get_vm_name)"
wait_for_ssh "${vm_name}"
if [[ "${2:-}" =~ upload_artifacts_.* ]]; then
if [[ "${2:-}" == 'upload_artifacts_'* ]]; then
ssh 'TMPDIR=/var/tmp bash' < "${1}" || exit "${BUILD_FAILURE_EXIT_CODE:-1}"
else
ssh bash < "${1}" || exit "${BUILD_FAILURE_EXIT_CODE:-1}"
Loading