2021-11-15 18:50:38 +00:00
|
|
|
name: Install Script
|
2021-10-29 16:47:37 +00:00
|
|
|
on:
|
|
|
|
push:
|
2021-11-15 18:50:38 +00:00
|
|
|
branches: [main, master]
|
2021-10-29 16:47:37 +00:00
|
|
|
paths:
|
2021-11-15 18:50:38 +00:00
|
|
|
- "channel.yaml"
|
2021-10-29 16:47:37 +00:00
|
|
|
- "install.sh"
|
2022-03-15 17:29:56 +00:00
|
|
|
- "tests/install/**"
|
2023-01-27 17:01:13 +00:00
|
|
|
- ".github/workflows/install.yaml"
|
|
|
|
|
2021-10-29 16:47:37 +00:00
|
|
|
pull_request:
|
2021-11-15 18:50:38 +00:00
|
|
|
branches: [main, master]
|
2021-10-29 16:47:37 +00:00
|
|
|
paths:
|
|
|
|
- "install.sh"
|
2022-03-15 17:29:56 +00:00
|
|
|
- "tests/install/**"
|
2023-01-27 17:01:13 +00:00
|
|
|
- ".github/workflows/install.yaml"
|
2021-10-29 16:47:37 +00:00
|
|
|
workflow_dispatch: {}
|
2023-01-12 21:57:57 +00:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2021-10-29 16:47:37 +00:00
|
|
|
jobs:
|
2022-08-26 16:36:50 +00:00
|
|
|
build:
|
2023-01-27 17:01:13 +00:00
|
|
|
uses: ./.github/workflows/build-k3s.yaml
|
2021-11-15 18:50:38 +00:00
|
|
|
test:
|
|
|
|
name: "Smoke Test"
|
2022-08-26 16:36:50 +00:00
|
|
|
needs: build
|
2022-08-04 03:11:17 +00:00
|
|
|
runs-on: macos-12
|
2021-10-29 16:47:37 +00:00
|
|
|
timeout-minutes: 40
|
2021-11-15 18:50:38 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2023-01-27 17:01:13 +00:00
|
|
|
vm: [centos-7, rocky-8, fedora, opensuse-leap, ubuntu-focal]
|
2021-11-15 18:50:38 +00:00
|
|
|
max-parallel: 2
|
|
|
|
defaults:
|
|
|
|
run:
|
2022-03-15 17:29:56 +00:00
|
|
|
working-directory: tests/install/${{ matrix.vm }}
|
2021-11-15 18:50:38 +00:00
|
|
|
env:
|
2022-09-13 18:18:27 +00:00
|
|
|
INSTALL_K3S_SKIP_DOWNLOAD: binary
|
2021-10-29 16:47:37 +00:00
|
|
|
steps:
|
|
|
|
- name: "Checkout"
|
2022-12-02 17:07:21 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-11-15 18:50:38 +00:00
|
|
|
with: {fetch-depth: 1}
|
|
|
|
- name: "Vagrant Cache"
|
2022-11-21 20:58:50 +00:00
|
|
|
uses: actions/cache@v3
|
2021-10-29 16:47:37 +00:00
|
|
|
with:
|
2021-11-15 18:50:38 +00:00
|
|
|
path: |
|
|
|
|
~/.vagrant.d/boxes
|
|
|
|
~/.vagrant.d/gems
|
2022-03-15 17:29:56 +00:00
|
|
|
key: install-${{ hashFiles(format('tests/install/{0}/Vagrantfile', matrix.vm)) }}
|
2021-11-15 18:50:38 +00:00
|
|
|
id: vagrant-cache
|
|
|
|
continue-on-error: true
|
|
|
|
- name: "Vagrant Plugin(s)"
|
2022-08-26 16:36:50 +00:00
|
|
|
run: vagrant plugin install vagrant-k3s vagrant-reload vagrant-scp
|
|
|
|
- name: "Download k3s binary"
|
2023-01-17 19:04:34 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2022-08-26 16:36:50 +00:00
|
|
|
with:
|
|
|
|
name: k3s
|
|
|
|
path: tests/install/${{ matrix.vm }}
|
|
|
|
- name: "Vagrant Up"
|
|
|
|
run: vagrant up --no-provision
|
|
|
|
- name: "Upload k3s binary"
|
|
|
|
run: |
|
|
|
|
chmod +x k3s
|
|
|
|
vagrant scp k3s /tmp/k3s
|
|
|
|
vagrant ssh -c "sudo mv /tmp/k3s /usr/local/bin/k3s"
|
|
|
|
vagrant provision --provision-with=k3s-upload
|
|
|
|
- name: "⏩ Install K3s"
|
|
|
|
run: |
|
|
|
|
vagrant provision --provision-with=k3s-prepare
|
|
|
|
vagrant provision --provision-with=k3s-install
|
|
|
|
if [ ${{ matrix.vm }} = 'opensuse-microos' ]; then vagrant reload --no-provision; fi
|
2021-11-15 18:50:38 +00:00
|
|
|
- name: "⏳ Node"
|
|
|
|
run: vagrant provision --provision-with=k3s-wait-for-node
|
|
|
|
- name: "⏳ CoreDNS"
|
|
|
|
run: vagrant provision --provision-with=k3s-wait-for-coredns
|
|
|
|
- name: "⏳ Local Storage"
|
|
|
|
run: vagrant provision --provision-with=k3s-wait-for-local-storage
|
|
|
|
continue-on-error: true
|
|
|
|
- name: "⏳ Metrics Server"
|
|
|
|
run: vagrant provision --provision-with=k3s-wait-for-metrics-server
|
|
|
|
continue-on-error: true
|
|
|
|
- name: "⏳ Traefik"
|
|
|
|
run: vagrant provision --provision-with=k3s-wait-for-traefik
|
|
|
|
continue-on-error: true
|
|
|
|
- name: "k3s-status"
|
|
|
|
run: vagrant provision --provision-with=k3s-status
|
|
|
|
- name: "k3s-procps"
|
|
|
|
run: vagrant provision --provision-with=k3s-procps
|