fix php5.6 workspace aerospike travis-ci build failed. (#1738)

This commit is contained in:
Shao Yu-Lung (Allen) 2018-07-31 22:38:02 +08:00 committed by GitHub
parent 8180804ae0
commit 1b865dd153
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 7 deletions

View File

@ -336,6 +336,8 @@ AEROSPIKE_INFO_PORT=3003
# for all versions "https://github.com/aerospike/aerospike-client-php/archive/master.tar.gz"
# for php 7.2 (using this branch until the support for 7.2 on master) "https://github.com/aerospike/aerospike-client-php/archive/7.2.0-release-candidate.tar.gz"
AEROSPIKE_PHP_REPOSITORY=https://github.com/aerospike/aerospike-client-php/archive/7.2.0-release-candidate.tar.gz
# for php 5.6
# AEROSPIKE_PHP_REPOSITORY=https://github.com/aerospike/aerospike-client-php5/archive/3.4.15.tar.gz
### RETHINKDB #############################################
@ -406,4 +408,4 @@ MONGO_WEBUI_INSTALL_MONGO=false
### METABASE ###############################################
METABASE_PORT=3030
METABASE_DB_FILE=metabase.db
METABASE_JAVA_TIMEZONE=US/Pacific
METABASE_JAVA_TIMEZONE=US/Pacific

View File

@ -15,6 +15,10 @@ if [ -n "${PHP_VERSION}" ]; then
sed -i -- "s/PHP_VERSION=.*/PHP_VERSION=${PHP_VERSION}/g" .env
sed -i -- 's/=false/=true/g' .env
sed -i -- 's/PHPDBG=true/PHPDBG=false/g' .env
if [ "${PHP_VERSION}" == "5.6" ]; then
sed -i -- 's/^AEROSPIKE_PHP_REPOSITORY=/##AEROSPIKE_PHP_REPOSITORY=/g' .env
sed -i -- 's/^# AEROSPIKE_PHP_REPOSITORY=/AEROSPIKE_PHP_REPOSITORY=/g' .env
fi
cat .env
docker-compose build ${BUILD_SERVICE}
docker images

View File

@ -493,12 +493,22 @@ RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \
curl -L -o /tmp/aerospike-client-php.tar.gz ${AEROSPIKE_PHP_REPOSITORY} \
&& mkdir -p aerospike-client-php \
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
&& ( \
cd aerospike-client-php/src \
&& phpize \
&& ./build.sh \
&& make install \
) \
&& \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
( \
cd aerospike-client-php/src/aerospike \
&& phpize \
&& ./build.sh \
&& make install \
) \
else \
( \
cd aerospike-client-php/src \
&& phpize \
&& ./build.sh \
&& make install \
) \
fi \
&& rm /tmp/aerospike-client-php.tar.gz \
&& echo 'extension=aerospike.so' >> /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/aerospike.ini \
&& echo 'aerospike.udf.lua_system_path=/usr/local/aerospike/lua' >> /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/aerospike.ini \