-
Notifications
You must be signed in to change notification settings - Fork 361
64 lines (59 loc) · 2.06 KB
/
podinfo-test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: PodInfo Integration Test
on:
pull_request:
types:
- opened
- synchronize
- reopened
paths-ignore:
- 'docs/**'
push:
branches:
- main
paths-ignore:
- 'docs/**'
jobs:
build:
runs-on: ubuntu-22.04
timeout-minutes: 40
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- 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 "sha=${SHA}" >> $GITHUB_OUTPUT
echo "operatorImage=quay.io/cilium/tetragon-operator-ci:${SHA}" >> $GITHUB_OUTPUT
- name: Install Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
# renovate: datasource=golang-version depName=go
go-version: '1.23.3'
- name: Install Kind and create cluster
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0
- 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 ${{ steps.vars.outputs.operatorImage }}
- name: Run go tests
run: |
helm upgrade --install tetragon ./install/kubernetes/tetragon -n kube-system \
--set tetragonOperator.podInfo.enabled=true \
--set tetragonOperator.image.override=${{ steps.vars.outputs.operatorImage }}
kubectl rollout status -n kube-system deployment/tetragon-operator
go test --tags=integration -v ./operator/...