Skip to content

Commit

Permalink
Newrelic: Alpine fixes and CI tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan Latten committed Dec 19, 2021
1 parent c82ee7b commit 025a15b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,32 @@ jobs:
strategy:
matrix:
variant:
- 7.4
- 7.4-alpine
- 8.0
- "7.4"
- "7.4-alpine"
- "8.0"
platform:
- linux/amd64
- linux/arm64
exclude:
- variant: 7.4-alpine
- platform: linux/arm64
env:
TEST_MATCH: PHP Version ${{ matrix.props.version }}
TEST_MATCH: PHP Version ${{ matrix.variant }}
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Detect host configuration
run: |
# NOTE: Docker host configuration determines the networking target for integration testing
v=$(mount | grep "/run/docker.sock")
TARGET_HOST=
if [[ -n "$v" ]]; then
echo "Injected docker socket detected"
if [[ -n "$ACT" ]]; then
echo "Local execution detected"
TARGET_HOST="host.docker.internal"
elif [[ -S /var/run/docker.sock ]]; then
echo "Local docker socket detected"
TARGET_HOST="localhost"
else
echo "No docker socket detected, falling back"
TARGET_HOST="localhost"
fi
fi;
echo "TARGET_HOST=${TARGET_HOST}" >> $GITHUB_ENV
-
# Build and execute in multiple configurations: vanilla, with env overrides, with TLS enabled
Expand Down
7 changes: 4 additions & 3 deletions scripts/install-newrelic-alpine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ mkdir -p /var/log/newrelic
chmod 777 /var/log/newrelic
cp agent/scripts/newrelic.ini.template "${CONF_PHPMODS}"/newrelic.ini

# Delete compilation directories, no longer needed
go clean --cache
rm -rf /root/newrelic-php-agent

# Cleanup script-specific packages
apk del .newrelic_deps

# Delete compilation directory, no longer needed
rm -rf /root/newrelic-php-agent
5 changes: 3 additions & 2 deletions scripts/install-newrelic-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ mkdir -p /var/log/newrelic
chmod 777 /var/log/newrelic
cp agent/scripts/newrelic.ini.template "${CONF_PHPMODS}"/newrelic.ini

# Delete compilation directory, no longer needed
# Delete compilation directories, no longer needed
go clean --cache
rm -rf /root/newrelic-php-agent
rm -rf /root/.cache/go-build

0 comments on commit 025a15b

Please sign in to comment.