diff --git a/.github/workflows/presubmit.yaml b/.github/workflows/builders.yaml similarity index 63% rename from .github/workflows/presubmit.yaml rename to .github/workflows/builders.yaml index 4504124b..4be4e174 100644 --- a/.github/workflows/presubmit.yaml +++ b/.github/workflows/builders.yaml @@ -1,32 +1,11 @@ -name: presubmit-pr-check -description: Presubmit Pull Request Verification +name: builders +# Presubmit build and deploy from sources tests on: pull_request: - branches: [ main ] jobs: - shellcheck: - runs-on: ubuntu-latest - steps: - - name: Check out MicroShift upstream repository - uses: actions/checkout@v4 - - - name: Run ShellCheck - run: | - make _shellcheck - - hadolint: - runs-on: ubuntu-latest - steps: - - name: Check out MicroShift upstream repository - uses: actions/checkout@v4 - - - name: Run Hadolint - run: | - make _hadolint - - centos9-bootc-test: + centos9-bootc: runs-on: ubuntu-latest steps: - name: Check out MicroShift upstream repository @@ -45,7 +24,7 @@ jobs: bootc-image-tag: stream9 build: bootc-image - centos10-bootc-test: + centos10-bootc: runs-on: ubuntu-latest steps: - name: Check out MicroShift upstream repository @@ -64,7 +43,7 @@ jobs: bootc-image-tag: stream10 build: bootc-image - fedora-bootc-test: + fedora-bootc: runs-on: ubuntu-latest steps: - name: Check out MicroShift upstream repository @@ -83,7 +62,7 @@ jobs: bootc-image-tag: latest build: bootc-image - isolated-network-kindnet-test: + isolated-network-kindnet: runs-on: ubuntu-latest steps: - name: Check out MicroShift upstream repository @@ -102,7 +81,7 @@ jobs: ovnk-networking: 0 build: bootc-image - isolated-network-ovnk-test: + isolated-network-ovnk: runs-on: ubuntu-latest steps: - name: Check out MicroShift upstream repository @@ -120,36 +99,3 @@ jobs: isolated-network: 1 ovnk-networking: 1 build: bootc-image - - quick-start-and-clean: - runs-on: ubuntu-latest - steps: - - name: Check out MicroShift upstream repository - uses: actions/checkout@v4 - - - name: Run the quick start script - shell: bash - run: | - set -x - cat ./src/quickstart.sh | sudo bash -x - - # Wait until the MicroShift service is ready and healthy - make run-ready - make run-healthy - - - name: Run the quick clean script - shell: bash - run: | - set -x - cat ./src/quickclean.sh | sudo bash -x - - # Verify the container and its image are removed - sudo podman ps -a | grep microshift-okd && exit 1 - sudo podman images | grep microshift-okd && exit 1 - - # Verify the LVM volume group and backing storage are removed - sudo vgs | grep myvg1 && exit 1 - if [ -e /var/lib/microshift-okd ]; then - ls -la /var/lib/microshift-okd/ - exit 1 - fi diff --git a/.github/workflows/installers.yaml b/.github/workflows/installers.yaml new file mode 100644 index 00000000..6919bfa9 --- /dev/null +++ b/.github/workflows/installers.yaml @@ -0,0 +1,39 @@ +name: installers +# Presubmit prebuilt packages tests. + +on: + pull_request: + +jobs: + quick-start-and-clean: + runs-on: ubuntu-latest + steps: + - name: Check out MicroShift upstream repository + uses: actions/checkout@v4 + + - name: Run the quick start script + shell: bash + run: | + set -xeuo pipefail + sudo bash -xeuo pipefail < ./src/quickstart.sh + + # Wait until the MicroShift service is ready and healthy + make run-ready + make run-healthy + + - name: Run the quick clean script + shell: bash + run: | + set -xeuo pipefail + sudo bash -xeuo pipefail < ./src/quickstart.sh + + # Verify the container and its image are removed + sudo podman ps -a | grep microshift-okd && exit 1 + sudo podman images | grep microshift-okd && exit 1 + + # Verify the LVM volume group and backing storage are removed + sudo vgs | grep myvg1 && exit 1 + if [ -e /var/lib/microshift-okd ]; then + ls -la /var/lib/microshift-okd/ + exit 1 + fi diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml new file mode 100644 index 00000000..169c3ec0 --- /dev/null +++ b/.github/workflows/linters.yaml @@ -0,0 +1,26 @@ +name: linters +# Presubmit static checks and linting + +on: + pull_request: + +jobs: + shellcheck: + runs-on: ubuntu-latest + steps: + - name: Check out MicroShift upstream repository + uses: actions/checkout@v4 + + - name: Run ShellCheck + run: | + make _shellcheck + + hadolint: + runs-on: ubuntu-latest + steps: + - name: Check out MicroShift upstream repository + uses: actions/checkout@v4 + + - name: Run Hadolint + run: | + make _hadolint diff --git a/src/quickstart.sh b/src/quickstart.sh index 808bd141..f566bcaf 100755 --- a/src/quickstart.sh +++ b/src/quickstart.sh @@ -68,10 +68,6 @@ function run_bootc_image() { fi sleep 1 done - - # Update kubeconfig in the container user home directory - podman exec microshift-okd /bin/mkdir -p /root/.kube - podman exec microshift-okd /bin/cp "${kubeconfig}" /root/.kube/config } # Check if the script is running as root