Regression Testing Operator Integration #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
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" | |
bash test/operator/match_and_execute.sh "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 ./resources/kubernetes/operator/helm/values.yaml --version 0.3.0" | |
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 |