Skip to content

Commit

Permalink
Add PHP extension for Redis
Browse files Browse the repository at this point in the history
  • Loading branch information
mremi committed Feb 3, 2017
1 parent 1cf0544 commit d8ee039
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ matrix:
- env: LANGUAGE=node VERSION=6.9 MODD_VERSION=0.4 NODE_VERSION=6.9.4
- env: LANGUAGE=node VERSION=7.4 MODD_VERSION=0.4 NODE_VERSION=7.4.0
- env: LANGUAGE=java VERSION=8 MODD_VERSION=0.4 JAVA_VERSION=8u121-1~webupd8~0
- env: LANGUAGE=php VERSION=5.6 MODD_VERSION=0.4 PHP_VERSION=5.6.30 PHP_BUILD_INSTALL_EXTENSION=apcu=4.0.11
- env: LANGUAGE=php VERSION=7.1 MODD_VERSION=0.4 PHP_VERSION=7.1.1 PHP_BUILD_INSTALL_EXTENSION=apcu=5.1.8
- env: LANGUAGE=php VERSION=5.6 MODD_VERSION=0.4 PHP_VERSION=5.6.30 PHP_BUILD_INSTALL_EXTENSION=apcu=4.0.11 REDIS_VERSION=3.1.1
- env: LANGUAGE=php VERSION=7.1 MODD_VERSION=0.4 PHP_VERSION=7.1.1 PHP_BUILD_INSTALL_EXTENSION=apcu=5.1.8 REDIS_VERSION=3.1.1
- env: LANGUAGE=aws VERSION=1
- env: LANGUAGE=dind-aws VERSION=1
- env: LANGUAGE=golang VERSION=1.7 MODD_VERSION=0.4 GLIDE_VERSION=v0.12.3
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Versions
2017-02-DEV
-----------

* Add PHP extension for Redis
* Add PHP version: 7.1.1
* Remove PHP version: 7.0.14
* Upgrade PHP version: 5.6.30
Expand Down
13 changes: 9 additions & 4 deletions php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ARG PHP_VERSION
ARG PHP_BUILD_INSTALL_EXTENSION
ARG CI_HELPER_VERSION
ARG MODD_VERSION
ARG REDIS_VERSION

RUN echo "Starting ..." && \
echo "deb-src http://httpredir.debian.org/debian jessie main" >> /etc/apt/sources.list && \
Expand All @@ -30,14 +31,14 @@ RUN echo "Starting ..." && \
echo "Done install CI Helper" && \

echo "Install Modd" && \
curl -sSL https://github.com/cortesi/modd/releases/download/v${MODD_VERSION}/modd-${MODD_VERSION}-linux64.tgz | tar -xOvzf - modd-${MODD_VERSION}-linux64/modd > /usr/bin/modd && \
curl -sSL https://github.com/cortesi/modd/releases/download/v${MODD_VERSION}/modd-${MODD_VERSION}-linux64.tgz | tar -xOvzf - modd-${MODD_VERSION}-linux64/modd > /usr/bin/modd && \
chmod 755 /usr/bin/modd && \
echo "Done Install Modd" && \

echo "Starting PHP" && \
export PHP_BUILD_INSTALL_EXTENSION=${PHP_BUILD_INSTALL_EXTENSION} && \
apt-get -qq -y build-dep php5-cli && \
cd /root && git clone https://github.com/CHH/phpenv.git && cd phpenv && ./bin/phpenv-install.sh && \
cd /root && git clone https://github.com/CHH/phpenv.git && cd phpenv && ./bin/phpenv-install.sh && \
cd /root && git clone git://github.com/php-build/php-build && cd php-build && ./install.sh && \

sed -i "/--enable-cgi/d" share/php-build/default_configure_options && \
Expand All @@ -54,11 +55,15 @@ RUN echo "Starting ..." && \
ln -s /root/.phpenv/versions/${PHP_VERSION} /root/.phpenv/versions/current && \

ls -lsah /root/.phpenv/versions/current/bin && \
curl -sSL https://getcomposer.org/download/${COMPOSER_VERSION}/composer.phar -o /usr/local/bin/composer && chmod a+x /usr/local/bin/composer && \
curl -sSL http://get.sensiolabs.org/php-cs-fixer.phar -o /usr/local/bin/php-cs-fixer && chmod a+x /usr/local/bin/php-cs-fixer && \
curl -sSL https://getcomposer.org/download/${COMPOSER_VERSION}/composer.phar -o /usr/local/bin/composer && chmod a+x /usr/local/bin/composer && \
curl -sSL http://get.sensiolabs.org/php-cs-fixer.phar -o /usr/local/bin/php-cs-fixer && chmod a+x /usr/local/bin/php-cs-fixer && \

echo "date.timezone=${PHP_TIMEZONE:-UTC}" > /root/.phpenv/versions/${PHP_VERSION}/etc/conf.d/date_timezone.ini && \

curl -sSL https://github.com/phpredis/phpredis/archive/${REDIS_VERSION}.tar.gz | tar xz -C /tmp && \
cd /tmp/phpredis-${REDIS_VERSION} && phpize && ./configure && make && make install && \
echo "extension=redis.so" > /root/.phpenv/versions/${PHP_VERSION}/etc/conf.d/redis.ini && \

echo "Done PHP!" && \

echo "Starting AWS" && \
Expand Down
2 changes: 1 addition & 1 deletion travis.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def run_command(command):
build_args = "--build-arg CI_HELPER_VERSION=%s" % ci_helper_version
run_args = "--rm"
if language == "php":
build_args = "%s --build-arg MODD_VERSION=%s --build-arg PHP_VERSION=%s --build-arg PHP_BUILD_INSTALL_EXTENSION=%s" % (build_args, os.environ.get("MODD_VERSION"), os.environ.get("PHP_VERSION"), os.environ.get("PHP_BUILD_INSTALL_EXTENSION"))
build_args = "%s --build-arg MODD_VERSION=%s --build-arg PHP_VERSION=%s --build-arg PHP_BUILD_INSTALL_EXTENSION=%s --build-arg REDIS_VERSION=%s" % (build_args, os.environ.get("MODD_VERSION"), os.environ.get("PHP_VERSION"), os.environ.get("PHP_BUILD_INSTALL_EXTENSION"), os.environ.get("REDIS_VERSION"))

if language == "java":
build_args = "%s --build-arg MODD_VERSION=%s --build-arg JAVA_VERSION=%s" % (build_args, os.environ.get("MODD_VERSION"), os.environ.get("JAVA_VERSION"))
Expand Down

0 comments on commit d8ee039

Please sign in to comment.