Skip to content

Commit

Permalink
Merge pull request #221 from docksal/feature/php80
Browse files Browse the repository at this point in the history
PHP 8.0 image
  • Loading branch information
lmakarov authored May 14, 2021
2 parents d647887 + d4c4ac3 commit 95b23f6
Show file tree
Hide file tree
Showing 30 changed files with 1,280 additions and 85 deletions.
45 changes: 32 additions & 13 deletions .github/workflows/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ defaults:
env:
IMAGE: docksal/cli
UPSTREAM_IMAGE: debian
LATEST_VERSION: 7.3
LATEST_VERSION: '7.3'
DOCKSAL_VERSION: develop

jobs:
Expand All @@ -33,19 +33,27 @@ jobs:
-
platform: linux/amd64
arch: amd64
version: 7.3
version: '7.3'
-
platform: linux/amd64
arch: amd64
version: 7.4
version: '7.4'
-
platform: linux/amd64
arch: amd64
version: '8.0'
-
platform: linux/arm64
arch: arm64
version: 7.3
version: '7.3'
-
platform: linux/arm64
arch: arm64
version: 7.4
version: '7.4'
-
platform: linux/arm64
arch: arm64
version: '8.0'

env:
ARCH: ${{ matrix.arch }}
Expand Down Expand Up @@ -113,19 +121,27 @@ jobs:
-
platform: linux/amd64
arch: amd64
version: 7.3
version: '7.3'
-
platform: linux/amd64
arch: amd64
version: 7.4
version: '7.4'
-
platform: linux/amd64
arch: amd64
version: '8.0'
-
platform: linux/arm64
arch: arm64
version: '7.3'
-
platform: linux/arm64
arch: arm64
version: 7.3
version: '7.4'
-
platform: linux/arm64
arch: arm64
version: 7.4
version: '8.0'

env:
ARCH: ${{ matrix.arch }}
Expand All @@ -137,7 +153,7 @@ jobs:
name: Setup Bats
uses: mig4/setup-bats@v1
with:
bats-version: 1.3.0
bats-version: '1.3.0'
-
name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -173,7 +189,9 @@ jobs:
SECRET_PLATFORMSH_CLI_TOKEN: ${{ secrets.SECRET_PLATFORMSH_CLI_TOKEN }}
SECRET_TERMINUS_TOKEN: ${{ secrets.SECRET_TERMINUS_TOKEN }}
# Run tests and set output status (used by downstream jobs)
run: make test && echo "::set-output name=status::pass" || echo "::set-output name=status::fail"
run: |
make test
[[ $? == 0 ]] && "::set-output name=status::pass" || echo "::set-output name=status::fail"
-
# Print image info
name: Docker image info
Expand All @@ -194,8 +212,9 @@ jobs:
strategy:
matrix:
version:
- 7.3
- 7.4
- '7.3'
- '7.4'
- '8.0'
env:
VERSION_PREFIX: php
VERSION: ${{ matrix.version }}
Expand Down
19 changes: 1 addition & 18 deletions 7.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,6 @@ RUN set -xe; \
USER docker
SHELL ["/bin/bash", "-c"]

# PHP tools (installed as user)
# Note: DRUSH_BACKDROP_VERSION should be pinned at 1.2.0 as 1.3.0 introduces changes that break regular drush 8.
ENV \
MG_CODEGEN_VERSION=1.11.2 \
DRUSH_BACKDROP_VERSION=1.2.0
# Don't use -x here, as the output may be excessive
RUN set -e; \
\
Expand All @@ -342,20 +337,8 @@ $HOME/.composer/vendor/wp-coding-standards/wpcs/,\
$HOME/.composer/vendor/phpcompatibility/php-compatibility/PHPCompatibility/,\
$HOME/.composer/vendor/phpcompatibility/phpcompatibility-wp/PHPCompatibilityWP,\
$HOME/.composer/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieRandomCompat; \
# Install cgr to use it in-place of `composer global require` for misc globally installed cli tools.
# See https://pantheon.io/blog/fixing-composer-global-command
composer global require consolidation/cgr >/dev/null; \
# Magento2 Code Generator
# Cannot be properly installed and used as a phar binary
# See https://github.com/staempfli/magento2-code-generator/issues/11
cgr staempfli/magento2-code-generator:${MG_CODEGEN_VERSION} >/dev/null; \
# Cleanup
composer clear-cache; \
\
# Drush modules
drush dl registry_rebuild --default-major=7 --destination=$HOME/.drush >/dev/null; \
mkdir $HOME/.drush/backdrop && curl -fsSL "https://github.com/backdrop-contrib/backdrop-drush-extension/archive/${DRUSH_BACKDROP_VERSION}.tar.gz" | tar xz -C $HOME/.drush/backdrop --strip-components 1; \
drush cc drush
composer clear-cache

# Node.js (installed as user)
ENV \
Expand Down
2 changes: 1 addition & 1 deletion 7.4/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tests
.dockerignore
Dockerfile
Makefile
php-modules.txt
19 changes: 1 addition & 18 deletions 7.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,6 @@ RUN set -xe; \
USER docker
SHELL ["/bin/bash", "-c"]

# PHP tools (installed as user)
# Note: DRUSH_BACKDROP_VERSION should be pinned at 1.2.0 as 1.3.0 introduces changes that break regular drush 8.
ENV \
MG_CODEGEN_VERSION=1.11.2 \
DRUSH_BACKDROP_VERSION=1.2.0
# Don't use -x here, as the output may be excessive
RUN set -e; \
\
Expand All @@ -342,20 +337,8 @@ $HOME/.composer/vendor/wp-coding-standards/wpcs/,\
$HOME/.composer/vendor/phpcompatibility/php-compatibility/PHPCompatibility/,\
$HOME/.composer/vendor/phpcompatibility/phpcompatibility-wp/PHPCompatibilityWP,\
$HOME/.composer/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieRandomCompat; \
# Install cgr to use it in-place of `composer global require` for misc globally installed cli tools.
# See https://pantheon.io/blog/fixing-composer-global-command
composer global require consolidation/cgr >/dev/null; \
# Magento2 Code Generator
# Cannot be properly installed and used as a phar binary
# See https://github.com/staempfli/magento2-code-generator/issues/11
cgr staempfli/magento2-code-generator:${MG_CODEGEN_VERSION} >/dev/null; \
# Cleanup
composer clear-cache; \
\
# Drush modules
drush dl registry_rebuild --default-major=7 --destination=$HOME/.drush >/dev/null; \
mkdir $HOME/.drush/backdrop && curl -fsSL "https://github.com/backdrop-contrib/backdrop-drush-extension/archive/${DRUSH_BACKDROP_VERSION}.tar.gz" | tar xz -C $HOME/.drush/backdrop --strip-components 1; \
drush cc drush
composer clear-cache

# Node.js (installed as user)
ENV \
Expand Down
4 changes: 4 additions & 0 deletions 8.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tests
.dockerignore
Dockerfile
Makefile
Loading

0 comments on commit 95b23f6

Please sign in to comment.