Skip to content

tetra: LSM events compact print support #5

tetra: LSM events compact print support

tetra: LSM events compact print support #5

name: Tetragon e2e Test
on:
pull_request:
paths-ignore:
- 'docs/**'
push:
branches:
- main
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
clusterName: tetragon-ci
ciliumCliVersion: v0.15.0
jobs:
prepare:
runs-on: ubuntu-22.04
outputs:
packages: ${{ steps.set-packages.outputs.packages }}
agentImage: ${{ steps.vars.outputs.agentImage }}
operatorImage: ${{ steps.vars.outputs.operatorImage }}
steps:
- name: Checkout Code
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Install Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version-file: go.mod
- id: set-packages
name: Listing e2e tests packages
shell: bash
run: |
echo PACKAGES=$(make ls-e2e-test | jq -Rnc '[inputs | {"s": split("/")[-1], "f":.}]') | tee -a $GITHUB_STEP_SUMMARY | tee -a $GITHUB_OUTPUT
- name: Set Up Job Variables
id: vars
run: |
if [ ${{ github.event.issue.pull_request || github.event.pull_request }} ]; then
PR_API_JSON=$(curl \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
${{ github.event.issue.pull_request.url || github.event.pull_request.url }})
SHA=$(echo "$PR_API_JSON" | jq -r ".head.sha")
else
SHA=${{ github.sha }}
fi
echo "agentImage=quay.io/cilium/tetragon-ci:${SHA}" >> $GITHUB_OUTPUT
echo "operatorImage=quay.io/cilium/tetragon-operator-ci:${SHA}" >> $GITHUB_OUTPUT
- name: Wait Tetragon Images
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
with:
timeout_minutes: 2
max_attempts: 30
retry_wait_seconds: 30
warning_on_retry: false
command: |
set -e
docker pull ${{ steps.vars.outputs.agentImage }}
docker pull ${{ steps.vars.outputs.operatorImage }}
docker rmi ${{ steps.vars.outputs.agentImage }} ${{ steps.vars.outputs.operatorImage }}
run-e2e-test:
needs: prepare
runs-on: ${{ matrix.os }}
timeout-minutes: 20
name: ${{matrix.os}} / ${{ matrix.package.s }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04, actuated-arm64-4cpu-16gb ]
package: ${{fromJson(needs.prepare.outputs.packages)}}
steps:
- name: Checkout Code
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
path: go/src/github.com/cilium/tetragon/
- name: Install Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
# renovate: datasource=golang-version depName=go
go-version: '1.22.5'
- name: Install kubectl, kind and cilium CLI
uses: alexellis/arkade-get@master
with:
kubectl: latest
helm: v3.12.1
kind: v0.20.0
cilium: ${{ env.ciliumCliVersion }}
print-summary: false
- name: Pull Tetragon Images
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
with:
timeout_minutes: 2
max_attempts: 30
retry_wait_seconds: 30
warning_on_retry: false
command: |
set -e
docker pull ${{ needs.prepare.outputs.agentImage }}
docker pull ${{ needs.prepare.outputs.operatorImage }}
- name: Run e2e Tests
run: |
cd go/src/github.com/cilium/tetragon
make e2e-test E2E_TESTS=${{matrix.package.f}} E2E_BUILD_IMAGES=0 E2E_AGENT=${{ needs.prepare.outputs.agentImage }} E2E_OPERATOR=${{ needs.prepare.outputs.operatorImage }} EXTRA_TESTFLAGS="-cluster-name=${{ env.clusterName }} -args -v=4"
- name: Upload Tetragon Logs
if: failure() || cancelled()
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: tetragon-logs-${{ matrix.os }}-${{ matrix.package.s }}
path: /tmp/tetragon.e2e.*
retention-days: 5