Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 132 additions & 0 deletions .kokoro/docker/php74/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
FROM gcr.io/gcp-runtimes/ubuntu_16_0_4
ENV PHP_DIR=/opt/php74
ENV PHP_SRC_DIR=/usr/local/src/php74-build
ENV PATH=${PATH}:/usr/local/bin:${PHP_DIR}/bin

RUN apt-get update && \
apt-get -y install \
autoconf \
build-essential \
git-core \
jq \
libbz2-dev \
libcurl4-openssl-dev \
libc-client2007e \
libc-client2007e-dev \
libfcgi-dev \
libfcgi0ldbl \
libfreetype6-dev \
libicu-dev \
libjpeg62-dbg \
libjpeg-dev \
libkrb5-dev \
libmcrypt-dev \
libpng12-dev \
libpq-dev \
libssl-dev \
libxml2-dev \
libxslt1-dev \
libzip-dev \
python-ipaddr \
wget \
zip \
zlib1g-dev \
pkg-config \
sqlite3 \
libsqlite3-dev \
libonig-dev \
php-pear

RUN ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a && \
mkdir -p ${PHP_DIR} ${PHP_SRC_DIR} ${PHP_DIR}/lib/conf.d && \
cd ${PHP_SRC_DIR} && \
wget http://us1.php.net/get/php-7.4.0.tar.bz2/from/this/mirror \
-O php-7.4.0.tar.bz2 && \
tar jxf php-7.4.0.tar.bz2 && \
cd php-7.4.0 && \
./configure \
--prefix=${PHP_DIR} \
--with-config-file-scan-dir=${PHP_DIR}/lib/conf.d \
--with-pdo-pgsql \
--with-zlib-dir \
--with-freetype-dir \
--enable-mbstring \
--with-libxml-dir=/usr \
--enable-soap \
--enable-intl \
--enable-calendar \
--with-curl \
--with-mcrypt \
--with-zlib \
--with-gd \
--with-pgsql \
--disable-rpath \
--enable-inline-optimization \
--with-bz2 \
--with-zlib \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-sysvmsg \
--enable-pcntl \
--enable-mbregex \
--enable-exif \
--enable-bcmath \
--with-mhash \
--enable-zip \
--with-pcre-regex \
--with-mysql \
--with-pdo-mysql \
--with-mysqli \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--enable-gd-native-ttf \
--with-openssl \
--with-fpm-user=www-data \
--with-fpm-group=www-data \
--with-libdir=/lib/x86_64-linux-gnu \
--enable-ftp \
--with-imap \
--with-imap-ssl \
--with-gettext \
--with-xmlrpc \
--with-xsl \
--with-zip \
--with-kerberos \
--enable-fpm && \
make && \
make install && \
pecl install grpc && \
cp php.ini-production ${PHP_DIR}/lib/php.ini && \
echo 'zend_extension=opcache.so' >> ${PHP_DIR}/lib/php.ini && \
echo 'extension=grpc.so' >> ${PHP_DIR}/lib/conf.d/ext-grpc.ini && \
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
php -r "if (hash_file('SHA384', 'composer-setup.php') === rtrim(file_get_contents('https://composer.github.io/installer.sig'))) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
php composer-setup.php --filename=composer --install-dir=/usr/local/bin

# Remove old version of PHP
RUN apt purge -y php7.0-common

# Install phpunit globally
RUN composer global require phpunit/phpunit:^7.0

# Install Google Cloud SDK
RUN curl https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz \
-o ${HOME}/google-cloud-sdk.tar.gz \
&& tar xzf ${HOME}/google-cloud-sdk.tar.gz -C $HOME \
&& ${HOME}/google-cloud-sdk/install.sh \
--usage-reporting false \
--path-update false \
--command-completion false

# Make composer and gcloud bins available via the PATH variable
ENV PATH="$PATH:/root/.composer/vendor/bin:/root/google-cloud-sdk/bin"

# Configure Google Cloud SDK
RUN gcloud config set app/promote_by_default false && \
gcloud config set disable_prompts true && \
gcloud -q components install app-engine-python && \
gcloud -q components update

# Build php-cs-fixer
RUN composer global require friendsofphp/php-cs-fixer
4 changes: 0 additions & 4 deletions .kokoro/php73.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,3 @@ env_vars: {
key: "GOOGLE_ALT_CREDENTIALS_FILENAME"
value: "service-account-kokoro3.json"
}
env_vars: {
key: "RUN_CS_CHECK"
value: "true"
}
6 changes: 5 additions & 1 deletion .kokoro/php71.cfg → .kokoro/php74.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/php71"
value: "gcr.io/cloud-devrel-kokoro-resources/php74"
}

# Give the docker image a unique project ID and credentials per PHP version
Expand All @@ -15,3 +15,7 @@ env_vars: {
key: "GOOGLE_ALT_CREDENTIALS_FILENAME"
value: "service-account-kokoro1.json"
}
env_vars: {
key: "RUN_CS_CHECK"
value: "true"
}
1 change: 0 additions & 1 deletion appengine/flexible/helloworld/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"require": {
"php": "5.6.*|7.0.*|7.1.*|7.2.*|7.3.*",
"silex/silex": "^2.3"
},
"require-dev": {
Expand Down