Skip to content

Commit 025a15b

Browse files
author
Bryan Latten
committed
Newrelic: Alpine fixes and CI tweak
1 parent c82ee7b commit 025a15b

File tree

3 files changed

+15
-19
lines changed

3 files changed

+15
-19
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,38 +10,32 @@ jobs:
1010
strategy:
1111
matrix:
1212
variant:
13-
- 7.4
14-
- 7.4-alpine
15-
- 8.0
13+
- "7.4"
14+
- "7.4-alpine"
15+
- "8.0"
1616
platform:
1717
- linux/amd64
1818
- linux/arm64
1919
exclude:
2020
- variant: 7.4-alpine
2121
- platform: linux/arm64
2222
env:
23-
TEST_MATCH: PHP Version ${{ matrix.props.version }}
23+
TEST_MATCH: PHP Version ${{ matrix.variant }}
2424
steps:
2525
-
2626
name: Checkout
2727
uses: actions/checkout@v2
2828
-
2929
name: Detect host configuration
3030
run: |
31-
# NOTE: Docker host configuration determines the networking target for integration testing
32-
v=$(mount | grep "/run/docker.sock")
3331
TARGET_HOST=
34-
35-
if [[ -n "$v" ]]; then
36-
echo "Injected docker socket detected"
32+
if [[ -n "$ACT" ]]; then
33+
echo "Local execution detected"
3734
TARGET_HOST="host.docker.internal"
38-
elif [[ -S /var/run/docker.sock ]]; then
39-
echo "Local docker socket detected"
40-
TARGET_HOST="localhost"
4135
else
42-
echo "No docker socket detected, falling back"
4336
TARGET_HOST="localhost"
44-
fi
37+
fi;
38+
4539
echo "TARGET_HOST=${TARGET_HOST}" >> $GITHUB_ENV
4640
-
4741
# Build and execute in multiple configurations: vanilla, with env overrides, with TLS enabled

scripts/install-newrelic-alpine.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ mkdir -p /var/log/newrelic
4646
chmod 777 /var/log/newrelic
4747
cp agent/scripts/newrelic.ini.template "${CONF_PHPMODS}"/newrelic.ini
4848

49+
# Delete compilation directories, no longer needed
50+
go clean --cache
51+
rm -rf /root/newrelic-php-agent
52+
4953
# Cleanup script-specific packages
5054
apk del .newrelic_deps
51-
52-
# Delete compilation directory, no longer needed
53-
rm -rf /root/newrelic-php-agent

scripts/install-newrelic-ubuntu.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ mkdir -p /var/log/newrelic
3636
chmod 777 /var/log/newrelic
3737
cp agent/scripts/newrelic.ini.template "${CONF_PHPMODS}"/newrelic.ini
3838

39-
# Delete compilation directory, no longer needed
39+
# Delete compilation directories, no longer needed
40+
go clean --cache
4041
rm -rf /root/newrelic-php-agent
41-
rm -rf /root/.cache/go-build
42+

0 commit comments

Comments
 (0)