Skip to content

Commit

Permalink
Fix PHP tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TimPansino committed Jun 12, 2024
1 parent 9372185 commit cbe2d68
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 19 deletions.
18 changes: 9 additions & 9 deletions src/php/php-agent-download.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
#!/bin/bash
#!/bin/sh

libc=$1
version=$2

if [ -z "$libc" ]; then
echo "'libc' argument not supplied. Defaulting to 'gnu'"
libc="gnu"
elif [[ ! $libc =~ ^(musl|gnu)$ ]]; then
if [[ -z "$libc" ]]; then
echo "'libc' argument not supplied. Defaulting to 'glibc'"
libc="glibc"
elif [[ "$libc" != "glibc" || "$libc" != "musl" ]]; then
echo "error: invalid 'libc' argument provided. Exiting."
exit 1
fi

if [ -z "$version" ]; then
latest=$(curl https://download.newrelic.com/php_agent/release/ | grep newrelic-php5 | cut -d '-' -f 3 | head -n 1)
if [[ -z "$version" ]]; then
latest=$(wget https://download.newrelic.com/php_agent/release/ -O - | grep newrelic-php5 | cut -d '-' -f 3 | head -n 1)
url="https://download.newrelic.com/php_agent/release/newrelic-php5-${latest}-linux"
else
url="https://download.newrelic.com/php_agent/archive/${version}/newrelic-php5-${version}-linux"
fi

if [ "$libc" = 'musl' ]; then
url+="-musl.tar.gz"
url="${url}-musl.tar.gz"
else
url+=".tar.gz"
url="${url}.tar.gz"
fi

# echo "url: $url"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,27 @@ spec:
annotations:
instrumentation.newrelic.com/inject-php: "true"
instrumentation.newrelic.com/php-exec-cmd: "apache2-foreground"
spec:
containers:
- name: test-app-php
image: e2e/test-app-php:e2e
imagePullPolicy: Never
ports:
- containerPort: 80
env:
spec:
containers:
- name: test-app-php
image: e2e/test-app-php:e2e
imagePullPolicy: Never
ports:
- containerPort: 80
env:
- name: NEW_RELIC_APP_NAME
value: k8s-e2e-test-app-php
- name: NEW_RELIC_LABELS
value: 'testkey:{{ .Values.scenarioTag | default "NOTSET" }}'
value: "testKey:{{ .Values.scenarioTag | default "NOTSET" }}"
---
apiVersion: v1
kind: Service
metadata:
name: test-app-php-service
spec:
type: NodePort
ports:
- port: 80
targetPort: 80
selector:
app: test-app-php
1 change: 1 addition & 0 deletions tests/php/chart/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
scenarioTag: ""
1 change: 0 additions & 1 deletion tests/php/chart/values.yml

This file was deleted.

0 comments on commit cbe2d68

Please sign in to comment.