Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
fix(dockerimage): php7.4 image should php 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
byteplow committed Sep 8, 2021
1 parent 0858f79 commit e40c062
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions ci/ci-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ variables:

CHECK_PHP_VERSION:
description: "Test if the image was build with the correct php version."
value: "false"
value: "true"

PHP_VERSION:
description: "Php version to use."
Expand Down Expand Up @@ -155,4 +155,4 @@ variables:

COMPOSER_LOCK_REWRITE:
description: "Rewrite composer lock to pull packages from cache."
value: "true"
value: "true"
4 changes: 2 additions & 2 deletions ci/dockerimage/base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ RUN apk add --no-cache --simulate --repository http://nl.alpinelinux.org/alpine/
${ALPINE_PHP_PACKAGE}-json \
${ALPINE_PHP_PACKAGE}-phar \
| sha256sum >> /cachehash
RUN if [ ${ALPINE_PHP_PACKAGE} == php7 ]; then \
RUN if [ ${ALPINE_PHP_PACKAGE} == php7 ] && [ ${ALPINE_PHP_REPOSITORY_BRANCH} == v3.12 ]; then \
apk add --no-cache --simulate --repository http://dl-cdn.alpinelinux.org/alpine/v3.10/community \
php7-pecl-redis=4.3.0-r2 | sha256sum >> /cachehash; \
else \
Expand Down Expand Up @@ -108,7 +108,7 @@ RUN apk add --no-cache --repository http://nl.alpinelinux.org/alpine/${ALPINE_PH
${ALPINE_PHP_PACKAGE}-posix \
${ALPINE_PHP_PACKAGE}-json \
${ALPINE_PHP_PACKAGE}-phar
RUN if [ ${ALPINE_PHP_PACKAGE} == php7 ]; then \
RUN if [ ${ALPINE_PHP_PACKAGE} == php7 ] && [ ${ALPINE_PHP_REPOSITORY_BRANCH} == v3.12 ]; then \
apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/v3.10/community php7-pecl-redis=4.3.0-r2; \
else \
apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/${ALPINE_PHP_REPOSITORY_BRANCH}/${ALPINE_PHP_REPOSITORY_REPOSITORY} \
Expand Down
6 changes: 3 additions & 3 deletions ci/dockerimage/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,12 @@ function make_image() {
case "${php_version}" in
7.3)
alpine_php_repository_branch=v3.12
alpine_php_repository_repository=main
alpine_php_repository_repository=community
alpine_php_package=php7
;;
7.4)
alpine_php_repository_branch=edge
alpine_php_repository_repository=main
alpine_php_repository_branch=v3.14
alpine_php_repository_repository=community
alpine_php_package=php7
;;
8.0)
Expand Down
5 changes: 3 additions & 2 deletions ci/gitlab-ci/test_jobs.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
"check php version":
extends: .abstract_jobs.copy_source
stage: test
variables:
ARG_IMAGE: test-source
needs:
- docker_build_source
script:
- echo "PHP version shoud be ${PHP_VERSION}."
- echo "PHP version is $(php -r 'echo PHP_VERSION;')"
- "[[ $(php -r 'echo PHP_VERSION;') == $PHP_VERSION.* ]]"
- php -r "echo 'PHP version is'.PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;"
- php -r "if (version_compare(PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION, '${PHP_VERSION}', '!=')) exit(1);"
rules:
- if: $RUN_NO_TESTS == "true"
when: never
Expand Down

0 comments on commit e40c062

Please sign in to comment.