2022-05-03 05:15:53 -04:00
|
|
|
name: sonobuoy
|
|
|
|
description: "Executed the e2e test framework sonobuoy."
|
2022-10-24 12:47:03 -04:00
|
|
|
|
2022-05-03 05:15:53 -04:00
|
|
|
inputs:
|
|
|
|
sonobuoyVersion:
|
2022-08-02 09:34:17 -04:00
|
|
|
description: "Version of sonobuoy test CLI to use."
|
2022-09-14 10:12:28 -04:00
|
|
|
default: "0.56.10"
|
2022-05-03 05:15:53 -04:00
|
|
|
required: true
|
|
|
|
sonobuoyTestSuiteCmd:
|
2022-08-02 09:34:17 -04:00
|
|
|
description: "Which tests should be run?"
|
2022-10-24 12:47:03 -04:00
|
|
|
kubeconfig:
|
|
|
|
description: "The kubeconfig of the cluster to test."
|
2022-05-03 05:15:53 -04:00
|
|
|
required: true
|
2022-10-24 12:47:03 -04:00
|
|
|
|
2022-05-03 05:15:53 -04:00
|
|
|
runs:
|
2022-08-02 09:34:17 -04:00
|
|
|
using: "composite"
|
2022-05-03 05:15:53 -04:00
|
|
|
steps:
|
2022-08-02 09:34:17 -04:00
|
|
|
- name: Install sonobuoy
|
2022-10-24 12:47:03 -04:00
|
|
|
shell: bash
|
2022-08-02 09:34:17 -04:00
|
|
|
run: |
|
2022-09-14 10:30:13 -04:00
|
|
|
HOSTOS="$(go env GOOS)"
|
|
|
|
HOSTARCH="$(go env GOARCH)"
|
|
|
|
curl -sLO https://github.com/vmware-tanzu/sonobuoy/releases/download/v${{ inputs.sonobuoyVersion }}/sonobuoy_${{ inputs.sonobuoyVersion }}_${HOSTOS}_${HOSTARCH}.tar.gz
|
|
|
|
tar -xzf sonobuoy_${{ inputs.sonobuoyVersion }}_${HOSTOS}_${HOSTARCH}.tar.gz
|
2022-08-02 09:34:17 -04:00
|
|
|
install sonobuoy /usr/local/bin
|
2022-10-24 12:47:03 -04:00
|
|
|
|
2022-08-02 09:34:17 -04:00
|
|
|
- name: Sonobuoy version
|
|
|
|
run: sonobuoy version
|
|
|
|
shell: bash
|
2022-05-03 05:15:53 -04:00
|
|
|
|
2022-08-02 09:34:17 -04:00
|
|
|
- name: Run quick e2e test
|
|
|
|
shell: bash
|
2022-10-24 12:47:03 -04:00
|
|
|
env:
|
|
|
|
KUBECONFIG: ${{ inputs.kubeconfig }}
|
|
|
|
run: sonobuoy run --wait=300 ${{ inputs.sonobuoyTestSuiteCmd }} --kubeconfig constellation-admin.conf
|
|
|
|
|
2022-08-02 09:34:17 -04:00
|
|
|
- name: Download results
|
|
|
|
shell: bash
|
2022-10-24 12:47:03 -04:00
|
|
|
env:
|
|
|
|
KUBECONFIG: ${{ inputs.kubeconfig }}
|
|
|
|
run: sonobuoy retrieve -x --kubeconfig constellation-admin.conf
|
|
|
|
|
2022-08-02 09:34:17 -04:00
|
|
|
- name: Upload test results
|
2022-10-24 12:47:03 -04:00
|
|
|
if: ${{ always() && !env.ACT }}
|
2022-10-26 09:48:35 -04:00
|
|
|
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=v3.1.1
|
2022-08-02 09:34:17 -04:00
|
|
|
with:
|
|
|
|
name: "junit_01.xml"
|
|
|
|
path: "**/junit_01.xml"
|
2022-10-24 12:47:03 -04:00
|
|
|
|
2022-08-02 09:34:17 -04:00
|
|
|
- name: Publish test results
|
|
|
|
if: ${{ !env.ACT }}
|
2022-10-24 12:47:03 -04:00
|
|
|
uses: mikepenz/action-junit-report@ab07dd7abefd456d92ecbeb22f81392fafe3d528 # tag=v3.5.2
|
2022-08-02 09:34:17 -04:00
|
|
|
with:
|
|
|
|
report_paths: "**/junit_01.xml"
|
|
|
|
fail_on_failure: true
|