Skip to content

Commit

Permalink
Fix issues with CI
Browse files Browse the repository at this point in the history
  • Loading branch information
TimPansino committed May 14, 2024
1 parent dc06cb2 commit dcb90d3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ on:
- published

env:
INITCONTAINER_LANGUAGE: ${{ env.INITCONTAINER_LANGUAGE }}
INITCONTAINER_LANGUAGE: python

jobs:
test:
Expand All @@ -56,12 +56,11 @@ jobs:
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager.yaml
kubectl wait --for=condition=Ready --namespace cert-manager --all pods
- name: Deploy newrelic-agent-operator to minikube
- name: Deploy New Relic k8s-agents-operator to minikube
run: |
kubectl create namespace newrelic
helm repo add newrelic-agent-operator https://newrelic-experimental.github.io/newrelic-agent-operator
helm upgrade --install newrelic-agent-operator newrelic-agent-operator/newrelic-agent-operator --set licenseKey=${{ secrets.K8S_AGENTS_E2E_LICENSE_KEY }} -n newrelic
kubectl wait --for=condition=Ready --namespace newrelic --all pods
helm repo add k8s-agents-operator https://newrelic.github.io/k8s-agents-operator
helm upgrade --install k8s-agents-operator k8s-agents-operator/k8s-agents-operator --namespace k8s-agents-operator --create-namespace
kubectl wait --for=condition=Ready --namespace k8s-agents-operator --all pods
- name: Build init container
run: |
Expand All @@ -76,9 +75,9 @@ jobs:
- name: Deploy test app to minikube
run: |
kubectl create namespace test-${{ env.INITCONTAINER_LANGUAGE }}
kubectl create secret generic newrelic-key-secret -n test-python --from-literal=new_relic_license_key=$NEW_RELIC_LICENSE_KEY
kubectl apply -f tests/${{ env.INITCONTAINER_LANGUAGE }}/customresource.yaml -n test-${{ env.INITCONTAINER_LANGUAGE }}
kubectl apply -f tests/${{ env.INITCONTAINER_LANGUAGE }}/test_app_deployment.yaml -n test-${{ env.INITCONTAINER_LANGUAGE }}
sleep 5
kubectl wait --for=condition=Ready --namespace test-${{ env.INITCONTAINER_LANGUAGE }} --all pods
- name: Test
Expand Down
8 changes: 3 additions & 5 deletions tests/python/customresource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ metadata:
spec:
python:
image: e2e/initcontainer-python:e2e
# Configure agent for testing using environment variables
env:
# Put the agent in developer mode so it doesn't try to connect to the real collector.
- name: NEW_RELIC_DEVELOPER_MODE
value: "true"
- name: NEW_RELIC_STARTUP_TIMEOUT
value: "30"

# TODO: Remove these hacks
- name: NEW_RELIC_STARTUP_DEBUG
value: "true"

# TODO: Remove these hacks
- name: NEW_RELIC_K8S_OPERATOR_ENABLED
value: "true"
4 changes: 2 additions & 2 deletions tests/python/test_app_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
- containerPort: 8000
env:
- name: NEW_RELIC_APP_NAME
value: "k8s-e2e-test-app-${SCENARIO_TAG:-0}"
value: k8s-e2e-test-app-python
---
apiVersion: v1
kind: Service
Expand All @@ -35,4 +35,4 @@ spec:
- port: 8000
targetPort: 8000
selector:
app: test-app-python
app: test-app-python

0 comments on commit dcb90d3

Please sign in to comment.