|
|
|
@ -43,68 +43,57 @@ jobs:
|
|
|
|
|
with: {fetch-depth: 1}
|
|
|
|
|
- name: Set up vagrant and libvirt
|
|
|
|
|
uses: ./.github/actions/vagrant-setup
|
|
|
|
|
|
|
|
|
|
- name: "Vagrant Cache"
|
|
|
|
|
uses: actions/cache@v4
|
|
|
|
|
with:
|
|
|
|
|
path: |
|
|
|
|
|
/tmp/boxes
|
|
|
|
|
~/.vagrant.d/boxes
|
|
|
|
|
key: vagrant-box-${{ matrix.vm }}
|
|
|
|
|
# Workaround for https://github.com/actions/cache/issues/1319
|
|
|
|
|
- name: Move vagrant cache to /root
|
|
|
|
|
run: |
|
|
|
|
|
mkdir -p /tmp/boxes
|
|
|
|
|
sudo rm -rf /root/.vagrant.d/boxes
|
|
|
|
|
sudo mv -f /tmp/boxes /root/.vagrant.d
|
|
|
|
|
- name: "Vagrant Plugin(s)"
|
|
|
|
|
run: sudo vagrant plugin install vagrant-k3s vagrant-reload vagrant-scp
|
|
|
|
|
run: vagrant plugin install vagrant-k3s vagrant-reload vagrant-scp
|
|
|
|
|
- name: "Download k3s binary"
|
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
|
with:
|
|
|
|
|
name: k3s
|
|
|
|
|
path: tests/install/${{ matrix.vm }}
|
|
|
|
|
- name: "Vagrant Up"
|
|
|
|
|
run: sudo vagrant up --no-provision
|
|
|
|
|
run: vagrant up --no-provision
|
|
|
|
|
- name: "Upload k3s binary to VM"
|
|
|
|
|
run: |
|
|
|
|
|
chmod +x k3s
|
|
|
|
|
sudo vagrant scp k3s /tmp/k3s
|
|
|
|
|
sudo vagrant ssh -c "sudo mv /tmp/k3s /usr/local/bin/k3s"
|
|
|
|
|
sudo vagrant provision --provision-with=k3s-upload
|
|
|
|
|
vagrant scp k3s /tmp/k3s
|
|
|
|
|
vagrant ssh -c "sudo mv /tmp/k3s /usr/local/bin/k3s"
|
|
|
|
|
vagrant provision --provision-with=k3s-upload
|
|
|
|
|
- name: Add binary to PATH
|
|
|
|
|
if: matrix.vm == 'centos-7' || matrix.vm == 'rocky-8' || matrix.vm == 'rocky-9' || matrix.vm == 'opensuse-leap'
|
|
|
|
|
run: sudo vagrant provision --provision-with=add-bin-path
|
|
|
|
|
run: vagrant provision --provision-with=add-bin-path
|
|
|
|
|
- name: "⏩ Install K3s"
|
|
|
|
|
run: |
|
|
|
|
|
sudo vagrant provision --provision-with=k3s-prepare
|
|
|
|
|
sudo vagrant provision --provision-with=k3s-install
|
|
|
|
|
vagrant provision --provision-with=k3s-prepare
|
|
|
|
|
vagrant provision --provision-with=k3s-install
|
|
|
|
|
if [ ${{ matrix.vm }} = 'opensuse-microos' ]; then vagrant reload --no-provision; fi
|
|
|
|
|
- name: "⏳ Node"
|
|
|
|
|
run: sudo vagrant provision --provision-with=k3s-wait-for-node
|
|
|
|
|
run: vagrant provision --provision-with=k3s-wait-for-node
|
|
|
|
|
- name: "⏳ CoreDNS"
|
|
|
|
|
run: sudo vagrant provision --provision-with=k3s-wait-for-coredns
|
|
|
|
|
run: vagrant provision --provision-with=k3s-wait-for-coredns
|
|
|
|
|
- name: "⏳ Local Storage"
|
|
|
|
|
run: sudo vagrant provision --provision-with=k3s-wait-for-local-storage
|
|
|
|
|
run: vagrant provision --provision-with=k3s-wait-for-local-storage
|
|
|
|
|
continue-on-error: true
|
|
|
|
|
- name: "⏳ Metrics Server"
|
|
|
|
|
run: sudo vagrant provision --provision-with=k3s-wait-for-metrics-server
|
|
|
|
|
run: vagrant provision --provision-with=k3s-wait-for-metrics-server
|
|
|
|
|
continue-on-error: true
|
|
|
|
|
- name: "⏳ Traefik"
|
|
|
|
|
run: sudo vagrant provision --provision-with=k3s-wait-for-traefik
|
|
|
|
|
run: vagrant provision --provision-with=k3s-wait-for-traefik
|
|
|
|
|
continue-on-error: true
|
|
|
|
|
- name: "k3s-status"
|
|
|
|
|
run: sudo vagrant provision --provision-with=k3s-status
|
|
|
|
|
run: vagrant provision --provision-with=k3s-status
|
|
|
|
|
- name: "k3s-procps"
|
|
|
|
|
run: sudo vagrant provision --provision-with=k3s-procps
|
|
|
|
|
run: vagrant provision --provision-with=k3s-procps
|
|
|
|
|
- name: Cleanup VM
|
|
|
|
|
run: sudo vagrant destroy -f
|
|
|
|
|
run: vagrant destroy -f
|
|
|
|
|
- name: On Failure, launch debug session
|
|
|
|
|
uses: lhotari/action-upterm@v1
|
|
|
|
|
if: ${{ failure() }}
|
|
|
|
|
with:
|
|
|
|
|
## If no one connects after 5 minutes, shut down server.
|
|
|
|
|
wait-timeout-minutes: 5
|
|
|
|
|
- name: Copy out vagrant boxes for cache
|
|
|
|
|
run: |
|
|
|
|
|
sudo mv -f /root/.vagrant.d/boxes /tmp/boxes
|
|
|
|
|
sudo chmod -R 777 /tmp/boxes
|