-
Notifications
You must be signed in to change notification settings - Fork 598
49 lines (49 loc) · 1.72 KB
/
integration-test.yaml
File metadata and controls
49 lines (49 loc) · 1.72 KB
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
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
java-autoinstrumentation:
env:
KUBECONFIG: /tmp/kube-config
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: make our image
run: VERSION=dev make container
- name: make java autoinstrumentation image
run: |
cd autoinstrumentation/java && docker build -t java-autoinstrumentation:dev --build-arg version=$(cat version.txt) .
- name: Create kind cluster
uses: helm/kind-action@v1.11.0
with:
cluster_name: kind
node_image: kindest/node:v1.27.3
- name: Deploy certificate signing request
run: kubectl apply -f tests/integration/certs.yaml
- name: Approve our certificate signing request
run: kubectl certificate approve operator
- name: register our image
run: |
img=$(docker images | grep operator | awk '{print $1":"$2}')
docker tag $img manager:dev
kind load docker-image manager:dev --name kind
kind load docker-image java-autoinstrumentation:dev --name kind
- name: Deploy collector
run: kubectl apply -f tests/integration/collector.yaml
- name: Deploy operator
run: kubectl apply -f tests/integration/operator.yaml
- name: Sleep 10s
run: sleep 10
- name: Deploy java app
run: kubectl apply -f tests/integration/java.yaml
- name: Sleep 20s
run: sleep 20
- name: Check logs
run: |
COLLECTOR_POD=$(kubectl get pod -l app=collector -o jsonpath="{.items[0].metadata.name}")
LOGS=$(kubectl logs ${COLLECTOR_POD})
echo ${LOGS}
echo ${LOGS} | grep "Starting Servlet engine"