Skip to content

feat: remove php 8.0, add php 8.3 #383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 1 addition & 2 deletions php/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ The images for individual versions of PHP are available at `gcr.io/cloud-devrel-
You can try them out by running:

```sh
$ docker run --rm -it gcr.io/cloud-devrel-kokoro-resources/php74
$ docker run --rm -it gcr.io/cloud-devrel-kokoro-resources/php80
$ docker run --rm -it gcr.io/cloud-devrel-kokoro-resources/php81
$ docker run --rm -it gcr.io/cloud-devrel-kokoro-resources/php82
$ docker run --rm -it gcr.io/cloud-devrel-kokoro-resources/php83
```

An image containing all [supported versions][php-version-support] of PHP is available
Expand Down
27 changes: 14 additions & 13 deletions php/cloudbuild-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,6 @@ options:
machineType: 'E2_HIGHCPU_8'
steps:

# PHP 8.0
- id: 'build-php80'
name: gcr.io/cloud-builders/docker
args:
['build', '-t', 'gcr.io/cloud-devrel-kokoro-resources/php80', '-t', 'gcr.io/cloud-devrel-public-resources/php80', '.']
dir: 'php/php80'
waitFor: ['-']

- name: gcr.io/gcp-runtimes/structure_test
args:
['-i', 'gcr.io/cloud-devrel-kokoro-resources/php80', '--config', '/workspace/php/php80.yaml', '-v']
waitFor: ['build-php80']

# PHP 8.1
- id: 'build-php81'
name: gcr.io/cloud-builders/docker
Expand All @@ -57,3 +44,17 @@ steps:
args:
['-i', 'gcr.io/cloud-devrel-kokoro-resources/php82', '--config', '/workspace/php/php82.yaml', '-v']
waitFor: ['build-php82']

# PHP 8.0
- id: 'build-php83'
name: gcr.io/cloud-builders/docker
args:
['build', '-t', 'gcr.io/cloud-devrel-kokoro-resources/php83', '-t', 'gcr.io/cloud-devrel-public-resources/php83', '.']
dir: 'php/php83'
waitFor: ['-']

- name: gcr.io/gcp-runtimes/structure_test
args:
['-i', 'gcr.io/cloud-devrel-kokoro-resources/php83', '--config', '/workspace/php/php83.yaml', '-v']
waitFor: ['build-php83']

30 changes: 15 additions & 15 deletions php/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,6 @@ options:
machineType: 'E2_HIGHCPU_8'
steps:

# PHP 8.0
- id: 'build-php80'
name: gcr.io/cloud-builders/docker
args:
['build', '-t', 'gcr.io/cloud-devrel-kokoro-resources/php80', '-t', 'gcr.io/cloud-devrel-public-resources/php80', '.']
dir: 'php/php80'
waitFor: ['-']

- name: gcr.io/gcp-runtimes/structure_test
args:
['-i', 'gcr.io/cloud-devrel-kokoro-resources/php80', '--config', '/workspace/php/php80.yaml', '-v']
waitFor: ['build-php80']

# PHP 8.1
- id: 'build-php81'
name: gcr.io/cloud-builders/docker
Expand All @@ -58,10 +45,23 @@ steps:
['-i', 'gcr.io/cloud-devrel-kokoro-resources/php82', '--config', '/workspace/php/php82.yaml', '-v']
waitFor: ['build-php82']

# PHP 8.0
- id: 'build-php83'
name: gcr.io/cloud-builders/docker
args:
['build', '-t', 'gcr.io/cloud-devrel-kokoro-resources/php83', '-t', 'gcr.io/cloud-devrel-public-resources/php83', '.']
dir: 'php/php83'
waitFor: ['-']

- name: gcr.io/gcp-runtimes/structure_test
args:
['-i', 'gcr.io/cloud-devrel-kokoro-resources/php83', '--config', '/workspace/php/php83.yaml', '-v']
waitFor: ['build-php83']

images:
- gcr.io/cloud-devrel-kokoro-resources/php80
- gcr.io/cloud-devrel-public-resources/php80
- gcr.io/cloud-devrel-kokoro-resources/php81
- gcr.io/cloud-devrel-public-resources/php81
- gcr.io/cloud-devrel-kokoro-resources/php82
- gcr.io/cloud-devrel-public-resources/php82
- gcr.io/cloud-devrel-kokoro-resources/php83
- gcr.io/cloud-devrel-public-resources/php83
2 changes: 1 addition & 1 deletion php/php82/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM gcr.io/gcp-runtimes/ubuntu_20_0_4
ENV PHP_DIR=/opt/php82
ENV PHP_SRC_DIR=/usr/local/src/php80-build
ENV PHP_SRC_DIR=/usr/local/src/php82-build

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this correct before?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just the same of the env var (PHP_SRC_DIR) for the PHP source, so basically PHP 8.2 was being sourced in a directory called php80. It's not a functional problem, but I didn't like it, so I changed it.

ENV PATH=${PATH}:/usr/local/bin:${PHP_DIR}/bin
ENV PHP_VERISON=8.2.6

Expand Down
2 changes: 1 addition & 1 deletion php/php80.yaml → php/php83.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ schemaVersion: 1.0.0
commandTests:
- name: "version"
command: ["php", "-version"]
expectedOutput: ["PHP 8.0"]
expectedOutput: ["PHP 8.3"]
- name: "required php extentions"
command: ["php", "-m"]
expectedOutput: ["grpc"]
Expand Down
6 changes: 3 additions & 3 deletions php/php80/Dockerfile → php/php83/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM gcr.io/gcp-runtimes/ubuntu_20_0_4
ENV PHP_DIR=/opt/php80
ENV PHP_SRC_DIR=/usr/local/src/php80-build
ENV PHP_DIR=/opt/php83
ENV PHP_SRC_DIR=/usr/local/src/php83-build
ENV PATH=${PATH}:/usr/local/bin:${PHP_DIR}/bin
ENV PHP_VERISON=8.0.28
ENV PHP_VERISON=8.3.7

RUN apt-get update && \
apt-get -y install \
Expand Down