forked from elastic/apm-agent-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into feature/packages-…
…php-version-pipeline * upstream/master: [packaging] support centOS smoke testing (elastic#99)
- Loading branch information
Showing
4 changed files
with
40 additions
and
3 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM centos:centos7 | ||
ARG PHP_VERSION=7.2 | ||
ENV PHP_VERSION ${PHP_VERSION} | ||
## Package versioning for the PHP does not use . | ||
RUN export PHP_VERSION_TRANSFORMED=$(echo "${PHP_VERSION}" | sed 's#\.##g') \ | ||
&& yum install -y epel-release yum-utils \ | ||
&& rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm \ | ||
&& yum update -y \ | ||
&& yum-config-manager --enable remi-php${PHP_VERSION_TRANSFORMED} \ | ||
&& yum install -y php php-mbstring php-mysql php-xml | ||
|
||
RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/bin/composer | ||
|
||
COPY entrypoint.sh /bin | ||
WORKDIR /src | ||
|
||
ENTRYPOINT ["/bin/entrypoint.sh"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
set -xe | ||
|
||
## Install rpm package and configure the agent accordingly | ||
rpm -ivh build/packages/*.rpm | ||
|
||
## Verify if the elastic php agent is enabled | ||
if ! php -m | grep -q 'elastic' ; then | ||
echo 'Extension has not been installed.' | ||
exit 1 | ||
fi | ||
|
||
## Validate the installation works as expected with composer | ||
composer install | ||
composer run-script run_component_tests_standalone_envs |