diff --git a/.github/workflows/cgroup.yaml b/.github/workflows/cgroup.yaml index 84f2c96192..335e5839ad 100644 --- a/.github/workflows/cgroup.yaml +++ b/.github/workflows/cgroup.yaml @@ -34,7 +34,7 @@ jobs: uses: actions/upload-artifact@v2 with: { name: k3s, path: dist/artifacts/k3s } test: - name: "Smoke Test" + name: "Conformance Test" needs: prep # nested virtualization is only available on macOS hosts runs-on: macos-10.15 @@ -66,10 +66,14 @@ jobs: continue-on-error: true - name: "Vagrant Plugin(s)" run: vagrant plugin install vagrant-k3s - - name: "Vagrant Up ⏩ Install K3s" + - name: "Vagrant Up" run: vagrant up - - name: "K3s Start" # start k3s rootfull - run: vagrant ssh -- sudo systemctl start k3s-server + - name: "K3s Prepare" + run: vagrant provision --provision-with=k3s-prepare + - name: ⏬ "K3s Install" + run: vagrant provision --provision-with=k3s-install + - name: ⏩ "K3s Start" + run: vagrant provision --provision-with=k3s-start - name: "K3s Ready" # wait for k3s to be ready run: vagrant provision --provision-with=k3s-ready - name: "K3s Status" # kubectl get node,all -A -o wide diff --git a/tests/vagrant/cgroup/unified/fedora-34/Vagrantfile b/tests/vagrant/cgroup/unified/fedora-34/Vagrantfile index 3e1d614d79..3c10005a59 100644 --- a/tests/vagrant/cgroup/unified/fedora-34/Vagrantfile +++ b/tests/vagrant/cgroup/unified/fedora-34/Vagrantfile @@ -19,7 +19,7 @@ Vagrant.configure("2") do |config| test.vm.hostname = 'smoke' test.vm.provision :file, run: 'always', source: ENV['TEST_UNITFILE_ROOTFULL'], destination: 'k3s-rootfull.service' test.vm.provision :file, run: 'always', source: ENV['TEST_UNITFILE_ROOTLESS'], destination: 'k3s-rootless.service' - test.vm.provision 'k3s-prepare', type: "shell", run: "once", privileged: true do |sh| + test.vm.provision 'k3s-prepare', type: "shell", run: ENV['CI'] == 'true' ? 'never' : 'once', privileged: true do |sh| sh.inline = <<~SHELL #!/usr/bin/env bash set -eux -o pipefail @@ -58,7 +58,7 @@ EOF chown -R vagrant:vagrant /home/vagrant/.config SHELL end - test.vm.provision 'k3s-install', type: 'k3s', run: 'once' do |k3s| + test.vm.provision 'k3s-install', type: 'k3s', run: ENV['CI'] == 'true' ? 'never' : 'once' do |k3s| k3s.args = %w[server] k3s.env = %w[INSTALL_K3S_NAME=server INSTALL_K3S_SKIP_DOWNLOAD=true K3S_TOKEN=vagrant INSTALL_K3S_SKIP_ENABLE=true] k3s.config = { @@ -69,6 +69,9 @@ EOF } k3s.config_mode = '0644' # side-step https://github.com/k3s-io/k3s/issues/4321 end + test.vm.provision "k3s-start", type: "shell", run: ENV['CI'] == 'true' ? 'never' : 'once' do |sh| + sh.inline = "systemctl start k3s-server" + end test.vm.provision "k3s-ready", type: "shell", run: ENV['CI'] == 'true' ? 'never' : 'once' do |sh| sh.env = { :PATH => "/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin",