-
Notifications
You must be signed in to change notification settings - Fork 21
66 lines (56 loc) · 2.53 KB
/
operator-regression.yml
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
65
66
name: Regression Testing Operator Integration
on:
workflow_dispatch:
env:
AGENT_TESTS: python nodejs java
#go dotnet --- both pending
permissions:
contents: read
jobs:
integration-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create Kind cluster and local Docker registry
run:
bash test/operator/kind-with-registry.sh
- name: Create Test Images
run: |
for t in ${AGENT_TESTS[@]}
do
echo "Creating image for $t"
docker build -t $t-test-app test/operator/$t
docker tag $t-test-app localhost:5001/registry/$t-test-app
docker push localhost:5001/registry/$t-test-app
done
- name: Set up Helm
uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0
with:
version: v3.11.2
- name: Install Operator
run: |
bash test/operator/match_and_execute.sh "kubectl create namespace opentelemetry-operator-system"
bash test/operator/match_and_execute.sh "helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts"
helm repo update
bash test/operator/match_and_execute.sh "helm upgrade --install --namespace opentelemetry-operator-system opentelemetry-kube-stack open-telemetry/opentelemetry-kube-stack --values 'https://raw.githubusercontent.com/elastic/opentelemetry/refs/heads/8.16/resources/kubernetes/operator/helm/values.yaml' --version 0.3.3"
bash test/operator/wait_for_pod_start.sh opentelemetry-operator-system opentelemetry-operator 2/2 1
kubectl get pods -A
- name: Start And Test Collector Skeleton
run: |
echo "Nothing here yet"
- name: Start Test Images
run: |
kubectl create namespace banana
for t in ${AGENT_TESTS[@]}
do
if [ "x$t" = "xgo" ]; then CONTAINER_READY="2/2"; else CONTAINER_READY="1/1"; fi
AGENT_START_GREP=`grep -A1 AGENT_HAS_STARTED_IF_YOU_SEE test/operator/$t/test-app.yaml | perl -ne '/value:\s*"(.*)"/ && print "$1\n"'`
echo "Starting pod for $t"
kubectl create -f test/operator/$t/test-app.yaml
bash test/operator/wait_for_pod_start.sh banana $t-test-app $CONTAINER_READY 1
bash test/operator/wait_for_agent_start.sh banana $t-test-app "$AGENT_START_GREP"
kubectl delete -f test/operator/$t/test-app.yaml
done