|
| 1 | +name: falco-analyzed-e2e |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + |
| 6 | +env: |
| 7 | + MISE_VERBOSE: 1 |
| 8 | + |
| 9 | +jobs: |
| 10 | + run-e2e: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + outputs: |
| 13 | + falco_result: ${{ steps.falco_result.outcome }} |
| 14 | + steps: |
| 15 | + - name: start falco |
| 16 | + continue-on-error: true |
| 17 | + uses: falcosecurity/falco-actions/start@4a4ff48cca452b3b03f06073d1ae0ff564503fc9 |
| 18 | + with: |
| 19 | + mode: analyze |
| 20 | + |
| 21 | + - name: checkout repository |
| 22 | + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 23 | + with: |
| 24 | + fetch-depth: 0 |
| 25 | + |
| 26 | + - name: setup golang |
| 27 | + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 |
| 28 | + with: |
| 29 | + go-version-file: go.mod |
| 30 | + |
| 31 | + - name: build docker image |
| 32 | + env: |
| 33 | + IMG: kong-operator |
| 34 | + TAG: e2e-${{ github.sha }} |
| 35 | + run: make docker.build |
| 36 | + |
| 37 | + - uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0 |
| 38 | + with: |
| 39 | + install: false |
| 40 | + |
| 41 | + - name: run e2e tests |
| 42 | + run: make test.e2e |
| 43 | + env: |
| 44 | + KONG_TEST_KONG_OPERATOR_IMAGE_LOAD: kong-operator:e2e-${{ github.sha }} |
| 45 | + GOTESTSUM_JUNITFILE: "e2e-tests.xml" |
| 46 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 47 | + |
| 48 | + - name: upload diagnostics |
| 49 | + if: always() |
| 50 | + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 |
| 51 | + with: |
| 52 | + name: diagnostics-e2e |
| 53 | + path: /tmp/ktf-diag* |
| 54 | + if-no-files-found: ignore |
| 55 | + |
| 56 | + - name: stop falco and upload results |
| 57 | + id: falco_result |
| 58 | + continue-on-error: true |
| 59 | + uses: falcosecurity/falco-actions/stop@4a4ff48cca452b3b03f06073d1ae0ff564503fc9 |
| 60 | + with: |
| 61 | + mode: analyze |
| 62 | + |
| 63 | + analyze_falco_results: |
| 64 | + name: Analyze Falco Results |
| 65 | + runs-on: ubuntu-latest |
| 66 | + timeout-minutes: 30 |
| 67 | + needs: run-e2e |
| 68 | + if: contains(needs.run-e2e.result, 'success') && needs.run-e2e.outputs.falco_result == 'success' |
| 69 | + permissions: |
| 70 | + contents: read |
| 71 | + actions: read |
| 72 | + steps: |
| 73 | + - name: Checkout Source Code |
| 74 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 75 | + |
| 76 | + - name: Analyze Falco Results |
| 77 | + uses: falcosecurity/falco-actions/analyze@4a4ff48cca452b3b03f06073d1ae0ff564503fc9 |
| 78 | + continue-on-error: true |
0 commit comments