diff --git a/.github/actions/sonobuoy/action.yml b/.github/actions/sonobuoy/action.yml index 2f3f42b9a..32f587b1b 100644 --- a/.github/actions/sonobuoy/action.yml +++ b/.github/actions/sonobuoy/action.yml @@ -2,40 +2,40 @@ name: sonobuoy description: "Executed the e2e test framework sonobuoy." inputs: sonobuoyVersion: - description: 'Version of sonobuoy test CLI to use.' - default: '0.56.4' + description: "Version of sonobuoy test CLI to use." + default: "0.56.4" required: true sonobuoyTestSuiteCmd: - description: 'Which tests should be run?' + description: "Which tests should be run?" required: true runs: - using: 'composite' + using: "composite" steps: - - name: Install sonobuoy - run: | - curl -LO https://github.com/vmware-tanzu/sonobuoy/releases/download/v${{ inputs.sonobuoyVersion }}/sonobuoy_${{ inputs.sonobuoyVersion }}_linux_amd64.tar.gz - tar -xzf sonobuoy_${{ inputs.sonobuoyVersion }}_linux_amd64.tar.gz - install sonobuoy /usr/local/bin - shell: bash - - name: Sonobuoy version - run: sonobuoy version - shell: bash + - name: Install sonobuoy + run: | + curl -LO https://github.com/vmware-tanzu/sonobuoy/releases/download/v${{ inputs.sonobuoyVersion }}/sonobuoy_${{ inputs.sonobuoyVersion }}_linux_amd64.tar.gz + tar -xzf sonobuoy_${{ inputs.sonobuoyVersion }}_linux_amd64.tar.gz + install sonobuoy /usr/local/bin + shell: bash + - name: Sonobuoy version + run: sonobuoy version + shell: bash - - name: Run quick e2e test - run: sonobuoy run --wait 300 ${{ inputs.sonobuoyTestSuiteCmd }} --kubeconfig constellation-admin.conf - shell: bash - - name: Download results - run: sonobuoy retrieve -x --kubeconfig constellation-admin.conf - shell: bash - - name: Upload test results - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 - with: - name: 'junit_01.xml' - path: '**/junit_01.xml' - if: ${{ always() && !env.ACT }} - - name: Publish test results - uses: mikepenz/action-junit-report@1b47bb811362f3d8d753fc148cb7a13ec9e55570 - if: ${{ !env.ACT }} - with: - report_paths: '**/junit_01.xml' - fail_on_failure: true + - name: Run quick e2e test + run: sonobuoy run --wait=300 ${{ inputs.sonobuoyTestSuiteCmd }} --kubeconfig constellation-admin.conf + shell: bash + - name: Download results + run: sonobuoy retrieve -x --kubeconfig constellation-admin.conf + shell: bash + - name: Upload test results + uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 + with: + name: "junit_01.xml" + path: "**/junit_01.xml" + if: ${{ always() && !env.ACT }} + - name: Publish test results + uses: mikepenz/action-junit-report@1b47bb811362f3d8d753fc148cb7a13ec9e55570 + if: ${{ !env.ACT }} + with: + report_paths: "**/junit_01.xml" + fail_on_failure: true diff --git a/image/dm-verity/recalculate-dm-verity.sh b/image/dm-verity/recalculate-dm-verity.sh index ecaa3c189..23cbe72b9 100755 --- a/image/dm-verity/recalculate-dm-verity.sh +++ b/image/dm-verity/recalculate-dm-verity.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -euo pipefail +set -xeuo pipefail # Show progress on pipes if `pv` is installed # Otherwise use plain cat @@ -14,11 +14,6 @@ mount_partition () { local partition_file=$1 local mountpoint=$2 - # use guestmount if possible - if command -v guestmount &> /dev/null && guestmount -a "${partition_file}" -m /dev/sda "${mountpoint}"; then - return - fi - # second, try to mount as current user if mount -o loop "${partition_file}" "${mountpoint}"; then return @@ -31,13 +26,9 @@ mount_partition () { } umount_partition () { + sync local mountpoint=$1 - # use guestunmount if possible - if command -v guestunmount &> /dev/null && guestunmount "${mountpoint}"; then - return - fi - # second, try to umount as current user if umount "${mountpoint}"; then return diff --git a/image/runner/cloud-init.txt b/image/runner/cloud-init.txt index 74a8792b9..052aa82b6 100644 --- a/image/runner/cloud-init.txt +++ b/image/runner/cloud-init.txt @@ -18,6 +18,7 @@ packages: - lsb-release - jq - pv + - sed runcmd: - [sudo, chmod, "+r", "/boot/vmlinuz*"] diff --git a/image/runner/google-cloud-function.py b/image/runner/google-cloud-function.py index 87febf5ee..8a15f607f 100644 --- a/image/runner/google-cloud-function.py +++ b/image/runner/google-cloud-function.py @@ -85,7 +85,7 @@ def create_instance( zone: str = 'us-central1-c', instance_name: str = 'coreos-builder', machine_type: str = "n2-highmem-4", - source_image: str = "projects/ubuntu-os-cloud/global/images/ubuntu-2110-impish-v20220118", + source_image: str = "projects/ubuntu-os-cloud/global/images/family/ubuntu-2004-lts", network_name: str = "global/networks/default", disk_size_gb: int = 64, enable_nested_virtualization: bool = True,