Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit b0717a0

Browse files
authored
Use community php docker images. Test against nts and zts (#94)
* Use community php docker images. Test against nts and zts * Use non-rc 7.2 * Fetch the expected installer signature
1 parent a385a0c commit b0717a0

2 files changed

Lines changed: 29 additions & 8 deletions

File tree

Dockerfile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ RUN mkdir -p /build && \
2323
gcc \
2424
libc-dev \
2525
make \
26-
autoconf
26+
autoconf \
27+
git \
28+
unzip
2729

2830
COPY . /build/
2931

@@ -41,7 +43,14 @@ RUN phpize && \
4143

4244
WORKDIR /build
4345

44-
RUN composer install && \
46+
RUN EXPECTED_SIGNATURE=$(curl -f https://composer.github.io/installer.sig) && \
47+
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
48+
ACTUAL_SIGNATURE=$(php -r "echo (hash_file('SHA384', 'composer-setup.php'));") && \
49+
test $EXPECTED_SIGNATURE = $ACTUAL_SIGNATURE && \
50+
php composer-setup.php && \
51+
php -r "unlink('composer-setup.php');"
52+
53+
RUN php composer.phar install && \
4554
vendor/bin/phpcs --standard=./phpcs-ruleset.xml && \
4655
vendor/bin/phpunit && \
4756
php -d extension=opencensus.so vendor/bin/phpunit

cloudbuild.yaml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
11
# This cloudbuild.yaml is used to test the php extension against multiple versions of php
22
steps:
33
- name: gcr.io/cloud-builders/docker
4-
args: ['build', '--build-arg', 'BASE_IMAGE=gcr.io/google-appengine/php71', '.']
4+
args: ['build', '--build-arg', 'BASE_IMAGE=php:7.1', '.']
55
waitFor: ['-']
6-
id: php71
6+
id: php71-nts
77
- name: gcr.io/cloud-builders/docker
8-
args: ['build', '--build-arg', 'BASE_IMAGE=gcr.io/google-appengine/php70', '.']
8+
args: ['build', '--build-arg', 'BASE_IMAGE=php:7.1-zts', '.']
99
waitFor: ['-']
10-
id: php70
10+
id: php71-zts
1111
- name: gcr.io/cloud-builders/docker
12-
args: ['build', '--build-arg', 'BASE_IMAGE=gcr.io/google-appengine/php72', '.']
12+
args: ['build', '--build-arg', 'BASE_IMAGE=php:7.0', '.']
1313
waitFor: ['-']
14-
id: php72
14+
id: php70-nts
15+
- name: gcr.io/cloud-builders/docker
16+
args: ['build', '--build-arg', 'BASE_IMAGE=php:7.0-zts', '.']
17+
waitFor: ['-']
18+
id: php70-zts
19+
- name: gcr.io/cloud-builders/docker
20+
args: ['build', '--build-arg', 'BASE_IMAGE=php:7.2', '.']
21+
waitFor: ['-']
22+
id: php72-nts
23+
- name: gcr.io/cloud-builders/docker
24+
args: ['build', '--build-arg', 'BASE_IMAGE=php:7.2-zts', '.']
25+
waitFor: ['-']
26+
id: php72-zts
1527
- name: gcr.io/cloud-builders/docker
1628
args: ['build', '--build-arg', 'BASE_IMAGE=gcr.io/php-stackdriver/php71-32bit', '.']
1729
waitFor: ['-']

0 commit comments

Comments
 (0)