diff options
author | Stanley Cheung <stanley.cheung@gmail.com> | 2015-12-10 05:38:36 +0800 |
---|---|---|
committer | Stanley Cheung <stanley.cheung@gmail.com> | 2015-12-10 05:38:36 +0800 |
commit | 3ca448925ba3df03ef872ac127b5e70ccd35c1af (patch) | |
tree | 19902d4e635b8c35d9c914c1d97dd7e9931d2508 | |
parent | 467a02af58c4e65818ab1b526cbf505fd67c3322 (diff) | |
parent | 1c8c7ee7455d014214be2db36ddd906102a18704 (diff) |
Merge pull request #4371 from jtattermusch/php_docker_flake
Try to prevent PHP interop flake
-rw-r--r-- | tools/jenkins/grpc_interop_php/Dockerfile | 14 | ||||
-rwxr-xr-x | tools/jenkins/grpc_interop_php/build_interop.sh | 10 |
2 files changed, 15 insertions, 9 deletions
diff --git a/tools/jenkins/grpc_interop_php/Dockerfile b/tools/jenkins/grpc_interop_php/Dockerfile index 09da713691..492d20cdb5 100644 --- a/tools/jenkins/grpc_interop_php/Dockerfile +++ b/tools/jenkins/grpc_interop_php/Dockerfile @@ -100,5 +100,19 @@ RUN /bin/bash -l -c "rvm all do gem install ronn rake" RUN curl -sS https://getcomposer.org/installer | php RUN mv composer.phar /usr/local/bin/composer +# Download the patched PHP protobuf so that PHP gRPC clients can be generated +# from proto3 schemas. +RUN git clone https://github.com/stanley-cheung/Protobuf-PHP.git /var/local/git/protobuf-php + +RUN /bin/bash -l -c "rvm use ruby-2.1 \ + && cd /var/local/git/protobuf-php \ + && rvm all do rake pear:package version=1.0 \ + && pear install Protobuf-1.0.tgz" + +# As an attempt to work around #4212, try to prefetch Protobuf-PHP dependency +# into composer cache to prevent "composer install" from cloning on each build. +RUN git clone --mirror https://github.com/stanley-cheung/Protobuf-PHP.git \ + /root/.composer/cache/vcs/git-github.com-stanley-cheung-Protobuf-PHP.git/ + # Define the default command. CMD ["bash"] diff --git a/tools/jenkins/grpc_interop_php/build_interop.sh b/tools/jenkins/grpc_interop_php/build_interop.sh index cd9d67804a..87262f1d62 100755 --- a/tools/jenkins/grpc_interop_php/build_interop.sh +++ b/tools/jenkins/grpc_interop_php/build_interop.sh @@ -29,7 +29,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # Builds PHP interop server and client in a base image. -set -e +set -ex mkdir -p /var/local/git git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc @@ -45,18 +45,10 @@ make install-certs # gRPC core and protobuf need to be installed make install -# Download the patched PHP protobuf so that PHP gRPC clients can be generated -# from proto3 schemas. -git clone https://github.com/stanley-cheung/Protobuf-PHP.git /var/local/git/protobuf-php - (cd src/php/ext/grpc && phpize && ./configure && make) (cd third_party/protobuf && make install) -(cd /var/local/git/protobuf-php \ - && rvm all do rake pear:package version=1.0 \ - && pear install Protobuf-1.0.tgz) - (cd src/php && composer install) (cd src/php && protoc-gen-php -i tests/interop/ -o tests/interop/ tests/interop/test.proto) |