Commit 5499cffb authored by Sven-Hendrik Haase's avatar Sven-Hendrik Haase
Browse files

Merge branch 'issues/121' into 'master'

Order pacman-init before cloud-final

Closes #121

See merge request !147
parents 03a72dca 312d9334
Pipeline #3300 passed with stages
in 36 minutes and 27 seconds
...@@ -86,6 +86,13 @@ test-cloudimg-qemu: ...@@ -86,6 +86,13 @@ test-cloudimg-qemu:
password: '${SSHPASS}' password: '${SSHPASS}'
chpasswd: { expire: False } chpasswd: { expire: False }
ssh_pwauth: True ssh_pwauth: True
packages:
- tmux
- tree
runcmd:
- [ echo, 'Install more packages using runcmd.' ]
- [ pacman, --noconfirm, -Syu, bat ]
- [ touch, /runcmd_successful ]
EOF EOF
- | - |
cat > meta-data <<EOF cat > meta-data <<EOF
...@@ -96,6 +103,8 @@ test-cloudimg-qemu: ...@@ -96,6 +103,8 @@ test-cloudimg-qemu:
- genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data - genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data
- qemu-system-x86_64 -m 512 -net nic -net user,hostfwd=tcp::2222-:22 -drive file=$(ls output/Arch-Linux-x86_64-cloudimg-*.qcow2),if=virtio -drive file=seed.iso,if=virtio -nographic & - qemu-system-x86_64 -m 512 -net nic -net user,hostfwd=tcp::2222-:22 -drive file=$(ls output/Arch-Linux-x86_64-cloudimg-*.qcow2),if=virtio -drive file=seed.iso,if=virtio -nographic &
- timeout 15m sh -c "while ! sshpass -e ssh -o ConnectTimeout=2 -o StrictHostKeyChecking=no arch@localhost -p 2222 true; do sleep 1; done" - timeout 15m sh -c "while ! sshpass -e ssh -o ConnectTimeout=2 -o StrictHostKeyChecking=no arch@localhost -p 2222 true; do sleep 1; done"
- timeout 15m sh -c "while ! sshpass -e ssh -o ConnectTimeout=2 -o StrictHostKeyChecking=no arch@localhost -p 2222 pacman -Q bat tmux tree; do sleep 1; done"
- timeout 15m sh -c "while ! sshpass -e ssh -o ConnectTimeout=2 -o StrictHostKeyChecking=no arch@localhost -p 2222 test -f /runcmd_successful ; do sleep 1; done"
tag_release: tag_release:
stage: publish stage: publish
......
...@@ -9,7 +9,7 @@ cat <<EOF >/etc/systemd/system/pacman-init.service ...@@ -9,7 +9,7 @@ cat <<EOF >/etc/systemd/system/pacman-init.service
Description=Initializes Pacman keyring Description=Initializes Pacman keyring
Wants=haveged.service Wants=haveged.service
After=haveged.service After=haveged.service
Before=sshd.service Before=sshd.service cloud-final.service
ConditionFirstBoot=yes ConditionFirstBoot=yes
[Service] [Service]
...@@ -28,7 +28,7 @@ cat <<EOF >/etc/systemd/system/reflector-init.service ...@@ -28,7 +28,7 @@ cat <<EOF >/etc/systemd/system/reflector-init.service
Description=Initializes mirrors for the VM Description=Initializes mirrors for the VM
After=network-online.target After=network-online.target
Wants=network-online.target Wants=network-online.target
Before=sshd.service Before=sshd.service cloud-final.service
ConditionFirstBoot=yes ConditionFirstBoot=yes
[Service] [Service]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment