Skip to content

Commit 4d90cae

Browse files
authored
Updates kokoro to use latest PHP versions (GoogleCloudPlatform#906)
1 parent d418d95 commit 4d90cae

File tree

6 files changed

+36
-30
lines changed

6 files changed

+36
-30
lines changed

.kokoro/docker/php73/Dockerfile

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ RUN apt-get update && \
88
autoconf \
99
build-essential \
1010
git-core \
11+
jq \
1112
libbz2-dev \
1213
libcurl4-openssl-dev \
1314
libc-client2007e \
@@ -26,8 +27,10 @@ RUN apt-get update && \
2627
libxml2-dev \
2728
libxslt1-dev \
2829
libzip-dev \
30+
python-ipaddr \
2931
wget \
30-
zip
32+
zip \
33+
zlib1g-dev
3134

3235
RUN wget -nv -O phpunit.phar https://phar.phpunit.de/phpunit-7.phar && \
3336
chmod +x phpunit.phar && \
@@ -96,3 +99,23 @@ RUN wget -nv -O phpunit.phar https://phar.phpunit.de/phpunit-7.phar && \
9699
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
97100
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;" && \
98101
php composer-setup.php --filename=composer --install-dir=/usr/local/bin
102+
103+
# Install Google Cloud SDK
104+
RUN curl https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz \
105+
-o ${HOME}/google-cloud-sdk.tar.gz \
106+
&& tar xzf ${HOME}/google-cloud-sdk.tar.gz -C $HOME \
107+
&& ${HOME}/google-cloud-sdk/install.sh \
108+
--usage-reporting false \
109+
--path-update false \
110+
--command-completion false
111+
112+
# Make composer and gcloud bins available via the PATH variable
113+
ENV PATH="$PATH:/opt/composer/vendor/bin:/root/google-cloud-sdk/bin"
114+
115+
# Configure Google Cloud SDK
116+
RUN gcloud config set app/promote_by_default false && \
117+
gcloud config set disable_prompts true && \
118+
gcloud -q components install app-engine-python && \
119+
gcloud -q components install app-engine-php && \
120+
gcloud -q components update
121+

.kokoro/php70.cfg

Lines changed: 0 additions & 17 deletions
This file was deleted.

.kokoro/php71.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ env_vars: {
99
# Give the docker image a unique project ID and credentials per PHP version
1010
env_vars: {
1111
key: "GOOGLE_ALT_PROJECT_ID"
12-
value: "php-docs-samples-php71"
12+
value: "php-docs-samples-kokoro1"
1313
}
1414
env_vars: {
1515
key: "GOOGLE_ALT_CREDENTIALS_FILENAME"
16-
value: "service-account-php71.json"
16+
value: "service-account-kokoro1.json"
1717
}

.kokoro/php72.cfg

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,9 @@ env_vars: {
99
# Give the docker image a unique project ID and credentials per PHP version
1010
env_vars: {
1111
key: "GOOGLE_ALT_PROJECT_ID"
12-
value: "php-docs-samples-php72"
12+
value: "php-docs-samples-kokoro2"
1313
}
1414
env_vars: {
1515
key: "GOOGLE_ALT_CREDENTIALS_FILENAME"
16-
value: "service-account-php72.json"
17-
}
18-
env_vars: {
19-
key: "RUN_CS_CHECK"
20-
value: "true"
16+
value: "service-account-kokoro2.json"
2117
}

.kokoro/php56.cfg renamed to .kokoro/php73.cfg

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,19 @@
33
# Configure the docker image for kokoro-trampoline.
44
env_vars: {
55
key: "TRAMPOLINE_IMAGE"
6-
value: "gcr.io/cloud-devrel-kokoro-resources/php56"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/php73"
77
}
88

99
# Give the docker image a unique project ID and credentials per PHP version
1010
env_vars: {
1111
key: "GOOGLE_ALT_PROJECT_ID"
12-
value: "php-docs-samples-php56"
12+
value: "php-docs-samples-kokoro3"
1313
}
1414
env_vars: {
1515
key: "GOOGLE_ALT_CREDENTIALS_FILENAME"
16-
value: "service-account-php56.json"
16+
value: "service-account-kokoro3.json"
17+
}
18+
env_vars: {
19+
key: "RUN_CS_CHECK"
20+
value: "true"
1721
}

testing/RUN_ALL_TESTS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Modify this file with whitespace in a PR in order to run all tests for the PR.
22
# See "testing/run_test_suite.sh" for more details.
3-
#
3+
#

0 commit comments

Comments
 (0)