constellation/.github/actions/e2e_sonobuoy/action.yml
Paul Meyer 2e73e0aa18
deps: update sonobuoy (#1330)
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
2023-03-03 12:02:49 +01:00

57 lines
1.7 KiB
YAML

name: sonobuoy
description: "Execute the e2e test framework sonobuoy."
inputs:
cloudProvider:
description: "CSP name necessary for artifact naming."
required: true
sonobuoyTestSuiteCmd:
description: "Which tests should be run?"
kubeconfig:
description: "The kubeconfig of the cluster to test."
required: true
runs:
using: "composite"
steps:
- name: Install sonobuoy
shell: bash
env:
SONOBUOY_VER: "0.56.16"
run: |
HOSTOS="$(go env GOOS)"
HOSTARCH="$(go env GOARCH)"
curl -fsSLO https://github.com/vmware-tanzu/sonobuoy/releases/download/v${SONOBUOY_VER}/sonobuoy_${SONOBUOY_VER}_${HOSTOS}_${HOSTARCH}.tar.gz
tar -xzf sonobuoy_${SONOBUOY_VER}_${HOSTOS}_${HOSTARCH}.tar.gz
install sonobuoy /usr/local/bin
- name: Sonobuoy version
shell: bash
run: sonobuoy version
- name: Run e2e test
shell: bash
env:
KUBECONFIG: ${{ inputs.kubeconfig }}
run: sonobuoy run --wait=300 ${{ inputs.sonobuoyTestSuiteCmd }} --kubeconfig constellation-admin.conf
- name: Download results
shell: bash
env:
KUBECONFIG: ${{ inputs.kubeconfig }}
run: sonobuoy retrieve --kubeconfig constellation-admin.conf
- name: Upload test results
if: always() && !env.ACT
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: "sonobuoy_logs_${{ inputs.cloudProvider}}.tar.gz"
path: "*_sonobuoy_*.tar.gz"
- name: Publish test results
if: (!env.ACT)
uses: mikepenz/action-junit-report@4604e7ac662394db76b6ccf33d40069c8f84c5da # v3.7.4
with:
report_paths: "**/junit_01.xml"
fail_on_failure: true