From 6c03253313ce79e920b82daa73318b101a0bcb85 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 27 Mar 2022 04:10:32 +0200 Subject: [PATCH 01/23] Changed default server versions to have arm64 support --- .github/workflows/test-versions.yml | 41 ++------- CHANGELOG.md | 9 ++ README.md | 20 ++--- docker-compose.yml | 41 +-------- docs/configuration-files/env-file.rst | 117 ++++++++++---------------- env-example | 115 +++++++++++-------------- 6 files changed, 121 insertions(+), 222 deletions(-) diff --git a/.github/workflows/test-versions.yml b/.github/workflows/test-versions.yml index 9bf7923c..0b18e42f 100644 --- a/.github/workflows/test-versions.yml +++ b/.github/workflows/test-versions.yml @@ -66,48 +66,14 @@ jobs: - "PGSQL_SERVER=9.6-alpine" - "PGSQL_SERVER=10.0" - "PGSQL_SERVER=10.0-alpine" - - "PGSQL_SERVER=10.1" - - "PGSQL_SERVER=10.1-alpine" - - "PGSQL_SERVER=10.2" - - "PGSQL_SERVER=10.2-alpine" - - "PGSQL_SERVER=10.3" - - "PGSQL_SERVER=10.3-alpine" - - "PGSQL_SERVER=10.4" - - "PGSQL_SERVER=10.4-alpine" - - "PGSQL_SERVER=10.5" - - "PGSQL_SERVER=10.5-alpine" - - "PGSQL_SERVER=10.6" - - "PGSQL_SERVER=10.6-alpine" - "PGSQL_SERVER=11.0" - "PGSQL_SERVER=11.0-alpine" - - "PGSQL_SERVER=11.1" - - "PGSQL_SERVER=11.1-alpine" - - "PGSQL_SERVER=11.2" - - "PGSQL_SERVER=11.2-alpine" - - "PGSQL_SERVER=11.3" - - "PGSQL_SERVER=11.3-alpine" - - "PGSQL_SERVER=11.4" - - "PGSQL_SERVER=11.4-alpine" - - "PGSQL_SERVER=11.5" - - "PGSQL_SERVER=11.5-alpine" - - "PGSQL_SERVER=11.6" - - "PGSQL_SERVER=11.6-alpine" - - "PGSQL_SERVER=11.7" - - "PGSQL_SERVER=11.7-alpine" - - "PGSQL_SERVER=11.8" - - "PGSQL_SERVER=11.8-alpine" - - "PGSQL_SERVER=11.9" - - "PGSQL_SERVER=11.9-alpine" - "PGSQL_SERVER=12.0" - "PGSQL_SERVER=12.0-alpine" - - "PGSQL_SERVER=12.1" - - "PGSQL_SERVER=12.1-alpine" - - "PGSQL_SERVER=12.2" - - "PGSQL_SERVER=12.2-alpine" - - "PGSQL_SERVER=12.3" - - "PGSQL_SERVER=12.3-alpine" - "PGSQL_SERVER=13.0" - "PGSQL_SERVER=13.0-alpine" + - "PGSQL_SERVER=14.0" + - "PGSQL_SERVER=14.0-alpine" - "PGSQL_SERVER=latest" - "PGSQL_SERVER=alpine" @@ -122,6 +88,8 @@ jobs: - "REDIS_SERVER=5.0-alpine" - "REDIS_SERVER=6.0" - "REDIS_SERVER=6.0-alpine" + - "REDIS_SERVER=6.2" + - "REDIS_SERVER=6.2-alpine" - "REDIS_SERVER=latest" - "REDIS_SERVER=alpine" @@ -142,6 +110,7 @@ jobs: - "MONGO_SERVER=4.0" - "MONGO_SERVER=4.2" - "MONGO_SERVER=4.4" + - "MONGO_SERVER=5.0" - "MONGO_SERVER=latest" name: "[${{ matrix.version }}]" steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d1268d9..679aca85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,15 @@ Make sure to have a look at [UPDATING.md](https://github.com/cytopia/devilbox/bl ## Unreleased +## Release v1.11.0 (2022-04-01) + +#### Changed +- Changed default PostgreSQL server from `12.4` to `14-alpine` +- Changed default Redis server from `6.0` to `6.2-alpine` +- Changed default Memcached server from `1.6` to `1.6-alpine` +- Changed default MongoDB server from `4.4` to `5.0` + + ## Release v1.11.0 (2022-03-22) #### Fixed diff --git a/README.md b/README.md index 5f4dee74..eccbe52b 100644 --- a/README.md +++ b/README.md @@ -304,7 +304,7 @@ Every single attachable container comes with many different versions. In order t 10.5 9.6 - latest + 6.2 4.2 @@ -315,8 +315,8 @@ Every single attachable container comes with many different versions. In order t 10.6 - ... - + 10 + latest 4.4 @@ -327,10 +327,10 @@ Every single attachable container comes with many different versions. In order t 10.7 - 12.3 + 11 - latest + 5.0 @@ -339,10 +339,10 @@ Every single attachable container comes with many different versions. In order t - 12.4 - + 12 + latest @@ -351,7 +351,7 @@ Every single attachable container comes with many different versions. In order t - 13.0 + 13 @@ -363,7 +363,7 @@ Every single attachable container comes with many different versions. In order t - latest + 14 @@ -375,7 +375,7 @@ Every single attachable container comes with many different versions. In order t - + latest diff --git a/docker-compose.yml b/docker-compose.yml index 34fc1de8..2fdc305f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -530,50 +530,14 @@ volumes: devilbox-pgsql-9.6-alpine: devilbox-pgsql-10.0: devilbox-pgsql-10.0-alpine: - devilbox-pgsql-10.1: - devilbox-pgsql-10.1-alpine: - devilbox-pgsql-10.2: - devilbox-pgsql-10.2-alpine: - devilbox-pgsql-10.3: - devilbox-pgsql-10.3-alpine: - devilbox-pgsql-10.4: - devilbox-pgsql-10.4-alpine: - devilbox-pgsql-10.5: - devilbox-pgsql-10.5-alpine: - devilbox-pgsql-10.6: - devilbox-pgsql-10.6-alpine: devilbox-pgsql-11.0: devilbox-pgsql-11.0-alpine: - devilbox-pgsql-11.1: - devilbox-pgsql-11.1-alpine: - devilbox-pgsql-11.2: - devilbox-pgsql-11.2-alpine: - devilbox-pgsql-11.3: - devilbox-pgsql-11.3-alpine: - devilbox-pgsql-11.4: - devilbox-pgsql-11.4-alpine: - devilbox-pgsql-11.5: - devilbox-pgsql-11.5-alpine: - devilbox-pgsql-11.6: - devilbox-pgsql-11.6-alpine: - devilbox-pgsql-11.7: - devilbox-pgsql-11.7-alpine: - devilbox-pgsql-11.8: - devilbox-pgsql-11.8-alpine: - devilbox-pgsql-11.9: - devilbox-pgsql-11.9-alpine: devilbox-pgsql-12.0: devilbox-pgsql-12.0-alpine: - devilbox-pgsql-12.1: - devilbox-pgsql-12.1-alpine: - devilbox-pgsql-12.2: - devilbox-pgsql-12.2-alpine: - devilbox-pgsql-12.3: - devilbox-pgsql-12.3-alpine: - devilbox-pgsql-12.4: - devilbox-pgsql-12.4-alpine: devilbox-pgsql-13.0: devilbox-pgsql-13.0-alpine: + devilbox-pgsql-14.0: + devilbox-pgsql-14.0-alpine: devilbox-pgsql-latest: devilbox-pgsql-alpine: @@ -588,4 +552,5 @@ volumes: devilbox-mongo-4.0: devilbox-mongo-4.2: devilbox-mongo-4.4: + devilbox-mongo-5.0: devilbox-mongo-latest: diff --git a/docs/configuration-files/env-file.rst b/docs/configuration-files/env-file.rst index 0ff26d39..b35f98b5 100644 --- a/docs/configuration-files/env-file.rst +++ b/docs/configuration-files/env-file.rst @@ -557,11 +557,11 @@ PHP_SERVER This variable choses your desired PHP-FPM version to be started. -+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------+ -| Name | Allowed values | Default value | -+=========================+========================================================================================================================================================================================================================================================+=================+ -| ``PHP_SERVER`` | ``php-fpm-5.2`` |br| ``php-fpm-5.3`` |br| ``php-fpm-5.4`` |br| ``php-fpm-5.5`` |br| ``php-fpm-5.6`` |br| ``php-fpm-7.0`` |br| ``php-fpm-7.1`` |br| ``php-fpm-7.2`` |br| ``php-fpm-7.3`` |br| ``php-fpm-7.4`` |br| ``php-fpm-8.0`` |br| ``php-fpm-8.1`` | ``php-fpm-7.4`` | -+-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------+ ++-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------+ +| Name | Allowed values | Default value | ++=========================+=============================================================================================================================================================================================================================================================================+=================+ +| ``PHP_SERVER`` | ``php-fpm-5.2`` |br| ``php-fpm-5.3`` |br| ``php-fpm-5.4`` |br| ``php-fpm-5.5`` |br| ``php-fpm-5.6`` |br| ``php-fpm-7.0`` |br| ``php-fpm-7.1`` |br| ``php-fpm-7.2`` |br| ``php-fpm-7.3`` |br| ``php-fpm-7.4`` |br| ``php-fpm-8.0`` |br| ``php-fpm-8.1`` |br| ``php-fpm-8.2`` | ``php-fpm-8.1`` | ++-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------+ .. important:: **PHP 5.2** is available to use, but it is not officially supported. The Devilbox intranet does @@ -574,7 +574,7 @@ All values are already available in the ``.env`` file and just need to be commen .. code-block:: bash :caption: .env - :emphasize-lines: 9 + :emphasize-lines: 14 host> grep PHP_SERVER .env @@ -587,9 +587,10 @@ All values are already available in the ``.env`` file and just need to be commen #PHP_SERVER=php-fpm-7.1 #PHP_SERVER=php-fpm-7.2 #PHP_SERVER=php-fpm-7.3 - PHP_SERVER=php-fpm-7.4 + #PHP_SERVER=php-fpm-7.4 #PHP_SERVER=php-fpm-8.0 - #PHP_SERVER=php-fpm-8.1 + PHP_SERVER=php-fpm-8.1 + #PHP_SERVER=php-fpm-8.2 .. _env_httpd_server: @@ -629,14 +630,14 @@ This variable choses your desired MySQL server version to be started. +-------------------------+------------------------------------------------------------------------------------------------+------------------+ | Name | Allowed values | Default value | +=========================+================================================================================================+==================+ -| ``MYSQL_SERVER`` | ``mysql-5.5`` |br| ``mysql-5.6`` |br| ``mariadb-10.2`` |br| ``percona-5.7`` |br| and many more | ``mariadb-10.5`` | +| ``MYSQL_SERVER`` | ``mysql-5.5`` |br| ``mysql-5.6`` |br| ``mariadb-10.2`` |br| ``percona-5.7`` |br| and many more | ``mariadb-10.6`` | +-------------------------+------------------------------------------------------------------------------------------------+------------------+ All values are already available in the ``.env`` file and just need to be commented or uncommented. If multiple values are uncommented, the last uncommented variable one takes precedences: .. code-block:: bash :caption: .env - :emphasize-lines: 9 + :emphasize-lines: 18 host> grep MYSQL_SERVER .env @@ -644,17 +645,20 @@ All values are already available in the ``.env`` file and just need to be commen #MYSQL_SERVER=mysql-5.6 #MYSQL_SERVER=mysql-5.7 #MYSQL_SERVER=mysql-8.0 + #MYSQL_SERVER=percona-5.5 + #MYSQL_SERVER=percona-5.6 + #MYSQL_SERVER=percona-5.7 + #MYSQL_SERVER=percona-8.0 #MYSQL_SERVER=mariadb-5.5 #MYSQL_SERVER=mariadb-10.0 #MYSQL_SERVER=mariadb-10.1 #MYSQL_SERVER=mariadb-10.2 #MYSQL_SERVER=mariadb-10.3 #MYSQL_SERVER=mariadb-10.4 - MYSQL_SERVER=mariadb-10.5 - #MYSQL_SERVER=percona-5.5 - #MYSQL_SERVER=percona-5.6 - #MYSQL_SERVER=percona-5.7 - #MYSQL_SERVER=percona-8.0 + #MYSQL_SERVER=mariadb-10.5 + MYSQL_SERVER=mariadb-10.6 + #MYSQL_SERVER=mariadb-10.7 + #MYSQL_SERVER=mariadb-10.8 .. _env_pgsql_server: @@ -667,14 +671,14 @@ This variable choses your desired PostgreSQL server version to be started. +-------------------------+-------------------------------------------------------------------+------------------+ | Name | Allowed values | Default value | +=========================+===================================================================+==================+ -| ``PGSQL_SERVER`` | ``9.1`` |br| ``9.2`` |br| ``9.3`` |br| ``9.4`` |br| and many more | ``12.4`` | +| ``PGSQL_SERVER`` | ``9.1`` |br| ``9.2`` |br| ``9.3`` |br| ``9.4`` |br| and many more | ``14-alpine`` | +-------------------------+-------------------------------------------------------------------+------------------+ All values are already available in the ``.env`` file and just need to be commented or uncommented. If multiple values are uncommented, the last uncommented variable one takes precedences: .. code-block:: bash :caption: .env - :emphasize-lines: 8 + :emphasize-lines: 24 host> grep PGSQL_SERVER .env @@ -690,52 +694,16 @@ All values are already available in the ``.env`` file and just need to be commen #PGSQL_SERVER=9.5-alpine #PGSQL_SERVER=9.6 #PGSQL_SERVER=9.6-alpine - #PGSQL_SERVER=10.0 - #PGSQL_SERVER=10.0-alpine - #PGSQL_SERVER=10.1 - #PGSQL_SERVER=10.1-alpine - #PGSQL_SERVER=10.2 - #PGSQL_SERVER=10.2-alpine - #PGSQL_SERVER=10.3 - #PGSQL_SERVER=10.3-alpine - #PGSQL_SERVER=10.4 - #PGSQL_SERVER=10.4-alpine - #PGSQL_SERVER=10.5 - #PGSQL_SERVER=10.5-alpine - #PGSQL_SERVER=10.6 - #PGSQL_SERVER=10.6-alpine - #PGSQL_SERVER=11.0 - #PGSQL_SERVER=11.0-alpine - #PGSQL_SERVER=11.1 - #PGSQL_SERVER=11.1-alpine - #PGSQL_SERVER=11.2 - #PGSQL_SERVER=11.2-alpine - #PGSQL_SERVER=11.3 - #PGSQL_SERVER=11.3-alpine - #PGSQL_SERVER=11.4 - #PGSQL_SERVER=11.4-alpine - #PGSQL_SERVER=11.5 - #PGSQL_SERVER=11.5-alpine - #PGSQL_SERVER=11.6 - #PGSQL_SERVER=11.6-alpine - #PGSQL_SERVER=11.7 - #PGSQL_SERVER=11.7-alpine - #PGSQL_SERVER=11.8 - #PGSQL_SERVER=11.8-alpine - #PGSQL_SERVER=11.9 - #PGSQL_SERVER=11.9-alpine - #PGSQL_SERVER=12.0 - #PGSQL_SERVER=12.0-alpine - #PGSQL_SERVER=12.1 - #PGSQL_SERVER=12.1-alpine - #PGSQL_SERVER=12.2 - #PGSQL_SERVER=12.2-alpine - #PGSQL_SERVER=12.3 - #PGSQL_SERVER=12.3-alpine - PGSQL_SERVER=12.4 - #PGSQL_SERVER=12.4-alpine - #PGSQL_SERVER=13.0 - #PGSQL_SERVER=13.0-alpine + #PGSQL_SERVER=10 + #PGSQL_SERVER=10-alpine + #PGSQL_SERVER=11 + #PGSQL_SERVER=11-alpine + #PGSQL_SERVER=12 + #PGSQL_SERVER=12-alpine + #PGSQL_SERVER=13 + #PGSQL_SERVER=13-alpine + #PGSQL_SERVER=14 + PGSQL_SERVER=14-alpine #PGSQL_SERVER=latest #PGSQL_SERVER=alpine @@ -755,14 +723,14 @@ This variable choses your desired Redis server version to be started. +-------------------------+-------------------------------------------------------------------+------------------+ | Name | Allowed values | Default value | +=========================+===================================================================+==================+ -| ``REDIS_SERVER`` | ``2.8`` |br| ``3.0`` |br| ``3.2`` |br| ``4.0`` |br| and many more | ``6.0`` | +| ``REDIS_SERVER`` | ``2.8`` |br| ``3.0`` |br| ``3.2`` |br| ``4.0`` |br| and many more | ``6.2-alpine`` | +-------------------------+-------------------------------------------------------------------+------------------+ All values are already available in the ``.env`` file and just need to be commented or uncommented. If multiple values are uncommented, the last uncommented variable one takes precedences: .. code-block:: bash :caption: .env - :emphasize-lines: 6 + :emphasize-lines: 15 host> grep REDIS_SERVER .env @@ -775,8 +743,10 @@ All values are already available in the ``.env`` file and just need to be commen #REDIS_SERVER=4.0-alpine #REDIS_SERVER=5.0 #REDIS_SERVER=5.0-alpine - REDIS_SERVER=6.0 + #REDIS_SERVER=6.0 #REDIS_SERVER=6.0-alpine + #REDIS_SERVER=6.2 + REDIS_SERVER=6.2-alpine #REDIS_SERVER=latest #REDIS_SERVER=alpine @@ -796,14 +766,14 @@ This variable choses your desired Memcached server version to be started. +-------------------------+---------------------------------------------------------------------------------+------------------+ | Name | Allowed values | Default value | +=========================+=================================================================================+==================+ -| ``MEMCD_SERVER`` | ``1.4`` |br| ``1.4-alpine`` |br| ``1.5`` |br| ``1.5-alpine`` |br| and many more | ``1.6`` | +| ``MEMCD_SERVER`` | ``1.4`` |br| ``1.4-alpine`` |br| ``1.5`` |br| ``1.5-alpine`` |br| and many more | ``1.6-alpine`` | +-------------------------+---------------------------------------------------------------------------------+------------------+ All values are already available in the ``.env`` file and just need to be commented or uncommented. If multiple values are uncommented, the last uncommented variable one takes precedences: .. code-block:: bash :caption: .env - :emphasize-lines: 5 + :emphasize-lines: 8 host> grep MEMCD_SERVER .env @@ -811,8 +781,8 @@ All values are already available in the ``.env`` file and just need to be commen #MEMCD_SERVER=1.4-alpine #MEMCD_SERVER=1.5 #MEMCD_SERVER=1.5-alpine - MEMCD_SERVER=1.6 - #MEMCD_SERVER=1.6-alpine + #MEMCD_SERVER=1.6 + MEMCD_SERVER=1.6-alpine #MEMCD_SERVER=latest #MEMCD_SERVER=alpine @@ -832,14 +802,14 @@ This variable choses your desired MongoDB server version to be started. +-------------------------+-------------------------------------------------------------------+------------------+ | Name | Allowed values | Default value | +=========================+===================================================================+==================+ -| ``MONGO_SERVER`` | ``2.8`` |br| ``3.0`` |br| ``3.2`` |br| ``3.4`` |br| and many more | ``4.4`` | +| ``MONGO_SERVER`` | ``2.8`` |br| ``3.0`` |br| ``3.2`` |br| ``3.4`` |br| and many more | ``5.0`` | +-------------------------+-------------------------------------------------------------------+------------------+ All values are already available in the ``.env`` file and just need to be commented or uncommented. If multiple values are uncommented, the last uncommented variable one takes precedences: .. code-block:: bash :caption: .env - :emphasize-lines: 6 + :emphasize-lines: 11 host> grep MONGO_SERVER .env @@ -850,7 +820,8 @@ All values are already available in the ``.env`` file and just need to be commen #MONGO_SERVER=3.6 #MONGO_SERVER=4.0 #MONGO_SERVER=4.2 - MONGO_SERVER=4.4 + #MONGO_SERVER=4.4 + MONGO_SERVER=5.0 #MONGO_SERVER=latest .. note:: diff --git a/env-example b/env-example index f2b472f5..86cd2128 100644 --- a/env-example +++ b/env-example @@ -286,6 +286,10 @@ HTTPD_SERVER=nginx-stable #MYSQL_SERVER=mysql-5.6 #MYSQL_SERVER=mysql-5.7 #MYSQL_SERVER=mysql-8.0 +#MYSQL_SERVER=percona-5.5 +#MYSQL_SERVER=percona-5.6 +#MYSQL_SERVER=percona-5.7 +#MYSQL_SERVER=percona-8.0 #MYSQL_SERVER=mariadb-5.5 #MYSQL_SERVER=mariadb-10.0 #MYSQL_SERVER=mariadb-10.1 @@ -296,22 +300,26 @@ HTTPD_SERVER=nginx-stable MYSQL_SERVER=mariadb-10.6 #MYSQL_SERVER=mariadb-10.7 #MYSQL_SERVER=mariadb-10.8 -#MYSQL_SERVER=percona-5.5 -#MYSQL_SERVER=percona-5.6 -#MYSQL_SERVER=percona-5.7 -#MYSQL_SERVER=percona-8.0 ### ### 1.4 Choose PostgreSQL Server Image ### +### https://www.postgresql.org/support/versioning/ +### ### IMPORTANT: Alpine based images might cause issues on Docker Toolbox or OSX ### https://github.com/docker/toolbox/issues/510 ### +# +# PostgreSQL without arm64 support +# #PGSQL_SERVER=9.0 #PGSQL_SERVER=9.1 -#PGSQL_SERVER=9.2 #PGSQL_SERVER=9.2-alpine +# +# PostgreSQL with arm64 support +# +#PGSQL_SERVER=9.2 #PGSQL_SERVER=9.3 #PGSQL_SERVER=9.3-alpine #PGSQL_SERVER=9.4 @@ -320,62 +328,16 @@ MYSQL_SERVER=mariadb-10.6 #PGSQL_SERVER=9.5-alpine #PGSQL_SERVER=9.6 #PGSQL_SERVER=9.6-alpine -#PGSQL_SERVER=10.0 -#PGSQL_SERVER=10.0-alpine -#PGSQL_SERVER=10.1 -#PGSQL_SERVER=10.1-alpine -#PGSQL_SERVER=10.2 -#PGSQL_SERVER=10.2-alpine -#PGSQL_SERVER=10.3 -#PGSQL_SERVER=10.3-alpine -#PGSQL_SERVER=10.4 -#PGSQL_SERVER=10.4-alpine -#PGSQL_SERVER=10.5 -#PGSQL_SERVER=10.5-alpine -#PGSQL_SERVER=10.6 -#PGSQL_SERVER=10.6-alpine -#PGSQL_SERVER=10.7 -#PGSQL_SERVER=10.7-alpine -#PGSQL_SERVER=10.8 -#PGSQL_SERVER=10.8-alpine -#PGSQL_SERVER=10.9 -#PGSQL_SERVER=10.9-alpine -#PGSQL_SERVER=10.10 -#PGSQL_SERVER=10.10-alpine -#PGSQL_SERVER=10.11 -#PGSQL_SERVER=10.11-alpine -#PGSQL_SERVER=11.0 -#PGSQL_SERVER=11.0-alpine -#PGSQL_SERVER=11.1 -#PGSQL_SERVER=11.1-alpine -#PGSQL_SERVER=11.2 -#PGSQL_SERVER=11.2-alpine -#PGSQL_SERVER=11.3 -#PGSQL_SERVER=11.3-alpine -#PGSQL_SERVER=11.4 -#PGSQL_SERVER=11.4-alpine -#PGSQL_SERVER=11.5 -#PGSQL_SERVER=11.5-alpine -#PGSQL_SERVER=11.6 -#PGSQL_SERVER=11.6-alpine -#PGSQL_SERVER=11.7 -#PGSQL_SERVER=11.7-alpine -#PGSQL_SERVER=11.8 -#PGSQL_SERVER=11.8-alpine -#PGSQL_SERVER=11.9 -#PGSQL_SERVER=11.9-alpine -#PGSQL_SERVER=12.0 -#PGSQL_SERVER=12.0-alpine -#PGSQL_SERVER=12.1 -#PGSQL_SERVER=12.1-alpine -#PGSQL_SERVER=12.2 -#PGSQL_SERVER=12.2-alpine -#PGSQL_SERVER=12.3 -#PGSQL_SERVER=12.3-alpine -PGSQL_SERVER=12.4 -#PGSQL_SERVER=12.4-alpine -#PGSQL_SERVER=13.0 -#PGSQL_SERVER=13.0-alpine +#PGSQL_SERVER=10 +#PGSQL_SERVER=10-alpine +#PGSQL_SERVER=11 +#PGSQL_SERVER=11-alpine +#PGSQL_SERVER=12 +#PGSQL_SERVER=12-alpine +#PGSQL_SERVER=13 +#PGSQL_SERVER=13-alpine +#PGSQL_SERVER=14 +PGSQL_SERVER=14-alpine #PGSQL_SERVER=latest #PGSQL_SERVER=alpine @@ -386,17 +348,25 @@ PGSQL_SERVER=12.4 ### IMPORTANT: Alpine based images might cause issues on Docker Toolbox or OSX ### https://github.com/docker/toolbox/issues/510 ### +# +# Redis without arm64 support +# #REDIS_SERVER=2.8 #REDIS_SERVER=3.0 #REDIS_SERVER=3.0-alpine +# +# Redis with arm64 support +# #REDIS_SERVER=3.2 #REDIS_SERVER=3.2-alpine #REDIS_SERVER=4.0 #REDIS_SERVER=4.0-alpine #REDIS_SERVER=5.0 #REDIS_SERVER=5.0-alpine -REDIS_SERVER=6.0 +#REDIS_SERVER=6.0 #REDIS_SERVER=6.0-alpine +#REDIS_SERVER=6.2 +REDIS_SERVER=6.2-alpine #REDIS_SERVER=latest #REDIS_SERVER=alpine @@ -407,12 +377,18 @@ REDIS_SERVER=6.0 ### IMPORTANT: Alpine based images might cause issues on Docker Toolbox or OSX ### https://github.com/docker/toolbox/issues/510 ### +# +# Memcached without arm64 support +# #MEMCD_SERVER=1.4 #MEMCD_SERVER=1.4-alpine +# +# Memcached with arm64 support +# #MEMCD_SERVER=1.5 #MEMCD_SERVER=1.5-alpine -MEMCD_SERVER=1.6 -#MEMCD_SERVER=1.6-alpine +#MEMCD_SERVER=1.6 +MEMCD_SERVER=1.6-alpine #MEMCD_SERVER=latest #MEMCD_SERVER=alpine @@ -420,14 +396,23 @@ MEMCD_SERVER=1.6 ### ### 1.7 Choose Mongo Server Image ### +### https://www.mongodb.com/evolved +### +# +# MongoDB without arm64 support +# #MONGO_SERVER=2.8 #MONGO_SERVER=3.0 #MONGO_SERVER=3.2 +# +# MongoDB with arm64 support +# #MONGO_SERVER=3.4 #MONGO_SERVER=3.6 #MONGO_SERVER=4.0 #MONGO_SERVER=4.2 -MONGO_SERVER=4.4 +#MONGO_SERVER=4.4 +MONGO_SERVER=5.0 #MONGO_SERVER=latest From e3dfa7cc09ba7a0ee15310ba9dd3a65ab6bf98fe Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 27 Mar 2022 04:25:52 +0200 Subject: [PATCH 02/23] Bump version --- .devilbox/www/config.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.devilbox/www/config.php b/.devilbox/www/config.php index 5bdf88d9..28094c22 100644 --- a/.devilbox/www/config.php +++ b/.devilbox/www/config.php @@ -13,8 +13,8 @@ error_reporting(-1); putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1'); -$DEVILBOX_VERSION = 'v1.11.0'; -$DEVILBOX_DATE = '2022-03-22'; +$DEVILBOX_VERSION = 'v1.12.0'; +$DEVILBOX_DATE = '2022-04-01'; $DEVILBOX_API_PAGE = 'devilbox-api/status.json'; // From 9ac4b7399f94ac1b12c9902cd5c985b72ebb6dff Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 27 Mar 2022 06:57:04 +0200 Subject: [PATCH 03/23] Fix postgresql volume definitions --- docker-compose.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2fdc305f..ac44c32e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -528,16 +528,16 @@ volumes: devilbox-pgsql-9.5-alpine: devilbox-pgsql-9.6: devilbox-pgsql-9.6-alpine: - devilbox-pgsql-10.0: - devilbox-pgsql-10.0-alpine: - devilbox-pgsql-11.0: - devilbox-pgsql-11.0-alpine: - devilbox-pgsql-12.0: - devilbox-pgsql-12.0-alpine: - devilbox-pgsql-13.0: - devilbox-pgsql-13.0-alpine: - devilbox-pgsql-14.0: - devilbox-pgsql-14.0-alpine: + devilbox-pgsql-10: + devilbox-pgsql-10-alpine: + devilbox-pgsql-11: + devilbox-pgsql-11-alpine: + devilbox-pgsql-12: + devilbox-pgsql-12-alpine: + devilbox-pgsql-13: + devilbox-pgsql-13-alpine: + devilbox-pgsql-14: + devilbox-pgsql-14-alpine: devilbox-pgsql-latest: devilbox-pgsql-alpine: From 6acac7d8deeaeb2f82ddc16974825109b51e7c8b Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 27 Mar 2022 07:04:09 +0200 Subject: [PATCH 04/23] Fix CI script to detect PHP version --- .tests/scripts/.lib.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.tests/scripts/.lib.sh b/.tests/scripts/.lib.sh index 9a60d4b8..2a37a601 100644 --- a/.tests/scripts/.lib.sh +++ b/.tests/scripts/.lib.sh @@ -47,8 +47,7 @@ get_php_version() { # Check php -v >&2 printf "Fetching PHP version from php -v: " if ! cli_version="$( run "docker-compose exec -T php php -v \ - | head -1 \ - | grep -Eo 'PHP[[:space:]]+[0-9]+\\.[0-9]+' \ + | grep -Eo '^PHP[[:space:]]+[0-9]+\\.[0-9]+' \ | grep -Eo '[0-9]+\\.[0-9]+'" \ "${retries}" "${root_path}" "0" )"; then >&2 printf "FAILED\\n" From 014d9103dbc444d954a56c9bba7df0f2d970764b Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 27 Mar 2022 07:43:07 +0200 Subject: [PATCH 05/23] Added CakePHP integration tests for PHP 8+ --- .tests/Makefile | 1 + .tests/tests/framework-cakephp-php8.sh | 95 ++++++++++++++++++++++++++ .tests/tests/framework-cakephp.sh | 1 + CHANGELOG.md | 3 + 4 files changed, 100 insertions(+) create mode 100755 .tests/tests/framework-cakephp-php8.sh diff --git a/.tests/Makefile b/.tests/Makefile index b4a5b4ba..c6869e62 100644 --- a/.tests/Makefile +++ b/.tests/Makefile @@ -160,6 +160,7 @@ test-smoke-autostart: ### test-smoke-framework-cakephp: $(PWD)/tests/framework-cakephp.sh + $(PWD)/tests/framework-cakephp-php8.sh test-smoke-framework-drupal: $(PWD)/tests/framework-drupal.sh diff --git a/.tests/tests/framework-cakephp-php8.sh b/.tests/tests/framework-cakephp-php8.sh new file mode 100755 index 00000000..c70a4b60 --- /dev/null +++ b/.tests/tests/framework-cakephp-php8.sh @@ -0,0 +1,95 @@ +#!/usr/bin/env bash + +# NOTE: Parsing curl to tac to circumnvent "failed writing body" +# https://stackoverflow.com/questions/16703647/why-curl-return-and-error-23-failed-writing-body + +set -e +set -u +set -o pipefail + +SCRIPT_PATH="$( cd "$(dirname "$0")" && pwd -P )" +DVLBOX_PATH="$( cd "${SCRIPT_PATH}/../.." && pwd -P )" +# shellcheck disable=SC1090 +. "${SCRIPT_PATH}/../scripts/.lib.sh" + +RETRIES=10 +# see framework-cakephp.sh for PHP <8 tests +DISABLED_VERSIONS=("5.2" "5.3" "5.4" "5.5" "5.6" "7.0" "7.1" "7.2" "7.3" "7.4" "8.2") + +PHP_VERSION="$( get_php_version "${DVLBOX_PATH}" )" + +### +### What CakePHP Version? +### +CAKE_PHP_VERSION=4.3 + + +echo +echo "# --------------------------------------------------------------------------------------------------" +echo "# [Framework] CakePHP ${CAKE_PHP_VERSION}" +echo "# --------------------------------------------------------------------------------------------------" +echo + + +# ------------------------------------------------------------------------------------------------- +# Pre-check +# ------------------------------------------------------------------------------------------------- + +if [[ ${DISABLED_VERSIONS[*]} =~ ${PHP_VERSION} ]]; then + printf "[SKIP] Skipping all checks for PHP %s\\n" "${PHP_VERSION}" + exit 0 +fi + + + +# ------------------------------------------------------------------------------------------------- +# ENTRYPOINT +# ------------------------------------------------------------------------------------------------- + +### +### Get required env values +### +MYSQL_ROOT_PASSWORD="$( "${SCRIPT_PATH}/../scripts/env-getvar.sh" "MYSQL_ROOT_PASSWORD" )" +TLD_SUFFIX="$( "${SCRIPT_PATH}/../scripts/env-getvar.sh" "TLD_SUFFIX" )" +VHOST="my-cakephp" + +# Create vhost dir +create_vhost_dir "${VHOST}" + + +# Setup CakePHP project +run "docker-compose exec --user devilbox -T php bash -c 'cd /shared/httpd/${VHOST}; composer create-project --no-interaction --prefer-dist cakephp/app:~${CAKE_PHP_VERSION} cakephp'" "${RETRIES}" "${DVLBOX_PATH}" +run "docker-compose exec --user devilbox -T php bash -c 'cd /shared/httpd/${VHOST}; ln -sf cakephp/webroot htdocs'" "${RETRIES}" "${DVLBOX_PATH}" +run "docker-compose exec --user devilbox -T php mysql -u root -h mysql --password=\"${MYSQL_ROOT_PASSWORD}\" -e \"DROP DATABASE IF EXISTS my_cake; CREATE DATABASE my_cake;\"" "${RETRIES}" "${DVLBOX_PATH}" + +# Configure CakePHP database settings +run "docker-compose exec --user devilbox -T php sed -i\"\" \"s/'host' =>.*/'host' => 'mysql',/g\" /shared/httpd/${VHOST}/cakephp/config/app_local.php" "${RETRIES}" "${DVLBOX_PATH}" +run "docker-compose exec --user devilbox -T php sed -i\"\" \"s/'username' =>.*/'username' => 'root',/g\" /shared/httpd/${VHOST}/cakephp/config/app_local.php" "${RETRIES}" "${DVLBOX_PATH}" +run "docker-compose exec --user devilbox -T php sed -i\"\" \"s/'password' =>.*/'password' => '${MYSQL_ROOT_PASSWORD}',/g\" /shared/httpd/${VHOST}/cakephp/config/app_local.php" "${RETRIES}" "${DVLBOX_PATH}" +run "docker-compose exec --user devilbox -T php sed -i\"\" \"s/'database' =>.*/'database' => 'my_cake',/g\" /shared/httpd/${VHOST}/cakephp/config/app_local.php" "${RETRIES}" "${DVLBOX_PATH}" + +# Test CakePHP +ERROR=0 +if ! run "docker-compose exec --user devilbox -T php curl -sS --fail 'http://${VHOST}.${TLD_SUFFIX}' | tac | tac | grep '\"bullet success\"' | grep 'mbstring'" "${RETRIES}" "${DVLBOX_PATH}"; then + ERROR=1 +fi +if ! run "docker-compose exec --user devilbox -T php curl -sS --fail 'http://${VHOST}.${TLD_SUFFIX}' | tac | tac | grep '\"bullet success\"' | grep 'openssl'" "${RETRIES}" "${DVLBOX_PATH}"; then + ERROR=1 +fi +if ! run "docker-compose exec --user devilbox -T php curl -sS --fail 'http://${VHOST}.${TLD_SUFFIX}' | tac | tac | grep '\"bullet success\"' | grep 'intl'" "${RETRIES}" "${DVLBOX_PATH}"; then + ERROR=1 +fi +if ! run "docker-compose exec --user devilbox -T php curl -sS --fail 'http://${VHOST}.${TLD_SUFFIX}' | tac | tac | grep '\"bullet success\"' | grep 'tmp directory'" "${RETRIES}" "${DVLBOX_PATH}"; then + ERROR=1 +fi +if ! run "docker-compose exec --user devilbox -T php curl -sS --fail 'http://${VHOST}.${TLD_SUFFIX}' | tac | tac | grep '\"bullet success\"' | grep 'logs directory'" "${RETRIES}" "${DVLBOX_PATH}"; then + ERROR=1 +fi +if ! run "docker-compose exec --user devilbox -T php curl -sS --fail 'http://${VHOST}.${TLD_SUFFIX}' | tac | tac | grep '\"bullet success\"' | grep 'connect to the database'" "${RETRIES}" "${DVLBOX_PATH}"; then + ERROR=1 +fi + +if [ "${ERROR}" = "1" ]; then + run "docker-compose exec --user devilbox -T php curl 'http://${VHOST}.${TLD_SUFFIX}' || true" "1" "${DVLBOX_PATH}" + exit 1 +fi diff --git a/.tests/tests/framework-cakephp.sh b/.tests/tests/framework-cakephp.sh index 3caa7340..28d8e5ec 100755 --- a/.tests/tests/framework-cakephp.sh +++ b/.tests/tests/framework-cakephp.sh @@ -13,6 +13,7 @@ DVLBOX_PATH="$( cd "${SCRIPT_PATH}/../.." && pwd -P )" . "${SCRIPT_PATH}/../scripts/.lib.sh" RETRIES=10 +# see framework-cakephp-php8.sh for PHP 8+ tests DISABLED_VERSIONS=("5.2" "5.3" "5.4" "5.5" "8.0" "8.1" "8.2") PHP_VERSION="$( get_php_version "${DVLBOX_PATH}" )" diff --git a/CHANGELOG.md b/CHANGELOG.md index 679aca85..9028adee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ Make sure to have a look at [UPDATING.md](https://github.com/cytopia/devilbox/bl ## Release v1.11.0 (2022-04-01) +#### Added +- Added CakePHP integration tests for PHP 8+ + #### Changed - Changed default PostgreSQL server from `12.4` to `14-alpine` - Changed default Redis server from `6.0` to `6.2-alpine` From 3678a6799c81b5e06b0f5cebb070b62a9acae57f Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 27 Mar 2022 15:08:19 +0200 Subject: [PATCH 06/23] Fix PGSQL versions in CI --- .github/workflows/test-versions.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test-versions.yml b/.github/workflows/test-versions.yml index 0b18e42f..f3a69bd6 100644 --- a/.github/workflows/test-versions.yml +++ b/.github/workflows/test-versions.yml @@ -64,16 +64,16 @@ jobs: - "PGSQL_SERVER=9.5-alpine" - "PGSQL_SERVER=9.6" - "PGSQL_SERVER=9.6-alpine" - - "PGSQL_SERVER=10.0" - - "PGSQL_SERVER=10.0-alpine" - - "PGSQL_SERVER=11.0" - - "PGSQL_SERVER=11.0-alpine" - - "PGSQL_SERVER=12.0" - - "PGSQL_SERVER=12.0-alpine" - - "PGSQL_SERVER=13.0" - - "PGSQL_SERVER=13.0-alpine" - - "PGSQL_SERVER=14.0" - - "PGSQL_SERVER=14.0-alpine" + - "PGSQL_SERVER=10" + - "PGSQL_SERVER=10-alpine" + - "PGSQL_SERVER=11" + - "PGSQL_SERVER=11-alpine" + - "PGSQL_SERVER=12" + - "PGSQL_SERVER=12-alpine" + - "PGSQL_SERVER=13" + - "PGSQL_SERVER=13-alpine" + - "PGSQL_SERVER=14" + - "PGSQL_SERVER=14-alpine" - "PGSQL_SERVER=latest" - "PGSQL_SERVER=alpine" From 52689f435a87b067a4ae62c6edce16652750e7ae Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 27 Mar 2022 15:43:03 +0200 Subject: [PATCH 07/23] Colorize test outputs --- .tests/scripts/.lib.sh | 46 +++++++++++++++++++++++++++++++ .tests/tests/vendor-phppgadmin.sh | 44 ++++++++++++++--------------- 2 files changed, 68 insertions(+), 22 deletions(-) diff --git a/.tests/scripts/.lib.sh b/.tests/scripts/.lib.sh index 2a37a601..ff53bd81 100644 --- a/.tests/scripts/.lib.sh +++ b/.tests/scripts/.lib.sh @@ -117,6 +117,52 @@ replace() { } +### +### Print colorized OK message +### +print_succ() { + local leading_nl="${1}" + local trailing_nl="${2}" + local message="${3}" + + local green="\\033[0;32m" + local reset="\\033[0m" + + if [ "${leading_nl}" = "1" ] && [ "${trailing_nl}" = "1" ]; then + printf "\\r${green}[OK]${reset} %s\\n" "${message}" + elif [ "${leading_nl}" = "1" ]; then + printf "\\r${green}[OK]${reset} %s" "${message}" + elif [ "${trailing_nl}" = "1" ]; then + printf "${green}[OK]${reset} %s\\n" "${message}" + else + printf "${green}[OK]${reset} %s" "${message}" + fi +} + + +### +### Print colorized FAIL message +### +print_fail() { + local leading_nl="${1}" + local trailing_nl="${2}" + local message="${3}" + + local red="\\033[0;31m" + local reset="\\033[0m" + + if [ "${leading_nl}" = "1" ] && [ "${trailing_nl}" = "1" ]; then + printf "\\r${red}[FAIL]${reset} %s\\n" "${message}" + elif [ "${leading_nl}" = "1" ]; then + printf "\\r${red}[FAIL]${reset} %s" "${message}" + elif [ "${trailing_nl}" = "1" ]; then + printf "${red}[FAIL]${reset} %s\\n" "${message}" + else + printf "${red}[FAIL]${reset} %s" "${message}" + fi +} + + ### ### Run command ### diff --git a/.tests/tests/vendor-phppgadmin.sh b/.tests/tests/vendor-phppgadmin.sh index ae9c528e..ba0ed4eb 100755 --- a/.tests/tests/vendor-phppgadmin.sh +++ b/.tests/tests/vendor-phppgadmin.sh @@ -60,11 +60,11 @@ if ! URL="$( run "\ | tac \ | grep -Eo '/vendor/phppgadmin-[.0-9]+/'" \ "${RETRIES}" "" "0" )"; then - printf "\\r[FAILED] Retrieve phpPgAdmin URL\\n" + print_fail "1" "1" "Retrieve phpPgAdmin URL" run "curl -sS 'http://localhost:${HOST_PORT_HTTPD}/index.php' || true" exit 1 else - printf "\\r[OK] Retrieve phpPgAdmin URL: %s\\n" "${URL}" + print_succ "1" "1" "Retrieve phpPgAdmin URL: ${URL}" fi @@ -80,18 +80,18 @@ if ! curl -sS --fail "http://localhost:${HOST_PORT_HTTPD}${URL}intro.php" | tac # 3rd Try sleep 1 if ! curl -sS --fail "http://localhost:${HOST_PORT_HTTPD}${URL}intro.php" | tac | tac | grep -Eiq "welcome to phpPgAdmin"; then - printf "\\r[FAIL] Fetch %sintro.php\\n" "${URL}" + print_fail "1" "1" "Fetch ${URL}intro.php" curl -sS "http://localhost:${HOST_PORT_HTTPD}${URL}intro.php" || true curl -sS -I "http://localhost:${HOST_PORT_HTTPD}${URL}intro.php" || true exit 1 else - printf "\\r[OK] Fetch %sintro.php (3 rounds)\\n" "${URL}" + print_succ "1" "1" "Fetch ${URL}intro.php (3 rounds)" fi else - printf "\\r[OK] Fetch %sintro.php (2 rounds)\\n" "${URL}" + print_succ "1" "1" "Fetch ${URL}intro.php (2 rounds)" fi else - printf "\\r[OK] Fetch %sintro.php (1 round)\\n" "${URL}" + print_succ "1" "1" "Fetch ${URL}intro.php (1 round)" fi @@ -106,46 +106,46 @@ LIBPATH="${DVLBOXPATH}/.devilbox/www/htdocs${URL%index\.php}libraries/lib.inc.ph printf "[TEST] config.inc.php exists" if [ ! -f "${CONFIGPATH}" ]; then - printf "\\r[FAIL] config.inc.php exists: no\\n" + print_fail "1" "1" "config.inc.php exists: no" exit 1 else - printf "\\r[OK] config.inc.php exists: yes\\n" + print_succ "1" "1" "config.inc.php exists: yes" fi # $conf['servers'][0]['host'] = 'pgsql'; printf "[TEST] config.inc.php check: \$conf['servers'][0]['host'] = 'pgsql';" if ! grep -E "^[[:space:]]*\\\$conf\\['servers'\\]\\[0\\]\\['host'\\][[:space:]]*=[[:space:]]*'pgsql';" "${CONFIGPATH}" >/dev/null; then - printf "\\r[FAIL] config.inc.php check: \$conf['servers'][0]['host'] = 'pgsql';\\n" + print_fail "1" "1" "config.inc.php check: \$conf['servers'][0]['host'] = 'pgsql';" if ! grep 'servers' "${CONFIGPATH}"; then cat "${CONFIGPATH}" fi exit 1 else - printf "\\r[OK] config.inc.php check: \$conf['servers'][0]['host'] = 'pgsql';\\n" + print_succ "1" "1" "config.inc.php check: \$conf['servers'][0]['host'] = 'pgsql';" fi # $conf['extra_login_security'] = false; printf "[TEST] config.inc.php check: \$conf['extra_login_security'] = false;" if ! grep -E "^[[:space:]]*\\\$conf\\['extra_login_security'\\][[:space:]]*=[[:space:]]*false;" "${CONFIGPATH}" >/dev/null; then - printf "\\r[FAIL] config.inc.php check: \$conf['extra_login_security'] = false;\\n" + print_fail "1" "1" "config.inc.php check: \$conf['extra_login_security'] = false;" if ! grep 'extra_login_security' "${CONFIGPATH}"; then cat "${CONFIGPATH}" fi exit 1 else - printf "\\r[OK] config.inc.php check: \$conf['extra_login_security'] = false;\\n" + print_succ "1" "1" "config.inc.php check: \$conf['extra_login_security'] = false;" fi # error_reporting(E_ERROR | E_WARNING | E_PARSE); printf "[TEST] lib.inc.php check: error_reporting(E_ERROR | E_WARNING | E_PARSE);" if ! grep -E "^[[:space:]]*error_reporting\\(E_ERROR[[:space:]]*\\|[[:space:]]*E_WARNING[[:space:]]*\\|[[:space:]]*E_PARSE\\);" "${LIBPATH}" >/dev/null; then - printf "\\r[FAIL] lib.inc.php check: error_reporting(E_ERROR | E_WARNING | E_PARSE);\\n" + print_fail "1" "1" "lib.inc.php check: error_reporting(E_ERROR | E_WARNING | E_PARSE);" if ! grep 'error_reporting' "${LIBPATH}"; then cat "${LIBPATH}" fi exit 1 else - printf "\\r[OK] lib.inc.php check: error_reporting(E_ERROR | E_WARNING | E_PARSE);\\n" + print_succ "1" "1" "lib.inc.php check: error_reporting(E_ERROR | E_WARNING | E_PARSE);" fi @@ -163,7 +163,7 @@ if [ "${DEVILBOX_VENDOR_PHPPGADMIN_AUTOLOGIN}" != "1" ]; then ### printf "[TEST] Retrieve phpPgAdmin token page" if ! TOKEN_URL="$( run "curl -sS --fail -c cookie.txt 'http://localhost:${HOST_PORT_HTTPD}${URL}servers.php' | tac | tac | grep -Eo '\"redirect\\.php\\?subject=server.+\"' " "${RETRIES}" "" "0" )"; then - printf "\\r[FAIL] Retrieve phpPgAdmin login page\\n" + print_fail "1" "1" "Retrieve phpPgAdmin login page" run "curl -sS 'http://localhost:${HOST_PORT_HTTPD}${URL}servers.php' || true" run "curl -sSI 'http://localhost:${HOST_PORT_HTTPD}${URL}servers.php' || true" rm -f cookie.txt @@ -171,7 +171,7 @@ if [ "${DEVILBOX_VENDOR_PHPPGADMIN_AUTOLOGIN}" != "1" ]; then else TOKEN_URL="${TOKEN_URL//\"/}" TOKEN_URL="${TOKEN_URL//&/&}" - printf "\\r[OK] Retrieve phpPgAdmin token page:%s\\n" "${TOKEN_URL}" + print_succ "1" "1" "Retrieve phpPgAdmin token page: ${TOKEN_URL}" fi ### @@ -180,14 +180,14 @@ if [ "${DEVILBOX_VENDOR_PHPPGADMIN_AUTOLOGIN}" != "1" ]; then printf "[TEST] Retrieve phpPgAdmin login token" # 1st Try if ! TOKEN="$( run "curl -sS --fail -c cookie.txt -b cookie.txt 'http://localhost:${HOST_PORT_HTTPD}${URL}${TOKEN_URL}' | tac | tac | grep -Eo 'loginPassword_[a-zA-Z0-9]+'" "${RETRIES}" "" "0" )"; then - printf "\\r[FAIL] Retrieve phpPgAdmin login token\\n" + print_fail "1" "1" "Retrieve phpPgAdmin login token" run "curl -sS 'http://localhost:${TOKEN_URL_URL}' || true" run "curl -sSI 'http://localhost:${TOKEN_URL_URL}' || true" rm -f cookie.txt exit 1 else TOKEN="$( echo "${TOKEN}" | head -1 )" - printf "\\r[OK] Retrieve phpPgAdmin login token: %s\\n" "${TOKEN}" + print_succ "1" "1" "Retrieve phpPgAdmin login token: ${TOKEN}" fi ### @@ -204,7 +204,7 @@ if [ "${DEVILBOX_VENDOR_PHPPGADMIN_AUTOLOGIN}" != "1" ]; then --data 'loginSubmit=Login' \ 'http://localhost:${HOST_PORT_HTTPD}${URL}redirect.php' 2>/dev/null \ | grep -q 'Create database'" "${RETRIES}" "" "0"; then - printf "\\r[FAIL] Submit phpPgAdmin POST login\\n" + print_fail "1" "1" "Submit phpPgAdmin POST login" run "curl -sS -c cookie.txt -b cookie.txt \ --data 'subject=server' \ --data 'server=pgsql%3A5432%3Aallow' \ @@ -224,7 +224,7 @@ if [ "${DEVILBOX_VENDOR_PHPPGADMIN_AUTOLOGIN}" != "1" ]; then rm -f cookie.txt || true exit 1 else - printf "\\r[OK] Submit phpPgAdmin POST login\\n" + print_succ "1" "1" "Submit phpPgAdmin POST login" fi fi @@ -240,12 +240,12 @@ if [ "$( run "curl -sS --fail \ | tac \ | tac \ | grep -Ec 'data\">(Database|Owner|Collation|Tablespace)'" "${RETRIES}" "" "0" )" != "4" ]; then - printf "\\r[FAIL] Evaluate successful phpPgAdmin login\\n" + print_fail "1" "1" "Evaluate successful phpPgAdmin login" run "curl -sS 'http://localhost:${HOST_PORT_HTTPD}${URL}redirect.php?subject=server&server=pgsql%3A5432%3Aallow&' || true" run "curl -sS -I 'http://localhost:${HOST_PORT_HTTPD}${URL}redirect.php?subject=server&server=pgsql%3A5432%3Aallow&' || true" rm -f cookie.txt || true exit 1 else - printf "\\r[OK] Evaluate successful phpPgAdmin login\\n" + print_succ "1" "1" "Evaluate successful phpPgAdmin login" fi rm -f cookie.txt || true From 71c73f7fb3c9b1ce40e9be819a6f8ed8b2ae50ec Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 27 Mar 2022 16:05:51 +0200 Subject: [PATCH 08/23] Test re-usable workflows --- .../workflows/{ => old}/ci-smoke-linux.yml | 0 .../{ => old}/ci-smoke-macos.yml.off | 0 .github/workflows/{ => old}/documentation.yml | 0 .github/workflows/{ => old}/lint.yml | 0 .github/workflows/{ => old}/test-config.yml | 0 .github/workflows/old/test-versions.yml | 287 ++++++++++++++++++ .github/workflows/params-versions.yml | 125 ++++++++ .github/workflows/test-versions.yml | 275 +---------------- .github/workflows/zzz-reuse-tests.yml | 256 ++++++++++++++++ 9 files changed, 682 insertions(+), 261 deletions(-) rename .github/workflows/{ => old}/ci-smoke-linux.yml (100%) rename .github/workflows/{ => old}/ci-smoke-macos.yml.off (100%) rename .github/workflows/{ => old}/documentation.yml (100%) rename .github/workflows/{ => old}/lint.yml (100%) rename .github/workflows/{ => old}/test-config.yml (100%) create mode 100644 .github/workflows/old/test-versions.yml create mode 100644 .github/workflows/params-versions.yml create mode 100644 .github/workflows/zzz-reuse-tests.yml diff --git a/.github/workflows/ci-smoke-linux.yml b/.github/workflows/old/ci-smoke-linux.yml similarity index 100% rename from .github/workflows/ci-smoke-linux.yml rename to .github/workflows/old/ci-smoke-linux.yml diff --git a/.github/workflows/ci-smoke-macos.yml.off b/.github/workflows/old/ci-smoke-macos.yml.off similarity index 100% rename from .github/workflows/ci-smoke-macos.yml.off rename to .github/workflows/old/ci-smoke-macos.yml.off diff --git a/.github/workflows/documentation.yml b/.github/workflows/old/documentation.yml similarity index 100% rename from .github/workflows/documentation.yml rename to .github/workflows/old/documentation.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/old/lint.yml similarity index 100% rename from .github/workflows/lint.yml rename to .github/workflows/old/lint.yml diff --git a/.github/workflows/test-config.yml b/.github/workflows/old/test-config.yml similarity index 100% rename from .github/workflows/test-config.yml rename to .github/workflows/old/test-config.yml diff --git a/.github/workflows/old/test-versions.yml b/.github/workflows/old/test-versions.yml new file mode 100644 index 00000000..f3a69bd6 --- /dev/null +++ b/.github/workflows/old/test-versions.yml @@ -0,0 +1,287 @@ +--- + +# ------------------------------------------------------------------------------------------------- +# Job Name +# ------------------------------------------------------------------------------------------------- +name: Versions + + +# ------------------------------------------------------------------------------------------------- +# When to run +# ------------------------------------------------------------------------------------------------- +on: + # Runs on Pull Requests + pull_request: + + # Runs on master Branch and Tags + push: + branches: + - master + tags: + - '[0-9]+.[0-9]+*' + + +# ------------------------------------------------------------------------------------------------- +# What to run +# ------------------------------------------------------------------------------------------------- +jobs: + smoke_version: + + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + version: + - "MYSQL_SERVER=mysql-5.5" + - "MYSQL_SERVER=mysql-5.6" + - "MYSQL_SERVER=mysql-5.7" + - "MYSQL_SERVER=mysql-8.0" + - "MYSQL_SERVER=mariadb-5.5" + - "MYSQL_SERVER=mariadb-10.0" + - "MYSQL_SERVER=mariadb-10.1" + - "MYSQL_SERVER=mariadb-10.2" + - "MYSQL_SERVER=mariadb-10.3" + - "MYSQL_SERVER=mariadb-10.4" + - "MYSQL_SERVER=mariadb-10.5" + - "MYSQL_SERVER=mariadb-10.6" + - "MYSQL_SERVER=mariadb-10.7" + - "MYSQL_SERVER=mariadb-10.8" + - "MYSQL_SERVER=percona-5.5" + - "MYSQL_SERVER=percona-5.6" + - "MYSQL_SERVER=percona-5.7" + - "MYSQL_SERVER=percona-8.0" + + - "PGSQL_SERVER=9.0" + - "PGSQL_SERVER=9.1" + - "PGSQL_SERVER=9.2" + - "PGSQL_SERVER=9.2-alpine" + - "PGSQL_SERVER=9.3" + - "PGSQL_SERVER=9.3-alpine" + - "PGSQL_SERVER=9.4" + - "PGSQL_SERVER=9.4-alpine" + - "PGSQL_SERVER=9.5" + - "PGSQL_SERVER=9.5-alpine" + - "PGSQL_SERVER=9.6" + - "PGSQL_SERVER=9.6-alpine" + - "PGSQL_SERVER=10" + - "PGSQL_SERVER=10-alpine" + - "PGSQL_SERVER=11" + - "PGSQL_SERVER=11-alpine" + - "PGSQL_SERVER=12" + - "PGSQL_SERVER=12-alpine" + - "PGSQL_SERVER=13" + - "PGSQL_SERVER=13-alpine" + - "PGSQL_SERVER=14" + - "PGSQL_SERVER=14-alpine" + - "PGSQL_SERVER=latest" + - "PGSQL_SERVER=alpine" + + - "REDIS_SERVER=2.8" + - "REDIS_SERVER=3.0" + - "REDIS_SERVER=3.0-alpine" + - "REDIS_SERVER=3.2" + - "REDIS_SERVER=3.2-alpine" + - "REDIS_SERVER=4.0" + - "REDIS_SERVER=4.0-alpine" + - "REDIS_SERVER=5.0" + - "REDIS_SERVER=5.0-alpine" + - "REDIS_SERVER=6.0" + - "REDIS_SERVER=6.0-alpine" + - "REDIS_SERVER=6.2" + - "REDIS_SERVER=6.2-alpine" + - "REDIS_SERVER=latest" + - "REDIS_SERVER=alpine" + + - "MEMCD_SERVER=1.4" + - "MEMCD_SERVER=1.4-alpine" + - "MEMCD_SERVER=1.5" + - "MEMCD_SERVER=1.5-alpine" + - "MEMCD_SERVER=1.6" + - "MEMCD_SERVER=1.6-alpine" + - "MEMCD_SERVER=latest" + - "MEMCD_SERVER=alpine" + + - "MONGO_SERVER=2.8" + - "MONGO_SERVER=3.0" + - "MONGO_SERVER=3.2" + - "MONGO_SERVER=3.4" + - "MONGO_SERVER=3.6" + - "MONGO_SERVER=4.0" + - "MONGO_SERVER=4.2" + - "MONGO_SERVER=4.4" + - "MONGO_SERVER=5.0" + - "MONGO_SERVER=latest" + name: "[${{ matrix.version }}]" + steps: + + # ------------------------------------------------------------ + # Checkout repository + # ------------------------------------------------------------ + - name: Checkout repository + uses: actions/checkout@v1 + + - name: Show environment + shell: bash + run: | + env + + - name: Show network + shell: bash + run: | + netstat -an || true + ss -tlun || true + + - name: Show Docker version + shell: bash + run: | + docker version + + # ------------------------------------------------------------ + # Setup + # ------------------------------------------------------------ + - name: Configure + shell: bash + run: | + cd .tests/ + # Set the matrix version + make configure KEY="${VERSION//=*/}" VAL="${VERSION//*=}" + # 3306 is taken, so chose another one + make configure KEY=HOST_PORT_MYSQL VAL=3307 + env: + VERSION: ${{ matrix.version }} + + - name: Pull images + shell: bash + run: | + cd .tests/ + make pull + + - name: Startup + shell: bash + run: | + cd .tests/ + make start + + - name: Docker logs + shell: bash + run: | + cd .tests/ + make logs + + # ------------------------------------------------------------ + # Run tests + # ------------------------------------------------------------ + - name: Test Modules + shell: bash + run: | + cd .tests/ + make test-smoke-modules + if: success() || failure() + + - name: Test Config + shell: bash + run: | + cd .tests/ + make test-smoke-config + if: success() || failure() + + - name: Test Intranet + shell: bash + run: | + cd .tests/ + make test-smoke-intranet + if: success() || failure() + + - name: Test Vendors + shell: bash + run: | + cd .tests/ + make test-smoke-vendors + if: success() || failure() + + - name: Test Vhosts + shell: bash + run: | + cd .tests/ + make test-smoke-vhosts + if: success() || failure() + + - name: Test Reverse Proxy + shell: bash + run: | + cd .tests/ + make test-smoke-rproxies + if: success() || failure() + + - name: Test SSL + shell: bash + run: | + cd .tests/ + make test-smoke-ssl + if: success() || failure() + + - name: Test Bind + shell: bash + run: | + cd .tests/ + make test-smoke-bind + if: success() || failure() + + - name: Test Autostart + shell: bash + run: | + cd .tests/ + make test-smoke-autostart + if: success() || failure() + + - name: "Test Framework: CakePHP" + shell: bash + run: | + cd .tests/ + make test-smoke-framework-cakephp + if: success() || failure() + + - name: "Test Framework: Drupal" + shell: bash + run: | + cd .tests/ + make test-smoke-framework-drupal + if: success() || failure() + + - name: "Test Framework: Wordpress" + shell: bash + run: | + cd .tests/ + make test-smoke-framework-wordpress + if: success() || failure() + + - name: "Test Container" + shell: bash + run: | + retry() { + for n in $(seq 5); do + echo "[${n}/5] ${*}"; + if eval "${*}"; then + echo "[SUCC] ${n}/t"; + return 0; + fi; + sleep 5; + echo "[FAIL] ${n}/5"; + done; + return 1; + } + cd .tests/ + retry make test-smoke-container + if: success() || failure() + + # ------------------------------------------------------------ + # Finish + # ------------------------------------------------------------ + + - name: "Finish: Docker logs" + shell: bash + run: | + cd .tests/ + make logs + if: success() || failure() diff --git a/.github/workflows/params-versions.yml b/.github/workflows/params-versions.yml new file mode 100644 index 00000000..cf806189 --- /dev/null +++ b/.github/workflows/params-versions.yml @@ -0,0 +1,125 @@ +--- + +# ------------------------------------------------------------------------------------------------- +# Job Name +# ------------------------------------------------------------------------------------------------- +name: params + + +# ------------------------------------------------------------------------------------------------- +# Custom Variables +# ------------------------------------------------------------------------------------------------- +env: + MATRIX: >- + [ + {"MYSQL_SERVER": "mysql-5.5"}, + {"MYSQL_SERVER": "mysql-5.6"}, + {"MYSQL_SERVER": "mysql-5.7"}, + {"MYSQL_SERVER": "mysql-8.0"}, + {"MYSQL_SERVER": "percona-5.5"}, + {"MYSQL_SERVER": "percona-5.6"}, + {"MYSQL_SERVER": "percona-5.7"}, + {"MYSQL_SERVER": "percona-8.0"}, + {"MYSQL_SERVER": "mariadb-5.5"}, + {"MYSQL_SERVER": "mariadb-10.0"}, + {"MYSQL_SERVER": "mariadb-10.1"}, + {"MYSQL_SERVER": "mariadb-10.2"}, + {"MYSQL_SERVER": "mariadb-10.3"}, + {"MYSQL_SERVER": "mariadb-10.4"}, + {"MYSQL_SERVER": "mariadb-10.5"}, + {"MYSQL_SERVER": "mariadb-10.6"}, + {"MYSQL_SERVER": "mariadb-10.7"}, + {"MYSQL_SERVER": "mariadb-10.8"}, + + {"PGSQL_SERVER": "PgSQL 9.0"}, + {"PGSQL_SERVER": "PgSQL 9.1"}, + {"PGSQL_SERVER": "PgSQL 9.2"}, + {"PGSQL_SERVER": "PgSQL 9.2-alpine"}, + {"PGSQL_SERVER": "PgSQL 9.3"}, + {"PGSQL_SERVER": "PgSQL 9.3-alpine"}, + {"PGSQL_SERVER": "PgSQL 9.4"}, + {"PGSQL_SERVER": "PgSQL 9.4-alpine"}, + {"PGSQL_SERVER": "PgSQL 9.5"}, + {"PGSQL_SERVER": "PgSQL 9.5-alpine"}, + {"PGSQL_SERVER": "PgSQL 9.6"}, + {"PGSQL_SERVER": "PgSQL 9.6-alpine"}, + {"PGSQL_SERVER": "PgSQL 10"}, + {"PGSQL_SERVER": "PgSQL 10-alpine"}, + {"PGSQL_SERVER": "PgSQL 11"}, + {"PGSQL_SERVER": "PgSQL 11-alpine"}, + {"PGSQL_SERVER": "PgSQL 12"}, + {"PGSQL_SERVER": "PgSQL 12-alpine"}, + {"PGSQL_SERVER": "PgSQL 13"}, + {"PGSQL_SERVER": "PgSQL 13-alpine"}, + {"PGSQL_SERVER": "PgSQL 14"}, + {"PGSQL_SERVER": "PgSQL 14-alpine"}, + {"PGSQL_SERVER": "PgSQL latest"}, + {"PGSQL_SERVER": "PgSQL alpine"}, + + {"REDIS_SERVER": "Redis 2.8"}, + {"REDIS_SERVER": "Redis 3.0"}, + {"REDIS_SERVER": "Redis 3.0-alpine"}, + {"REDIS_SERVER": "Redis 3.2"}, + {"REDIS_SERVER": "Redis 3.2-alpine"}, + {"REDIS_SERVER": "Redis 4.0"}, + {"REDIS_SERVER": "Redis 4.0-alpine"}, + {"REDIS_SERVER": "Redis 5.0"}, + {"REDIS_SERVER": "Redis 5.0-alpine"}, + {"REDIS_SERVER": "Redis 6.0"}, + {"REDIS_SERVER": "Redis 6.0-alpine"}, + {"REDIS_SERVER": "Redis 6.2"}, + {"REDIS_SERVER": "Redis 6.2-alpine"}, + {"REDIS_SERVER": "Redis latest"}, + {"REDIS_SERVER": "Redis alpine"}, + + {"MEMCD_SERVER": "Memcd 1.4"}, + {"MEMCD_SERVER": "Memcd 1.4-alpine"}, + {"MEMCD_SERVER": "Memcd 1.5"}, + {"MEMCD_SERVER": "Memcd 1.5-alpine"}, + {"MEMCD_SERVER": "Memcd 1.6"}, + {"MEMCD_SERVER": "Memcd 1.6-alpine"}, + {"MEMCD_SERVER": "Memcd latest"}, + {"MEMCD_SERVER": "Memcd alpine"}, + + {"MONGO_SERVER": "Mongo 2.8"}, + {"MONGO_SERVER": "Mongo 3.0"}, + {"MONGO_SERVER": "Mongo 3.2"}, + {"MONGO_SERVER": "Mongo 3.4"}, + {"MONGO_SERVER": "Mongo 3.6"}, + {"MONGO_SERVER": "Mongo 4.0"}, + {"MONGO_SERVER": "Mongo 4.2"}, + {"MONGO_SERVER": "Mongo 4.4"}, + {"MONGO_SERVER": "Mongo 5.0"}, + {"MONGO_SERVER": "Mongo latest"} + ] + + +# ------------------------------------------------------------------------------------------------- +# When to run +# ------------------------------------------------------------------------------------------------- +on: + workflow_call: + outputs: + matrix: + description: "The determined version matrix" + value: ${{ jobs.params.outputs.matrix }} + +jobs: + params: + runs-on: ubuntu-latest + + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + + steps: + - name: "[Set-Output] Matrix" + id: set-matrix + run: | + echo "::set-output name=matrix::$( echo '${{ env.MATRIX }}' | jq -M -c )" + + - name: "[DEBUG] Show settings'" + run: | + echo 'Matrix' + echo '--------------------' + echo '${{ steps.set-matrix.outputs.matrix }}' + echo diff --git a/.github/workflows/test-versions.yml b/.github/workflows/test-versions.yml index f3a69bd6..ad780b54 100644 --- a/.github/workflows/test-versions.yml +++ b/.github/workflows/test-versions.yml @@ -21,267 +21,20 @@ on: - '[0-9]+.[0-9]+*' -# ------------------------------------------------------------------------------------------------- -# What to run -# ------------------------------------------------------------------------------------------------- jobs: - smoke_version: + # ----------------------------------------------------------------------------------------------- + # (1/2) Determine parameter settings + # ----------------------------------------------------------------------------------------------- + params: + uses: ./.github/workflows/params-versions.yml - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - version: - - "MYSQL_SERVER=mysql-5.5" - - "MYSQL_SERVER=mysql-5.6" - - "MYSQL_SERVER=mysql-5.7" - - "MYSQL_SERVER=mysql-8.0" - - "MYSQL_SERVER=mariadb-5.5" - - "MYSQL_SERVER=mariadb-10.0" - - "MYSQL_SERVER=mariadb-10.1" - - "MYSQL_SERVER=mariadb-10.2" - - "MYSQL_SERVER=mariadb-10.3" - - "MYSQL_SERVER=mariadb-10.4" - - "MYSQL_SERVER=mariadb-10.5" - - "MYSQL_SERVER=mariadb-10.6" - - "MYSQL_SERVER=mariadb-10.7" - - "MYSQL_SERVER=mariadb-10.8" - - "MYSQL_SERVER=percona-5.5" - - "MYSQL_SERVER=percona-5.6" - - "MYSQL_SERVER=percona-5.7" - - "MYSQL_SERVER=percona-8.0" - - - "PGSQL_SERVER=9.0" - - "PGSQL_SERVER=9.1" - - "PGSQL_SERVER=9.2" - - "PGSQL_SERVER=9.2-alpine" - - "PGSQL_SERVER=9.3" - - "PGSQL_SERVER=9.3-alpine" - - "PGSQL_SERVER=9.4" - - "PGSQL_SERVER=9.4-alpine" - - "PGSQL_SERVER=9.5" - - "PGSQL_SERVER=9.5-alpine" - - "PGSQL_SERVER=9.6" - - "PGSQL_SERVER=9.6-alpine" - - "PGSQL_SERVER=10" - - "PGSQL_SERVER=10-alpine" - - "PGSQL_SERVER=11" - - "PGSQL_SERVER=11-alpine" - - "PGSQL_SERVER=12" - - "PGSQL_SERVER=12-alpine" - - "PGSQL_SERVER=13" - - "PGSQL_SERVER=13-alpine" - - "PGSQL_SERVER=14" - - "PGSQL_SERVER=14-alpine" - - "PGSQL_SERVER=latest" - - "PGSQL_SERVER=alpine" - - - "REDIS_SERVER=2.8" - - "REDIS_SERVER=3.0" - - "REDIS_SERVER=3.0-alpine" - - "REDIS_SERVER=3.2" - - "REDIS_SERVER=3.2-alpine" - - "REDIS_SERVER=4.0" - - "REDIS_SERVER=4.0-alpine" - - "REDIS_SERVER=5.0" - - "REDIS_SERVER=5.0-alpine" - - "REDIS_SERVER=6.0" - - "REDIS_SERVER=6.0-alpine" - - "REDIS_SERVER=6.2" - - "REDIS_SERVER=6.2-alpine" - - "REDIS_SERVER=latest" - - "REDIS_SERVER=alpine" - - - "MEMCD_SERVER=1.4" - - "MEMCD_SERVER=1.4-alpine" - - "MEMCD_SERVER=1.5" - - "MEMCD_SERVER=1.5-alpine" - - "MEMCD_SERVER=1.6" - - "MEMCD_SERVER=1.6-alpine" - - "MEMCD_SERVER=latest" - - "MEMCD_SERVER=alpine" - - - "MONGO_SERVER=2.8" - - "MONGO_SERVER=3.0" - - "MONGO_SERVER=3.2" - - "MONGO_SERVER=3.4" - - "MONGO_SERVER=3.6" - - "MONGO_SERVER=4.0" - - "MONGO_SERVER=4.2" - - "MONGO_SERVER=4.4" - - "MONGO_SERVER=5.0" - - "MONGO_SERVER=latest" - name: "[${{ matrix.version }}]" - steps: - - # ------------------------------------------------------------ - # Checkout repository - # ------------------------------------------------------------ - - name: Checkout repository - uses: actions/checkout@v1 - - - name: Show environment - shell: bash - run: | - env - - - name: Show network - shell: bash - run: | - netstat -an || true - ss -tlun || true - - - name: Show Docker version - shell: bash - run: | - docker version - - # ------------------------------------------------------------ - # Setup - # ------------------------------------------------------------ - - name: Configure - shell: bash - run: | - cd .tests/ - # Set the matrix version - make configure KEY="${VERSION//=*/}" VAL="${VERSION//*=}" - # 3306 is taken, so chose another one - make configure KEY=HOST_PORT_MYSQL VAL=3307 - env: - VERSION: ${{ matrix.version }} - - - name: Pull images - shell: bash - run: | - cd .tests/ - make pull - - - name: Startup - shell: bash - run: | - cd .tests/ - make start - - - name: Docker logs - shell: bash - run: | - cd .tests/ - make logs - - # ------------------------------------------------------------ - # Run tests - # ------------------------------------------------------------ - - name: Test Modules - shell: bash - run: | - cd .tests/ - make test-smoke-modules - if: success() || failure() - - - name: Test Config - shell: bash - run: | - cd .tests/ - make test-smoke-config - if: success() || failure() - - - name: Test Intranet - shell: bash - run: | - cd .tests/ - make test-smoke-intranet - if: success() || failure() - - - name: Test Vendors - shell: bash - run: | - cd .tests/ - make test-smoke-vendors - if: success() || failure() - - - name: Test Vhosts - shell: bash - run: | - cd .tests/ - make test-smoke-vhosts - if: success() || failure() - - - name: Test Reverse Proxy - shell: bash - run: | - cd .tests/ - make test-smoke-rproxies - if: success() || failure() - - - name: Test SSL - shell: bash - run: | - cd .tests/ - make test-smoke-ssl - if: success() || failure() - - - name: Test Bind - shell: bash - run: | - cd .tests/ - make test-smoke-bind - if: success() || failure() - - - name: Test Autostart - shell: bash - run: | - cd .tests/ - make test-smoke-autostart - if: success() || failure() - - - name: "Test Framework: CakePHP" - shell: bash - run: | - cd .tests/ - make test-smoke-framework-cakephp - if: success() || failure() - - - name: "Test Framework: Drupal" - shell: bash - run: | - cd .tests/ - make test-smoke-framework-drupal - if: success() || failure() - - - name: "Test Framework: Wordpress" - shell: bash - run: | - cd .tests/ - make test-smoke-framework-wordpress - if: success() || failure() - - - name: "Test Container" - shell: bash - run: | - retry() { - for n in $(seq 5); do - echo "[${n}/5] ${*}"; - if eval "${*}"; then - echo "[SUCC] ${n}/t"; - return 0; - fi; - sleep 5; - echo "[FAIL] ${n}/5"; - done; - return 1; - } - cd .tests/ - retry make test-smoke-container - if: success() || failure() - - # ------------------------------------------------------------ - # Finish - # ------------------------------------------------------------ - - - name: "Finish: Docker logs" - shell: bash - run: | - cd .tests/ - make logs - if: success() || failure() + # ----------------------------------------------------------------------------------------------- + # (2/2) Configure Build and Deploy Matrices + # ----------------------------------------------------------------------------------------------- + test: + needs: [params] + uses: ./.github/workflows/zzz-reuse-tests.yml + with: + matrix: ${{ needs.params.outputs.matrix }} + custom_config: false diff --git a/.github/workflows/zzz-reuse-tests.yml b/.github/workflows/zzz-reuse-tests.yml new file mode 100644 index 00000000..1f2532af --- /dev/null +++ b/.github/workflows/zzz-reuse-tests.yml @@ -0,0 +1,256 @@ +--- +name: Reusable worfklow for tests + +on: + workflow_call: + ### + ### Variables + ### + inputs: + matrix: + description: 'The test matrix' + required: true + type: string + custom_config: + description: 'Apply customized .env configuration?' + required: true + type: boolean + +jobs: + # ----------------------------------------------------------------------------------------------- + # JOB: BUILD + # ----------------------------------------------------------------------------------------------- + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: ${{ fromJson(inputs.matrix) }} + steps: + + # ------------------------------------------------------------ + # Setup repository + # ------------------------------------------------------------ + - name: "[SETUP] Checkout repository (current)" + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: "[DEBUG] Show Matrix configuration" + run: | + echo '${{ toJson(matrix) }}' | jq -r + + - name: "[DEBUG] Show environment" + shell: bash + run: | + env + + - name: "[DEBUG] Show network" + shell: bash + run: | + netstat -an || true + ss -tlun || true + + - name: "[DEBUG] Show Docker version" + shell: bash + run: | + docker version + + # ------------------------------------------------------------ + # Configure + # ------------------------------------------------------------ + - name: "[Configure] Configure customized configuration" + run: | + cd "${GITHUB_WORKSPACE}/.tests/" + + # Test full customization + make configure KEY=DEBUG_COMPOSE_ENTRYPOINT VAL="$(( RANDOM % 3 ))" + make configure KEY=DOCKER_LOGS VAL="$(( RANDOM % 1 ))" + make configure KEY=TLD_SUFFIX VAL=loc2 + make configure KEY=TIMEZONE VAL='Europe/Berlin' + make configure KEY=PHP_MODULES_DISABLE VAL= + make configure KEY=HTTPD_TEMPLATE_DIR VAL=.config + make configure KEY=HOST_PORT_HTTPD VAL=8080 + make configure KEY=HOST_PORT_HTTPD_SSL VAL=8443 + make configure KEY=MYSQL_ROOT_PASSWORD VAL=mysqlpass + make configure KEY=PGSQL_ROOT_USER VAL=pgroot + make configure KEY=PGSQL_ROOT_PASSWORD VAL=pgsqlpass + make configure KEY=DEVILBOX_VENDOR_PHPMYADMIN_AUTOLOGIN VAL=0 + if: inputs.custom_config + + - name: "[Configure] Configure versions" + run: | + # (1/3) Change to .tests/ directory + cd "${GITHUB_WORKSPACE}/.tests/" + + # (2/3) Change MySQL port 3306 to 3307 (3306 is already taken) + make configure KEY=HOST_PORT_MYSQL VAL=3307 + + # (3/3) Loop over configured values + while IFS= read -r line; do + KEY="${line}" + VAL="$( echo '${{ toJson(matrix) }}' | jq -r ".${KEY}" | awk '{print $NF}' )" + echo "KEY: ${KEY}" + echo "VAL: ${VAL}" + + # Set the matrix version + make configure KEY="${KEY}" VAL="${VAL}" + done <<< "$( echo '${{ toJson(matrix) }}' | jq -r 'keys[]' )" + + # ------------------------------------------------------------ + # Startup + # ------------------------------------------------------------ + - name: "[Startup] Pull images" + uses: cytopia/shell-command-retry-action@v0.1.3 + with: + retries: 3 + workdir: "${{ github.workspace }}/.tests/" + command: | + make pull + + - name: "[Startup] Start Devilbox" + uses: cytopia/shell-command-retry-action@v0.1.3 + with: + retries: 3 + workdir: "${{ github.workspace }}/.tests/" + command: | + make start + + - name: "[Startup] Show Docker logs" + uses: cytopia/shell-command-retry-action@v0.1.3 + with: + retries: 3 + workdir: "${{ github.workspace }}/.tests/" + command: | + make logs + + # ------------------------------------------------------------ + # Run tests + # ------------------------------------------------------------ + - name: Test Modules + uses: cytopia/shell-command-retry-action@v0.1.3 + with: + retries: 3 + workdir: "${{ github.workspace }}/.tests/" + command: | + make test-smoke-modules + + - name: Test Config + uses: cytopia/shell-command-retry-action@v0.1.3 + with: + retries: 3 + workdir: "${{ github.workspace }}/.tests/" + command: | + make test-smoke-config + if: success() || failure() + + - name: Test Intranet + uses: cytopia/shell-command-retry-action@v0.1.3 + with: + retries: 3 + workdir: "${{ github.workspace }}/.tests/" + command: | + make test-smoke-intranet + if: success() || failure() + + - name: Test Vendors + uses: cytopia/shell-command-retry-action@v0.1.3 + with: + retries: 3 + workdir: "${{ github.workspace }}/.tests/" + command: | + make test-smoke-vendors + if: success() || failure() + + - name: Test Vhosts + uses: cytopia/shell-command-retry-action@v0.1.3 + with: + retries: 3 + workdir: "${{ github.workspace }}/.tests/" + command: | + make test-smoke-vhosts + if: success() || failure() + + - name: Test Reverse Proxy + uses: cytopia/shell-command-retry-action@v0.1.3 + with: + retries: 3 + workdir: "${{ github.workspace }}/.tests/" + command: | + make test-smoke-rproxies + if: success() || failure() + + - name: Test SSL + uses: cytopia/shell-command-retry-action@v0.1.3 + with: + retries: 3 + workdir: "${{ github.workspace }}/.tests/" + command: | + make test-smoke-ssl + if: success() || failure() + + - name: Test Bind + uses: cytopia/shell-command-retry-action@v0.1.3 + with: + retries: 3 + workdir: "${{ github.workspace }}/.tests/" + command: | + make test-smoke-bind + if: success() || failure() + + - name: Test Autostart + uses: cytopia/shell-command-retry-action@v0.1.3 + with: + retries: 3 + workdir: "${{ github.workspace }}/.tests/" + command: | + make test-smoke-autostart + if: success() || failure() + + - name: "Test Framework: CakePHP" + uses: cytopia/shell-command-retry-action@v0.1.3 + with: + retries: 3 + workdir: "${{ github.workspace }}/.tests/" + command: | + make test-smoke-framework-cakephp + if: success() || failure() + + - name: "Test Framework: Drupal" + uses: cytopia/shell-command-retry-action@v0.1.3 + with: + retries: 3 + workdir: "${{ github.workspace }}/.tests/" + command: | + make test-smoke-framework-drupal + if: success() || failure() + + - name: "Test Framework: Wordpress" + uses: cytopia/shell-command-retry-action@v0.1.3 + with: + retries: 3 + workdir: "${{ github.workspace }}/.tests/" + command: | + make test-smoke-framework-wordpress + if: success() || failure() + + - name: "Test Container" + uses: cytopia/shell-command-retry-action@v0.1.3 + with: + retries: 3 + workdir: "${{ github.workspace }}/.tests/" + command: | + make test-smoke-container + if: success() || failure() + + # ------------------------------------------------------------ + # Finish + # ------------------------------------------------------------ + - name: "Finish: Docker logs" + uses: cytopia/shell-command-retry-action@v0.1.3 + with: + retries: 3 + workdir: "${{ github.workspace }}/.tests/" + command: | + make logs + if: success() || failure() From a5e0a54c5fea8a0294f4b6d486e9be9cc89f47eb Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 27 Mar 2022 18:10:52 +0200 Subject: [PATCH 09/23] Reorganize integration tests --- .github/workflows/{old => }/documentation.yml | 30 +- .github/workflows/{old => }/lint.yml | 1 - .github/workflows/old/ci-smoke-linux.yml | 228 -------------- .github/workflows/old/ci-smoke-macos.yml.off | 262 ---------------- .github/workflows/old/test-config.yml | 242 --------------- .github/workflows/old/test-versions.yml | 287 ------------------ .github/workflows/params-config.yml | 97 ++++++ .github/workflows/params-version-memcd.yml | 54 ++++ .github/workflows/params-version-mongo.yml | 56 ++++ .github/workflows/params-version-mysql.yml | 64 ++++ ...-versions.yml => params-version-pgsql.yml} | 57 +--- .github/workflows/params-version-redis.yml | 61 ++++ .github/workflows/test-config.yml | 52 ++++ ...st-versions.yml => test-version-memcd.yml} | 21 +- .github/workflows/test-version-mongo.yml | 53 ++++ .github/workflows/test-version-mysql.yml | 53 ++++ .github/workflows/test-version-pgsql.yml | 53 ++++ .github/workflows/test-version-redis.yml | 53 ++++ .github/workflows/zzz-reuse-tests.yml | 16 +- 19 files changed, 635 insertions(+), 1105 deletions(-) rename .github/workflows/{old => }/documentation.yml (69%) rename .github/workflows/{old => }/lint.yml (99%) delete mode 100644 .github/workflows/old/ci-smoke-linux.yml delete mode 100644 .github/workflows/old/ci-smoke-macos.yml.off delete mode 100644 .github/workflows/old/test-config.yml delete mode 100644 .github/workflows/old/test-versions.yml create mode 100644 .github/workflows/params-config.yml create mode 100644 .github/workflows/params-version-memcd.yml create mode 100644 .github/workflows/params-version-mongo.yml create mode 100644 .github/workflows/params-version-mysql.yml rename .github/workflows/{params-versions.yml => params-version-pgsql.yml} (52%) create mode 100644 .github/workflows/params-version-redis.yml create mode 100644 .github/workflows/test-config.yml rename .github/workflows/{test-versions.yml => test-version-memcd.yml} (65%) create mode 100644 .github/workflows/test-version-mongo.yml create mode 100644 .github/workflows/test-version-mysql.yml create mode 100644 .github/workflows/test-version-pgsql.yml create mode 100644 .github/workflows/test-version-redis.yml diff --git a/.github/workflows/old/documentation.yml b/.github/workflows/documentation.yml similarity index 69% rename from .github/workflows/old/documentation.yml rename to .github/workflows/documentation.yml index 6d686336..b8183a53 100644 --- a/.github/workflows/old/documentation.yml +++ b/.github/workflows/documentation.yml @@ -17,7 +17,6 @@ on: push: branches: - master - tags: # ------------------------------------------------------------------------------------------------- @@ -25,9 +24,7 @@ on: # ------------------------------------------------------------------------------------------------- jobs: docs: - runs-on: ubuntu-latest - strategy: fail-fast: false matrix: @@ -46,24 +43,9 @@ jobs: uses: actions/checkout@v1 - name: Check documentation - shell: bash - run: | - retry() { - for n in $(seq ${RETRIES}); do - echo "[${n}/${RETRIES}] ${*}"; - if eval "${*}"; then - echo "[SUCC] ${n}/${RETRIES}"; - return 0; - fi; - sleep ${PAUSE}; - echo "[FAIL] ${n}/${RETRIES}"; - done; - return 1; - } - - cd docs - retry make ${TARGET} - env: - TARGET: ${{ matrix.target }} - RETRIES: 20 - PAUSE: 10 + uses: cytopia/shell-command-retry-action@v0.1.3 + with: + retries: 5 + workdir: "${{ github.workspace }}/docs/" + command: | + make ${{ matrix.target }} diff --git a/.github/workflows/old/lint.yml b/.github/workflows/lint.yml similarity index 99% rename from .github/workflows/old/lint.yml rename to .github/workflows/lint.yml index 4296262e..c33c5b09 100644 --- a/.github/workflows/old/lint.yml +++ b/.github/workflows/lint.yml @@ -17,7 +17,6 @@ on: push: branches: - master - tags: # ------------------------------------------------------------------------------------------------- diff --git a/.github/workflows/old/ci-smoke-linux.yml b/.github/workflows/old/ci-smoke-linux.yml deleted file mode 100644 index fb6411bd..00000000 --- a/.github/workflows/old/ci-smoke-linux.yml +++ /dev/null @@ -1,228 +0,0 @@ ---- - -# ------------------------------------------------------------------------------------------------- -# Job Name -# ------------------------------------------------------------------------------------------------- -name: Linux - - -# ------------------------------------------------------------------------------------------------- -# When to run -# ------------------------------------------------------------------------------------------------- -on: - # Runs on Pull Requests - pull_request: - - # Runs on master Branch and Tags - push: - branches: - - master - tags: - - '[0-9]+.[0-9]+*' - - -# ------------------------------------------------------------------------------------------------- -# What to run -# ------------------------------------------------------------------------------------------------- -jobs: - smoke_linux: - - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - php: - - "5.3" - - "5.4" - - "5.5" - - "5.6" - - "7.0" - - "7.1" - - "7.2" - - "7.3" - - "7.4" - - "8.0" - - "8.1" - - "8.2" - httpd: - - "apache-2.2" - - "apache-2.4" - - "nginx-stable" - - "nginx-mainline" - - name: "[PHP ${{ matrix.php }}] vs [${{ matrix.httpd }}]" - steps: - - # ------------------------------------------------------------ - # Checkout repository - # ------------------------------------------------------------ - - name: Checkout repository - uses: actions/checkout@v1 - - - name: Show environment - shell: bash - run: | - env - - - name: Show network - shell: bash - run: | - netstat -an || true - ss -tlun || true - - - name: Show Docker version - shell: bash - run: | - docker version - - # ------------------------------------------------------------ - # Setup - # ------------------------------------------------------------ - - name: Configure - shell: bash - run: | - cd .tests/ - # Set the two candidates to test against - make configure KEY=PHP_SERVER VAL=${PHP} - make configure KEY=HTTPD_SERVER VAL=${HTTPD} - # 3306 is taken, so chose another one - make configure KEY=HOST_PORT_MYSQL VAL=3307 - env: - PHP: ${{ matrix.php }} - HTTPD: ${{ matrix.httpd }} - - - name: Pull images - shell: bash - run: | - cd .tests/ - make pull - - - name: Startup - shell: bash - run: | - cd .tests/ - make start - - - name: Docker logs - shell: bash - run: | - cd .tests/ - make logs - - # ------------------------------------------------------------ - # Run tests - # ------------------------------------------------------------ - - name: Test Modules - shell: bash - run: | - cd .tests/ - make test-smoke-modules - if: success() || failure() - - - name: Test Config - shell: bash - run: | - cd .tests/ - make test-smoke-config - if: success() || failure() - - - name: Test Intranet - shell: bash - run: | - cd .tests/ - make test-smoke-intranet - if: success() || failure() - - - name: Test Vendors - shell: bash - run: | - cd .tests/ - make test-smoke-vendors - if: success() || failure() - - - name: Test Vhosts - shell: bash - run: | - cd .tests/ - make test-smoke-vhosts - if: success() || failure() - - - name: Test Reverse Proxy - shell: bash - run: | - cd .tests/ - make test-smoke-rproxies - if: success() || failure() - - - name: Test SSL - shell: bash - run: | - cd .tests/ - make test-smoke-ssl - if: success() || failure() - - - name: Test Bind - shell: bash - run: | - cd .tests/ - make test-smoke-bind - if: success() || failure() - - - name: Test Autostart - shell: bash - run: | - cd .tests/ - make test-smoke-autostart - if: success() || failure() - - - name: "Test Framework: CakePHP" - shell: bash - run: | - cd .tests/ - make test-smoke-framework-cakephp - if: success() || failure() - - - name: "Test Framework: Drupal" - shell: bash - run: | - cd .tests/ - make test-smoke-framework-drupal - if: success() || failure() - - - name: "Test Framework: Wordpress" - shell: bash - run: | - cd .tests/ - make test-smoke-framework-wordpress - if: success() || failure() - - - name: "Test Container" - shell: bash - run: | - retry() { - for n in $(seq 5); do - echo "[${n}/5] ${*}"; - if eval "${*}"; then - echo "[SUCC] ${n}/5"; - return 0; - fi; - sleep 5; - echo "[FAIL] ${n}/5"; - done; - return 1; - } - cd .tests/ - retry make test-smoke-container - if: success() || failure() - - # ------------------------------------------------------------ - # Finish - # ------------------------------------------------------------ - - - name: "Finish: Docker logs" - shell: bash - run: | - cd .tests/ - make logs - if: success() || failure() diff --git a/.github/workflows/old/ci-smoke-macos.yml.off b/.github/workflows/old/ci-smoke-macos.yml.off deleted file mode 100644 index ce84531f..00000000 --- a/.github/workflows/old/ci-smoke-macos.yml.off +++ /dev/null @@ -1,262 +0,0 @@ ---- - -# ------------------------------------------------------------------------------------------------- -# Job Name -# ------------------------------------------------------------------------------------------------- -name: MacOS - - -# ------------------------------------------------------------------------------------------------- -# When to run -# ------------------------------------------------------------------------------------------------- -on: - # Runs on Pull Requests - pull_request: - - # Runs on master Branch and Tags - push: - branches: - - master - tags: - - '[0-9]+.[0-9]+*' - - -# ------------------------------------------------------------------------------------------------- -# What to run -# ------------------------------------------------------------------------------------------------- -jobs: - smoke_macos: - - runs-on: macos-latest - - strategy: - fail-fast: false - matrix: - php: - - "7.2" - httpd: - - "nginx-stable" - - name: "[PHP ${{ matrix.php }}] vs [${{ matrix.httpd }}]" - steps: - - # ------------------------------------------------------------ - # Checkout repository - # ------------------------------------------------------------ - - name: Checkout repository - uses: actions/checkout@v1 - - - name: "[Pre] Install Requirements" - shell: bash - run: | - brew install coreutils - brew install bash - brew install socat - - - name: "[Pre] Install Docker" - shell: bash - run: | - brew install docker docker-machine-driver-xhyve - sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve - sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve - while ! docker-machine create --driver xhyve default; do - docker-machine rm -f default - sleep 1; - done - # Export variable (this target) - eval "$(docker-machine env default)" - DOCKER_TLS_VERIFY="$( docker-machine env default | grep DOCKER_TLS_VERIFY | sed -e 's/.*="//g' -e 's/"$//g' )" - DOCKER_HOST="$( docker-machine env default | grep DOCKER_HOST | sed -e 's/.*="//g' -e 's/"$//g' )" - DOCKER_CERT_PATH="$( docker-machine env default | grep DOCKER_CERT_PATH | sed -e 's/.*="//g' -e 's/"$//g' )" - DOCKER_MACHINE_NAME="$( docker-machine env default | grep DOCKER_MACHINE_NAME | sed -e 's/.*="//g' -e 's/"$//g' )" - # Export variable (this other targets) - # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions#set-an-environment-variable-set-env - echo ::set-env name=DOCKER_TLS_VERIFY::${DOCKER_TLS_VERIFY} - echo ::set-env name=DOCKER_HOST::${DOCKER_HOST} - echo ::set-env name=DOCKER_CERT_PATH::${DOCKER_CERT_PATH} - echo ::set-env name=DOCKER_MACHINE_NAME::${DOCKER_MACHINE_NAME} - # Show info - docker-machine ls - docker-machine env default - docker version - - - name: "[Pre] Install Docker Compose" - shell: bash - run: | - sudo curl -L https://github.com/docker/compose/releases/download/1.25.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose - sudo chmod +x /usr/local/bin/docker-compose - docker-compose version - - - name: "[Pre] Setup Docker machine" - shell: bash - run: | - # Setup DNS records - echo "127.0.0.1 localhost" | sudo tee -a /etc/hosts - - # Portforwarding from DOCKER_HOST to local - HOST="$( echo "${DOCKER_HOST}" | sed -e 's|^tcp://||g' -e 's|:.*||g' )" - echo "${HOST}" - sudo socat -s -d -d tcp-listen:80,reuseaddr,fork tcp:${HOST}:80 & - sleep 2 - sudo socat -s -d -d tcp-listen:443,reuseaddr,fork tcp:${HOST}:443 & - sleep 2 - if ! netstat -an | grep -i LISTEN | grep -E '(:80)|(\.80)\s'; then - netstat -an | grep -i LISTEN; - false; - fi - if ! netstat -an | grep -i LISTEN | grep -E '(:443)|(\.443)\s'; then - netstat -an | grep -i LISTEN; - false; - fi - host localhost - curl -sS -I 'http://localhost:80' || true - curl -sS -I 'https://localhost:443' || true - - - name: "[Info] Show environment" - shell: bash - run: | - env - if: success() || failure() - - - name: "[Info] Show network" - shell: bash - run: | - netstat -an || true - ss -tlun || true - if: success() || failure() - - # ------------------------------------------------------------ - # Setup - # ------------------------------------------------------------ - - name: Configure - shell: bash - run: | - cd .tests/ - # Set the two candidates to test against - make configure KEY=PHP_SERVER VAL=${PHP} - make configure KEY=HTTPD_SERVER VAL=${HTTPD} - # 3306 is taken, so chose another one - make configure KEY=HOST_PORT_MYSQL VAL=3307 - env: - PHP: ${{ matrix.php }} - HTTPD: ${{ matrix.httpd }} - if: success() || failure() - - - name: Pull images - shell: bash - run: | - cd .tests/ - make pull - if: success() || failure() - - - name: Startup - shell: bash - run: | - cd .tests/ - make start - if: success() || failure() - - - name: Docker logs - shell: bash - run: | - cd .tests/ - make logs - if: success() || failure() - - # ------------------------------------------------------------ - # Run tests - # ------------------------------------------------------------ - - name: Test Modules - shell: bash - run: | - cd .tests/ - make test-smoke-modules - if: success() || failure() - - - name: Test Config - shell: bash - run: | - cd .tests/ - make test-smoke-config - if: success() || failure() - - - name: Test Intranet - shell: bash - run: | - cd .tests/ - make test-smoke-intranet - if: success() || failure() - - - name: Test Vendors - shell: bash - run: | - cd .tests/ - make test-smoke-vendors - if: success() || failure() - - - name: Test Vhosts - shell: bash - run: | - cd .tests/ - make test-smoke-vhosts - if: success() || failure() - - - name: Test Reverse Proxy - shell: bash - run: | - cd .tests/ - make test-smoke-rproxies - if: success() || failure() - - - name: Test SSL - shell: bash - run: | - cd .tests/ - make test-smoke-ssl - if: success() || failure() - - - name: Test Bind - shell: bash - run: | - cd .tests/ - make test-smoke-bind - if: success() || failure() - - - name: Test Autostart - shell: bash - run: | - cd .tests/ - make test-smoke-autostart - if: success() || failure() - - - name: "Test Framework: CakePHP" - shell: bash - run: | - cd .tests/ - make test-smoke-framework-cakephp - if: success() || failure() - - - name: "Test Framework: Drupal" - shell: bash - run: | - cd .tests/ - make test-smoke-framework-drupal - if: success() || failure() - - - name: "Test Framework: Wordpress" - shell: bash - run: | - cd .tests/ - make test-smoke-framework-wordpress - if: success() || failure() - - # ------------------------------------------------------------ - # Finish - # ------------------------------------------------------------ - - - name: "[Post] Docker logs" - shell: bash - run: | - cd .tests/ - make logs - if: success() || failure() diff --git a/.github/workflows/old/test-config.yml b/.github/workflows/old/test-config.yml deleted file mode 100644 index d5798bb5..00000000 --- a/.github/workflows/old/test-config.yml +++ /dev/null @@ -1,242 +0,0 @@ ---- - -# ------------------------------------------------------------------------------------------------- -# Job Name -# ------------------------------------------------------------------------------------------------- -name: Config - - -# ------------------------------------------------------------------------------------------------- -# When to run -# ------------------------------------------------------------------------------------------------- -on: - # Runs on Pull Requests - pull_request: - - # Runs on master Branch and Tags - push: - branches: - - master - tags: - - '[0-9]+.[0-9]+*' - - -# ------------------------------------------------------------------------------------------------- -# What to run -# ------------------------------------------------------------------------------------------------- -jobs: - test_config: - - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - php: - - "5.3" - - "5.4" - - "5.5" - - "5.6" - - "7.0" - - "7.1" - - "7.2" - - "7.3" - - "7.4" - - "8.0" - - "8.1" - - "8.2" - httpd: - - "apache-2.2" - - "apache-2.4" - - "nginx-stable" - - "nginx-mainline" - - name: "[PHP ${{ matrix.php }}] vs [${{ matrix.httpd }}]" - steps: - - # ------------------------------------------------------------ - # Checkout repository - # ------------------------------------------------------------ - - name: Checkout repository - uses: actions/checkout@v1 - - - name: Show environment - shell: bash - run: | - env - - - name: Show network - shell: bash - run: | - netstat -an || true - ss -tlun || true - - - name: Show Docker version - shell: bash - run: | - docker version - - # ------------------------------------------------------------ - # Setup - # ------------------------------------------------------------ - - name: Configure - shell: bash - run: | - cd .tests/ - # Set the two candidates to test against - make configure KEY=PHP_SERVER VAL=${PHP} - make configure KEY=HTTPD_SERVER VAL=${HTTPD} - # 3306 is taken, so chose another one - make configure KEY=HOST_PORT_MYSQL VAL=3307 - - # Test full customization - make configure KEY=DEBUG_COMPOSE_ENTRYPOINT VAL="$(( RANDOM % 3 ))" - make configure KEY=DOCKER_LOGS VAL="$(( RANDOM % 1 ))" - make configure KEY=TLD_SUFFIX VAL=loc2 - make configure KEY=TIMEZONE VAL='Europe/Berlin' - make configure KEY=PHP_MODULES_DISABLE VAL= - make configure KEY=HTTPD_TEMPLATE_DIR VAL=.config - make configure KEY=HOST_PORT_HTTPD VAL=8080 - make configure KEY=HOST_PORT_HTTPD_SSL VAL=8443 - make configure KEY=MYSQL_ROOT_PASSWORD VAL=mysqlpass - make configure KEY=PGSQL_ROOT_USER VAL=pgroot - make configure KEY=PGSQL_ROOT_PASSWORD VAL=pgsqlpass - make configure KEY=DEVILBOX_VENDOR_PHPMYADMIN_AUTOLOGIN VAL=0 - env: - PHP: ${{ matrix.php }} - HTTPD: ${{ matrix.httpd }} - - - name: Pull images - shell: bash - run: | - cd .tests/ - make pull - - - name: Startup - shell: bash - run: | - cd .tests/ - make start - - - name: Docker logs - shell: bash - run: | - cd .tests/ - make logs - - # ------------------------------------------------------------ - # Run tests - # ------------------------------------------------------------ - - name: Test Modules - shell: bash - run: | - cd .tests/ - make test-smoke-modules - if: success() || failure() - - - name: Test Config - shell: bash - run: | - cd .tests/ - make test-smoke-config - if: success() || failure() - - - name: Test Intranet - shell: bash - run: | - cd .tests/ - make test-smoke-intranet - if: success() || failure() - - - name: Test Vendors - shell: bash - run: | - cd .tests/ - make test-smoke-vendors - if: success() || failure() - - - name: Test Vhosts - shell: bash - run: | - cd .tests/ - make test-smoke-vhosts - if: success() || failure() - - - name: Test Reverse Proxy - shell: bash - run: | - cd .tests/ - make test-smoke-rproxies - if: success() || failure() - - - name: Test SSL - shell: bash - run: | - cd .tests/ - make test-smoke-ssl - if: success() || failure() - - - name: Test Bind - shell: bash - run: | - cd .tests/ - make test-smoke-bind - if: success() || failure() - - - name: Test Autostart - shell: bash - run: | - cd .tests/ - make test-smoke-autostart - if: success() || failure() - - - name: "Test Framework: CakePHP" - shell: bash - run: | - cd .tests/ - make test-smoke-framework-cakephp - if: success() || failure() - - - name: "Test Framework: Drupal" - shell: bash - run: | - cd .tests/ - make test-smoke-framework-drupal - if: success() || failure() - - - name: "Test Framework: Wordpress" - shell: bash - run: | - cd .tests/ - make test-smoke-framework-wordpress - if: success() || failure() - - - name: "Test Container" - shell: bash - run: | - retry() { - for n in $(seq 5); do - echo "[${n}/5] ${*}"; - if eval "${*}"; then - echo "[SUCC] ${n}/t"; - return 0; - fi; - sleep 5; - echo "[FAIL] ${n}/5"; - done; - return 1; - } - cd .tests/ - retry make test-smoke-container - if: success() || failure() - - # ------------------------------------------------------------ - # Finish - # ------------------------------------------------------------ - - - name: "Finish: Docker logs" - shell: bash - run: | - cd .tests/ - make logs - if: success() || failure() diff --git a/.github/workflows/old/test-versions.yml b/.github/workflows/old/test-versions.yml deleted file mode 100644 index f3a69bd6..00000000 --- a/.github/workflows/old/test-versions.yml +++ /dev/null @@ -1,287 +0,0 @@ ---- - -# ------------------------------------------------------------------------------------------------- -# Job Name -# ------------------------------------------------------------------------------------------------- -name: Versions - - -# ------------------------------------------------------------------------------------------------- -# When to run -# ------------------------------------------------------------------------------------------------- -on: - # Runs on Pull Requests - pull_request: - - # Runs on master Branch and Tags - push: - branches: - - master - tags: - - '[0-9]+.[0-9]+*' - - -# ------------------------------------------------------------------------------------------------- -# What to run -# ------------------------------------------------------------------------------------------------- -jobs: - smoke_version: - - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - version: - - "MYSQL_SERVER=mysql-5.5" - - "MYSQL_SERVER=mysql-5.6" - - "MYSQL_SERVER=mysql-5.7" - - "MYSQL_SERVER=mysql-8.0" - - "MYSQL_SERVER=mariadb-5.5" - - "MYSQL_SERVER=mariadb-10.0" - - "MYSQL_SERVER=mariadb-10.1" - - "MYSQL_SERVER=mariadb-10.2" - - "MYSQL_SERVER=mariadb-10.3" - - "MYSQL_SERVER=mariadb-10.4" - - "MYSQL_SERVER=mariadb-10.5" - - "MYSQL_SERVER=mariadb-10.6" - - "MYSQL_SERVER=mariadb-10.7" - - "MYSQL_SERVER=mariadb-10.8" - - "MYSQL_SERVER=percona-5.5" - - "MYSQL_SERVER=percona-5.6" - - "MYSQL_SERVER=percona-5.7" - - "MYSQL_SERVER=percona-8.0" - - - "PGSQL_SERVER=9.0" - - "PGSQL_SERVER=9.1" - - "PGSQL_SERVER=9.2" - - "PGSQL_SERVER=9.2-alpine" - - "PGSQL_SERVER=9.3" - - "PGSQL_SERVER=9.3-alpine" - - "PGSQL_SERVER=9.4" - - "PGSQL_SERVER=9.4-alpine" - - "PGSQL_SERVER=9.5" - - "PGSQL_SERVER=9.5-alpine" - - "PGSQL_SERVER=9.6" - - "PGSQL_SERVER=9.6-alpine" - - "PGSQL_SERVER=10" - - "PGSQL_SERVER=10-alpine" - - "PGSQL_SERVER=11" - - "PGSQL_SERVER=11-alpine" - - "PGSQL_SERVER=12" - - "PGSQL_SERVER=12-alpine" - - "PGSQL_SERVER=13" - - "PGSQL_SERVER=13-alpine" - - "PGSQL_SERVER=14" - - "PGSQL_SERVER=14-alpine" - - "PGSQL_SERVER=latest" - - "PGSQL_SERVER=alpine" - - - "REDIS_SERVER=2.8" - - "REDIS_SERVER=3.0" - - "REDIS_SERVER=3.0-alpine" - - "REDIS_SERVER=3.2" - - "REDIS_SERVER=3.2-alpine" - - "REDIS_SERVER=4.0" - - "REDIS_SERVER=4.0-alpine" - - "REDIS_SERVER=5.0" - - "REDIS_SERVER=5.0-alpine" - - "REDIS_SERVER=6.0" - - "REDIS_SERVER=6.0-alpine" - - "REDIS_SERVER=6.2" - - "REDIS_SERVER=6.2-alpine" - - "REDIS_SERVER=latest" - - "REDIS_SERVER=alpine" - - - "MEMCD_SERVER=1.4" - - "MEMCD_SERVER=1.4-alpine" - - "MEMCD_SERVER=1.5" - - "MEMCD_SERVER=1.5-alpine" - - "MEMCD_SERVER=1.6" - - "MEMCD_SERVER=1.6-alpine" - - "MEMCD_SERVER=latest" - - "MEMCD_SERVER=alpine" - - - "MONGO_SERVER=2.8" - - "MONGO_SERVER=3.0" - - "MONGO_SERVER=3.2" - - "MONGO_SERVER=3.4" - - "MONGO_SERVER=3.6" - - "MONGO_SERVER=4.0" - - "MONGO_SERVER=4.2" - - "MONGO_SERVER=4.4" - - "MONGO_SERVER=5.0" - - "MONGO_SERVER=latest" - name: "[${{ matrix.version }}]" - steps: - - # ------------------------------------------------------------ - # Checkout repository - # ------------------------------------------------------------ - - name: Checkout repository - uses: actions/checkout@v1 - - - name: Show environment - shell: bash - run: | - env - - - name: Show network - shell: bash - run: | - netstat -an || true - ss -tlun || true - - - name: Show Docker version - shell: bash - run: | - docker version - - # ------------------------------------------------------------ - # Setup - # ------------------------------------------------------------ - - name: Configure - shell: bash - run: | - cd .tests/ - # Set the matrix version - make configure KEY="${VERSION//=*/}" VAL="${VERSION//*=}" - # 3306 is taken, so chose another one - make configure KEY=HOST_PORT_MYSQL VAL=3307 - env: - VERSION: ${{ matrix.version }} - - - name: Pull images - shell: bash - run: | - cd .tests/ - make pull - - - name: Startup - shell: bash - run: | - cd .tests/ - make start - - - name: Docker logs - shell: bash - run: | - cd .tests/ - make logs - - # ------------------------------------------------------------ - # Run tests - # ------------------------------------------------------------ - - name: Test Modules - shell: bash - run: | - cd .tests/ - make test-smoke-modules - if: success() || failure() - - - name: Test Config - shell: bash - run: | - cd .tests/ - make test-smoke-config - if: success() || failure() - - - name: Test Intranet - shell: bash - run: | - cd .tests/ - make test-smoke-intranet - if: success() || failure() - - - name: Test Vendors - shell: bash - run: | - cd .tests/ - make test-smoke-vendors - if: success() || failure() - - - name: Test Vhosts - shell: bash - run: | - cd .tests/ - make test-smoke-vhosts - if: success() || failure() - - - name: Test Reverse Proxy - shell: bash - run: | - cd .tests/ - make test-smoke-rproxies - if: success() || failure() - - - name: Test SSL - shell: bash - run: | - cd .tests/ - make test-smoke-ssl - if: success() || failure() - - - name: Test Bind - shell: bash - run: | - cd .tests/ - make test-smoke-bind - if: success() || failure() - - - name: Test Autostart - shell: bash - run: | - cd .tests/ - make test-smoke-autostart - if: success() || failure() - - - name: "Test Framework: CakePHP" - shell: bash - run: | - cd .tests/ - make test-smoke-framework-cakephp - if: success() || failure() - - - name: "Test Framework: Drupal" - shell: bash - run: | - cd .tests/ - make test-smoke-framework-drupal - if: success() || failure() - - - name: "Test Framework: Wordpress" - shell: bash - run: | - cd .tests/ - make test-smoke-framework-wordpress - if: success() || failure() - - - name: "Test Container" - shell: bash - run: | - retry() { - for n in $(seq 5); do - echo "[${n}/5] ${*}"; - if eval "${*}"; then - echo "[SUCC] ${n}/t"; - return 0; - fi; - sleep 5; - echo "[FAIL] ${n}/5"; - done; - return 1; - } - cd .tests/ - retry make test-smoke-container - if: success() || failure() - - # ------------------------------------------------------------ - # Finish - # ------------------------------------------------------------ - - - name: "Finish: Docker logs" - shell: bash - run: | - cd .tests/ - make logs - if: success() || failure() diff --git a/.github/workflows/params-config.yml b/.github/workflows/params-config.yml new file mode 100644 index 00000000..4f28e4cf --- /dev/null +++ b/.github/workflows/params-config.yml @@ -0,0 +1,97 @@ +--- + +# ------------------------------------------------------------------------------------------------- +# Job Name +# ------------------------------------------------------------------------------------------------- +name: params + + +# ------------------------------------------------------------------------------------------------- +# Custom Variables +# ------------------------------------------------------------------------------------------------- +env: + MATRIX: >- + [ + {"PHP_SERVER": "PHP 5.3", "HTTPD_SERVER": "apache-2.2"}, + {"PHP_SERVER": "PHP 5.4", "HTTPD_SERVER": "apache-2.2"}, + {"PHP_SERVER": "PHP 5.5", "HTTPD_SERVER": "apache-2.2"}, + {"PHP_SERVER": "PHP 5.6", "HTTPD_SERVER": "apache-2.2"}, + {"PHP_SERVER": "PHP 7.0", "HTTPD_SERVER": "apache-2.2"}, + {"PHP_SERVER": "PHP 7.1", "HTTPD_SERVER": "apache-2.2"}, + {"PHP_SERVER": "PHP 7.2", "HTTPD_SERVER": "apache-2.2"}, + {"PHP_SERVER": "PHP 7.3", "HTTPD_SERVER": "apache-2.2"}, + {"PHP_SERVER": "PHP 7.4", "HTTPD_SERVER": "apache-2.2"}, + {"PHP_SERVER": "PHP 8.0", "HTTPD_SERVER": "apache-2.2"}, + {"PHP_SERVER": "PHP 8.1", "HTTPD_SERVER": "apache-2.2"}, + {"PHP_SERVER": "PHP 8.2", "HTTPD_SERVER": "apache-2.2"}, + + {"PHP_SERVER": "PHP 5.3", "HTTPD_SERVER": "apache-2.4"}, + {"PHP_SERVER": "PHP 5.4", "HTTPD_SERVER": "apache-2.4"}, + {"PHP_SERVER": "PHP 5.5", "HTTPD_SERVER": "apache-2.4"}, + {"PHP_SERVER": "PHP 5.6", "HTTPD_SERVER": "apache-2.4"}, + {"PHP_SERVER": "PHP 7.0", "HTTPD_SERVER": "apache-2.4"}, + {"PHP_SERVER": "PHP 7.1", "HTTPD_SERVER": "apache-2.4"}, + {"PHP_SERVER": "PHP 7.2", "HTTPD_SERVER": "apache-2.4"}, + {"PHP_SERVER": "PHP 7.3", "HTTPD_SERVER": "apache-2.4"}, + {"PHP_SERVER": "PHP 7.4", "HTTPD_SERVER": "apache-2.4"}, + {"PHP_SERVER": "PHP 8.0", "HTTPD_SERVER": "apache-2.4"}, + {"PHP_SERVER": "PHP 8.1", "HTTPD_SERVER": "apache-2.4"}, + {"PHP_SERVER": "PHP 8.2", "HTTPD_SERVER": "apache-2.4"}, + + {"PHP_SERVER": "PHP 5.3", "HTTPD_SERVER": "nginx-stable"}, + {"PHP_SERVER": "PHP 5.4", "HTTPD_SERVER": "nginx-stable"}, + {"PHP_SERVER": "PHP 5.5", "HTTPD_SERVER": "nginx-stable"}, + {"PHP_SERVER": "PHP 5.6", "HTTPD_SERVER": "nginx-stable"}, + {"PHP_SERVER": "PHP 7.0", "HTTPD_SERVER": "nginx-stable"}, + {"PHP_SERVER": "PHP 7.1", "HTTPD_SERVER": "nginx-stable"}, + {"PHP_SERVER": "PHP 7.2", "HTTPD_SERVER": "nginx-stable"}, + {"PHP_SERVER": "PHP 7.3", "HTTPD_SERVER": "nginx-stable"}, + {"PHP_SERVER": "PHP 7.4", "HTTPD_SERVER": "nginx-stable"}, + {"PHP_SERVER": "PHP 8.0", "HTTPD_SERVER": "nginx-stable"}, + {"PHP_SERVER": "PHP 8.1", "HTTPD_SERVER": "nginx-stable"}, + {"PHP_SERVER": "PHP 8.2", "HTTPD_SERVER": "nginx-stable"}, + + {"PHP_SERVER": "PHP 5.3", "HTTPD_SERVER": "nginx-mainline"}, + {"PHP_SERVER": "PHP 5.4", "HTTPD_SERVER": "nginx-mainline"}, + {"PHP_SERVER": "PHP 5.5", "HTTPD_SERVER": "nginx-mainline"}, + {"PHP_SERVER": "PHP 5.6", "HTTPD_SERVER": "nginx-mainline"}, + {"PHP_SERVER": "PHP 7.0", "HTTPD_SERVER": "nginx-mainline"}, + {"PHP_SERVER": "PHP 7.1", "HTTPD_SERVER": "nginx-mainline"}, + {"PHP_SERVER": "PHP 7.2", "HTTPD_SERVER": "nginx-mainline"}, + {"PHP_SERVER": "PHP 7.3", "HTTPD_SERVER": "nginx-mainline"}, + {"PHP_SERVER": "PHP 7.4", "HTTPD_SERVER": "nginx-mainline"}, + {"PHP_SERVER": "PHP 8.0", "HTTPD_SERVER": "nginx-mainline"}, + {"PHP_SERVER": "PHP 8.1", "HTTPD_SERVER": "nginx-mainline"}, + {"PHP_SERVER": "PHP 8.2", "HTTPD_SERVER": "nginx-mainline"} + ] + + +# ------------------------------------------------------------------------------------------------- +# When to run +# ------------------------------------------------------------------------------------------------- +on: + workflow_call: + outputs: + matrix: + description: "The determined version matrix" + value: ${{ jobs.params.outputs.matrix }} + +jobs: + params: + runs-on: ubuntu-latest + + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + + steps: + - name: "[Set-Output] Matrix" + id: set-matrix + run: | + echo "::set-output name=matrix::$( echo '${{ env.MATRIX }}' | jq -M -c )" + + - name: "[DEBUG] Show settings'" + run: | + echo 'Matrix' + echo '--------------------' + echo '${{ steps.set-matrix.outputs.matrix }}' + echo diff --git a/.github/workflows/params-version-memcd.yml b/.github/workflows/params-version-memcd.yml new file mode 100644 index 00000000..82ffdef1 --- /dev/null +++ b/.github/workflows/params-version-memcd.yml @@ -0,0 +1,54 @@ +--- + +# ------------------------------------------------------------------------------------------------- +# Job Name +# ------------------------------------------------------------------------------------------------- +name: params + + +# ------------------------------------------------------------------------------------------------- +# Custom Variables +# ------------------------------------------------------------------------------------------------- +env: + MATRIX: >- + [ + {"MEMCD_SERVER": "Memcd 1.4"}, + {"MEMCD_SERVER": "Memcd 1.4-alpine"}, + {"MEMCD_SERVER": "Memcd 1.5"}, + {"MEMCD_SERVER": "Memcd 1.5-alpine"}, + {"MEMCD_SERVER": "Memcd 1.6"}, + {"MEMCD_SERVER": "Memcd 1.6-alpine"}, + {"MEMCD_SERVER": "Memcd latest"}, + {"MEMCD_SERVER": "Memcd alpine"} + ] + + +# ------------------------------------------------------------------------------------------------- +# When to run +# ------------------------------------------------------------------------------------------------- +on: + workflow_call: + outputs: + matrix: + description: "The determined version matrix" + value: ${{ jobs.params.outputs.matrix }} + +jobs: + params: + runs-on: ubuntu-latest + + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + + steps: + - name: "[Set-Output] Matrix" + id: set-matrix + run: | + echo "::set-output name=matrix::$( echo '${{ env.MATRIX }}' | jq -M -c )" + + - name: "[DEBUG] Show settings'" + run: | + echo 'Matrix' + echo '--------------------' + echo '${{ steps.set-matrix.outputs.matrix }}' + echo diff --git a/.github/workflows/params-version-mongo.yml b/.github/workflows/params-version-mongo.yml new file mode 100644 index 00000000..11caa1a5 --- /dev/null +++ b/.github/workflows/params-version-mongo.yml @@ -0,0 +1,56 @@ +--- + +# ------------------------------------------------------------------------------------------------- +# Job Name +# ------------------------------------------------------------------------------------------------- +name: params + + +# ------------------------------------------------------------------------------------------------- +# Custom Variables +# ------------------------------------------------------------------------------------------------- +env: + MATRIX: >- + [ + {"MONGO_SERVER": "Mongo 2.8"}, + {"MONGO_SERVER": "Mongo 3.0"}, + {"MONGO_SERVER": "Mongo 3.2"}, + {"MONGO_SERVER": "Mongo 3.4"}, + {"MONGO_SERVER": "Mongo 3.6"}, + {"MONGO_SERVER": "Mongo 4.0"}, + {"MONGO_SERVER": "Mongo 4.2"}, + {"MONGO_SERVER": "Mongo 4.4"}, + {"MONGO_SERVER": "Mongo 5.0"}, + {"MONGO_SERVER": "Mongo latest"} + ] + + +# ------------------------------------------------------------------------------------------------- +# When to run +# ------------------------------------------------------------------------------------------------- +on: + workflow_call: + outputs: + matrix: + description: "The determined version matrix" + value: ${{ jobs.params.outputs.matrix }} + +jobs: + params: + runs-on: ubuntu-latest + + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + + steps: + - name: "[Set-Output] Matrix" + id: set-matrix + run: | + echo "::set-output name=matrix::$( echo '${{ env.MATRIX }}' | jq -M -c )" + + - name: "[DEBUG] Show settings'" + run: | + echo 'Matrix' + echo '--------------------' + echo '${{ steps.set-matrix.outputs.matrix }}' + echo diff --git a/.github/workflows/params-version-mysql.yml b/.github/workflows/params-version-mysql.yml new file mode 100644 index 00000000..c255618d --- /dev/null +++ b/.github/workflows/params-version-mysql.yml @@ -0,0 +1,64 @@ +--- + +# ------------------------------------------------------------------------------------------------- +# Job Name +# ------------------------------------------------------------------------------------------------- +name: params + + +# ------------------------------------------------------------------------------------------------- +# Custom Variables +# ------------------------------------------------------------------------------------------------- +env: + MATRIX: >- + [ + {"MYSQL_SERVER": "mysql-5.5"}, + {"MYSQL_SERVER": "mysql-5.6"}, + {"MYSQL_SERVER": "mysql-5.7"}, + {"MYSQL_SERVER": "mysql-8.0"}, + {"MYSQL_SERVER": "percona-5.5"}, + {"MYSQL_SERVER": "percona-5.6"}, + {"MYSQL_SERVER": "percona-5.7"}, + {"MYSQL_SERVER": "percona-8.0"}, + {"MYSQL_SERVER": "mariadb-5.5"}, + {"MYSQL_SERVER": "mariadb-10.0"}, + {"MYSQL_SERVER": "mariadb-10.1"}, + {"MYSQL_SERVER": "mariadb-10.2"}, + {"MYSQL_SERVER": "mariadb-10.3"}, + {"MYSQL_SERVER": "mariadb-10.4"}, + {"MYSQL_SERVER": "mariadb-10.5"}, + {"MYSQL_SERVER": "mariadb-10.6"}, + {"MYSQL_SERVER": "mariadb-10.7"}, + {"MYSQL_SERVER": "mariadb-10.8"} + ] + + +# ------------------------------------------------------------------------------------------------- +# When to run +# ------------------------------------------------------------------------------------------------- +on: + workflow_call: + outputs: + matrix: + description: "The determined version matrix" + value: ${{ jobs.params.outputs.matrix }} + +jobs: + params: + runs-on: ubuntu-latest + + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + + steps: + - name: "[Set-Output] Matrix" + id: set-matrix + run: | + echo "::set-output name=matrix::$( echo '${{ env.MATRIX }}' | jq -M -c )" + + - name: "[DEBUG] Show settings'" + run: | + echo 'Matrix' + echo '--------------------' + echo '${{ steps.set-matrix.outputs.matrix }}' + echo diff --git a/.github/workflows/params-versions.yml b/.github/workflows/params-version-pgsql.yml similarity index 52% rename from .github/workflows/params-versions.yml rename to .github/workflows/params-version-pgsql.yml index cf806189..1d9a8630 100644 --- a/.github/workflows/params-versions.yml +++ b/.github/workflows/params-version-pgsql.yml @@ -12,25 +12,6 @@ name: params env: MATRIX: >- [ - {"MYSQL_SERVER": "mysql-5.5"}, - {"MYSQL_SERVER": "mysql-5.6"}, - {"MYSQL_SERVER": "mysql-5.7"}, - {"MYSQL_SERVER": "mysql-8.0"}, - {"MYSQL_SERVER": "percona-5.5"}, - {"MYSQL_SERVER": "percona-5.6"}, - {"MYSQL_SERVER": "percona-5.7"}, - {"MYSQL_SERVER": "percona-8.0"}, - {"MYSQL_SERVER": "mariadb-5.5"}, - {"MYSQL_SERVER": "mariadb-10.0"}, - {"MYSQL_SERVER": "mariadb-10.1"}, - {"MYSQL_SERVER": "mariadb-10.2"}, - {"MYSQL_SERVER": "mariadb-10.3"}, - {"MYSQL_SERVER": "mariadb-10.4"}, - {"MYSQL_SERVER": "mariadb-10.5"}, - {"MYSQL_SERVER": "mariadb-10.6"}, - {"MYSQL_SERVER": "mariadb-10.7"}, - {"MYSQL_SERVER": "mariadb-10.8"}, - {"PGSQL_SERVER": "PgSQL 9.0"}, {"PGSQL_SERVER": "PgSQL 9.1"}, {"PGSQL_SERVER": "PgSQL 9.2"}, @@ -54,43 +35,7 @@ env: {"PGSQL_SERVER": "PgSQL 14"}, {"PGSQL_SERVER": "PgSQL 14-alpine"}, {"PGSQL_SERVER": "PgSQL latest"}, - {"PGSQL_SERVER": "PgSQL alpine"}, - - {"REDIS_SERVER": "Redis 2.8"}, - {"REDIS_SERVER": "Redis 3.0"}, - {"REDIS_SERVER": "Redis 3.0-alpine"}, - {"REDIS_SERVER": "Redis 3.2"}, - {"REDIS_SERVER": "Redis 3.2-alpine"}, - {"REDIS_SERVER": "Redis 4.0"}, - {"REDIS_SERVER": "Redis 4.0-alpine"}, - {"REDIS_SERVER": "Redis 5.0"}, - {"REDIS_SERVER": "Redis 5.0-alpine"}, - {"REDIS_SERVER": "Redis 6.0"}, - {"REDIS_SERVER": "Redis 6.0-alpine"}, - {"REDIS_SERVER": "Redis 6.2"}, - {"REDIS_SERVER": "Redis 6.2-alpine"}, - {"REDIS_SERVER": "Redis latest"}, - {"REDIS_SERVER": "Redis alpine"}, - - {"MEMCD_SERVER": "Memcd 1.4"}, - {"MEMCD_SERVER": "Memcd 1.4-alpine"}, - {"MEMCD_SERVER": "Memcd 1.5"}, - {"MEMCD_SERVER": "Memcd 1.5-alpine"}, - {"MEMCD_SERVER": "Memcd 1.6"}, - {"MEMCD_SERVER": "Memcd 1.6-alpine"}, - {"MEMCD_SERVER": "Memcd latest"}, - {"MEMCD_SERVER": "Memcd alpine"}, - - {"MONGO_SERVER": "Mongo 2.8"}, - {"MONGO_SERVER": "Mongo 3.0"}, - {"MONGO_SERVER": "Mongo 3.2"}, - {"MONGO_SERVER": "Mongo 3.4"}, - {"MONGO_SERVER": "Mongo 3.6"}, - {"MONGO_SERVER": "Mongo 4.0"}, - {"MONGO_SERVER": "Mongo 4.2"}, - {"MONGO_SERVER": "Mongo 4.4"}, - {"MONGO_SERVER": "Mongo 5.0"}, - {"MONGO_SERVER": "Mongo latest"} + {"PGSQL_SERVER": "PgSQL alpine"} ] diff --git a/.github/workflows/params-version-redis.yml b/.github/workflows/params-version-redis.yml new file mode 100644 index 00000000..212376bb --- /dev/null +++ b/.github/workflows/params-version-redis.yml @@ -0,0 +1,61 @@ +--- + +# ------------------------------------------------------------------------------------------------- +# Job Name +# ------------------------------------------------------------------------------------------------- +name: params + + +# ------------------------------------------------------------------------------------------------- +# Custom Variables +# ------------------------------------------------------------------------------------------------- +env: + MATRIX: >- + [ + {"REDIS_SERVER": "Redis 2.8"}, + {"REDIS_SERVER": "Redis 3.0"}, + {"REDIS_SERVER": "Redis 3.0-alpine"}, + {"REDIS_SERVER": "Redis 3.2"}, + {"REDIS_SERVER": "Redis 3.2-alpine"}, + {"REDIS_SERVER": "Redis 4.0"}, + {"REDIS_SERVER": "Redis 4.0-alpine"}, + {"REDIS_SERVER": "Redis 5.0"}, + {"REDIS_SERVER": "Redis 5.0-alpine"}, + {"REDIS_SERVER": "Redis 6.0"}, + {"REDIS_SERVER": "Redis 6.0-alpine"}, + {"REDIS_SERVER": "Redis 6.2"}, + {"REDIS_SERVER": "Redis 6.2-alpine"}, + {"REDIS_SERVER": "Redis latest"}, + {"REDIS_SERVER": "Redis alpine"} + ] + + +# ------------------------------------------------------------------------------------------------- +# When to run +# ------------------------------------------------------------------------------------------------- +on: + workflow_call: + outputs: + matrix: + description: "The determined version matrix" + value: ${{ jobs.params.outputs.matrix }} + +jobs: + params: + runs-on: ubuntu-latest + + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + + steps: + - name: "[Set-Output] Matrix" + id: set-matrix + run: | + echo "::set-output name=matrix::$( echo '${{ env.MATRIX }}' | jq -M -c )" + + - name: "[DEBUG] Show settings'" + run: | + echo 'Matrix' + echo '--------------------' + echo '${{ steps.set-matrix.outputs.matrix }}' + echo diff --git a/.github/workflows/test-config.yml b/.github/workflows/test-config.yml new file mode 100644 index 00000000..135029cc --- /dev/null +++ b/.github/workflows/test-config.yml @@ -0,0 +1,52 @@ +--- + +# ------------------------------------------------------------------------------------------------- +# Job Name +# ------------------------------------------------------------------------------------------------- +name: Config + + +# ------------------------------------------------------------------------------------------------- +# When to run +# ------------------------------------------------------------------------------------------------- +on: + # Runs on Pull Requests + pull_request: + + # Runs on master Branch and Tags + push: + branches: + - master + tags: + - '[0-9]+.[0-9]+*' + + +jobs: + # ----------------------------------------------------------------------------------------------- + # (1/3) Determine parameter settings + # ----------------------------------------------------------------------------------------------- + params: + uses: ./.github/workflows/params-config.yml + + + # ----------------------------------------------------------------------------------------------- + # (2/3) Test with default settings + # ----------------------------------------------------------------------------------------------- + default: + needs: [params] + uses: ./.github/workflows/zzz-reuse-tests.yml + with: + matrix: ${{ needs.params.outputs.matrix }} + custom_config: false + operating_system: ubuntu-latest + + # ----------------------------------------------------------------------------------------------- + # (3/3) Test with customizedt settings + # ----------------------------------------------------------------------------------------------- + custom: + needs: [params] + uses: ./.github/workflows/zzz-reuse-tests.yml + with: + matrix: ${{ needs.params.outputs.matrix }} + custom_config: true + operating_system: ubuntu-latest diff --git a/.github/workflows/test-versions.yml b/.github/workflows/test-version-memcd.yml similarity index 65% rename from .github/workflows/test-versions.yml rename to .github/workflows/test-version-memcd.yml index ad780b54..d3cac3e4 100644 --- a/.github/workflows/test-versions.yml +++ b/.github/workflows/test-version-memcd.yml @@ -23,18 +23,31 @@ on: jobs: # ----------------------------------------------------------------------------------------------- - # (1/2) Determine parameter settings + # (1/3) Determine parameter settings # ----------------------------------------------------------------------------------------------- params: - uses: ./.github/workflows/params-versions.yml + uses: ./.github/workflows/params-version-memcd.yml # ----------------------------------------------------------------------------------------------- - # (2/2) Configure Build and Deploy Matrices + # (2/3) Test with default settings # ----------------------------------------------------------------------------------------------- - test: + default: needs: [params] uses: ./.github/workflows/zzz-reuse-tests.yml with: matrix: ${{ needs.params.outputs.matrix }} custom_config: false + operating_system: ubuntu-latest + + + # ----------------------------------------------------------------------------------------------- + # (3/3) Test with customizedt settings + # ----------------------------------------------------------------------------------------------- + custom: + needs: [params] + uses: ./.github/workflows/zzz-reuse-tests.yml + with: + matrix: ${{ needs.params.outputs.matrix }} + custom_config: true + operating_system: ubuntu-latest diff --git a/.github/workflows/test-version-mongo.yml b/.github/workflows/test-version-mongo.yml new file mode 100644 index 00000000..3cb670f6 --- /dev/null +++ b/.github/workflows/test-version-mongo.yml @@ -0,0 +1,53 @@ +--- + +# ------------------------------------------------------------------------------------------------- +# Job Name +# ------------------------------------------------------------------------------------------------- +name: Versions + + +# ------------------------------------------------------------------------------------------------- +# When to run +# ------------------------------------------------------------------------------------------------- +on: + # Runs on Pull Requests + pull_request: + + # Runs on master Branch and Tags + push: + branches: + - master + tags: + - '[0-9]+.[0-9]+*' + + +jobs: + # ----------------------------------------------------------------------------------------------- + # (1/3) Determine parameter settings + # ----------------------------------------------------------------------------------------------- + params: + uses: ./.github/workflows/params-version-mongo.yml + + + # ----------------------------------------------------------------------------------------------- + # (2/3) Test with default settings + # ----------------------------------------------------------------------------------------------- + default: + needs: [params] + uses: ./.github/workflows/zzz-reuse-tests.yml + with: + matrix: ${{ needs.params.outputs.matrix }} + custom_config: false + operating_system: ubuntu-latest + + + # ----------------------------------------------------------------------------------------------- + # (3/3) Test with customizedt settings + # ----------------------------------------------------------------------------------------------- + custom: + needs: [params] + uses: ./.github/workflows/zzz-reuse-tests.yml + with: + matrix: ${{ needs.params.outputs.matrix }} + custom_config: true + operating_system: ubuntu-latest diff --git a/.github/workflows/test-version-mysql.yml b/.github/workflows/test-version-mysql.yml new file mode 100644 index 00000000..04adeb6c --- /dev/null +++ b/.github/workflows/test-version-mysql.yml @@ -0,0 +1,53 @@ +--- + +# ------------------------------------------------------------------------------------------------- +# Job Name +# ------------------------------------------------------------------------------------------------- +name: Versions + + +# ------------------------------------------------------------------------------------------------- +# When to run +# ------------------------------------------------------------------------------------------------- +on: + # Runs on Pull Requests + pull_request: + + # Runs on master Branch and Tags + push: + branches: + - master + tags: + - '[0-9]+.[0-9]+*' + + +jobs: + # ----------------------------------------------------------------------------------------------- + # (1/3) Determine parameter settings + # ----------------------------------------------------------------------------------------------- + params: + uses: ./.github/workflows/params-version-mysql.yml + + + # ----------------------------------------------------------------------------------------------- + # (2/3) Test with default settings + # ----------------------------------------------------------------------------------------------- + default: + needs: [params] + uses: ./.github/workflows/zzz-reuse-tests.yml + with: + matrix: ${{ needs.params.outputs.matrix }} + custom_config: false + operating_system: ubuntu-latest + + + # ----------------------------------------------------------------------------------------------- + # (3/3) Test with customizedt settings + # ----------------------------------------------------------------------------------------------- + custom: + needs: [params] + uses: ./.github/workflows/zzz-reuse-tests.yml + with: + matrix: ${{ needs.params.outputs.matrix }} + custom_config: true + operating_system: ubuntu-latest diff --git a/.github/workflows/test-version-pgsql.yml b/.github/workflows/test-version-pgsql.yml new file mode 100644 index 00000000..2d062b2c --- /dev/null +++ b/.github/workflows/test-version-pgsql.yml @@ -0,0 +1,53 @@ +--- + +# ------------------------------------------------------------------------------------------------- +# Job Name +# ------------------------------------------------------------------------------------------------- +name: Versions + + +# ------------------------------------------------------------------------------------------------- +# When to run +# ------------------------------------------------------------------------------------------------- +on: + # Runs on Pull Requests + pull_request: + + # Runs on master Branch and Tags + push: + branches: + - master + tags: + - '[0-9]+.[0-9]+*' + + +jobs: + # ----------------------------------------------------------------------------------------------- + # (1/3) Determine parameter settings + # ----------------------------------------------------------------------------------------------- + params: + uses: ./.github/workflows/params-version-pgsql.yml + + + # ----------------------------------------------------------------------------------------------- + # (2/3) Test with default settings + # ----------------------------------------------------------------------------------------------- + default: + needs: [params] + uses: ./.github/workflows/zzz-reuse-tests.yml + with: + matrix: ${{ needs.params.outputs.matrix }} + custom_config: false + operating_system: ubuntu-latest + + + # ----------------------------------------------------------------------------------------------- + # (3/3) Test with customizedt settings + # ----------------------------------------------------------------------------------------------- + custom: + needs: [params] + uses: ./.github/workflows/zzz-reuse-tests.yml + with: + matrix: ${{ needs.params.outputs.matrix }} + custom_config: true + operating_system: ubuntu-latest diff --git a/.github/workflows/test-version-redis.yml b/.github/workflows/test-version-redis.yml new file mode 100644 index 00000000..83ba5210 --- /dev/null +++ b/.github/workflows/test-version-redis.yml @@ -0,0 +1,53 @@ +--- + +# ------------------------------------------------------------------------------------------------- +# Job Name +# ------------------------------------------------------------------------------------------------- +name: Versions + + +# ------------------------------------------------------------------------------------------------- +# When to run +# ------------------------------------------------------------------------------------------------- +on: + # Runs on Pull Requests + pull_request: + + # Runs on master Branch and Tags + push: + branches: + - master + tags: + - '[0-9]+.[0-9]+*' + + +jobs: + # ----------------------------------------------------------------------------------------------- + # (1/3) Determine parameter settings + # ----------------------------------------------------------------------------------------------- + params: + uses: ./.github/workflows/params-version-redis.yml + + + # ----------------------------------------------------------------------------------------------- + # (2/3) Test with default settings + # ----------------------------------------------------------------------------------------------- + default: + needs: [params] + uses: ./.github/workflows/zzz-reuse-tests.yml + with: + matrix: ${{ needs.params.outputs.matrix }} + custom_config: false + operating_system: ubuntu-latest + + + # ----------------------------------------------------------------------------------------------- + # (3/3) Test with customizedt settings + # ----------------------------------------------------------------------------------------------- + custom: + needs: [params] + uses: ./.github/workflows/zzz-reuse-tests.yml + with: + matrix: ${{ needs.params.outputs.matrix }} + custom_config: true + operating_system: ubuntu-latest diff --git a/.github/workflows/zzz-reuse-tests.yml b/.github/workflows/zzz-reuse-tests.yml index 1f2532af..ca3d73f2 100644 --- a/.github/workflows/zzz-reuse-tests.yml +++ b/.github/workflows/zzz-reuse-tests.yml @@ -15,13 +15,18 @@ on: description: 'Apply customized .env configuration?' required: true type: boolean + operating_system: + description: 'The operating system to run on' + required: true + type: string + jobs: # ----------------------------------------------------------------------------------------------- # JOB: BUILD # ----------------------------------------------------------------------------------------------- test: - runs-on: ubuntu-latest + runs-on: ${{ inputs.operating_system }} strategy: fail-fast: false matrix: @@ -254,3 +259,12 @@ jobs: command: | make logs if: success() || failure() + + - name: "Finish: Shutdown" + uses: cytopia/shell-command-retry-action@v0.1.3 + with: + retries: 3 + workdir: "${{ github.workspace }}/.tests/" + command: | + make stop + if: success() || failure() From fbef67daac5b13588156dab8071cd942c1fd71d4 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 27 Mar 2022 18:16:14 +0200 Subject: [PATCH 10/23] Rename workflows --- .github/workflows/{params-config.yml => params-php.yml} | 0 .github/workflows/{test-config.yml => test-php.yml} | 4 ++-- .github/workflows/test-version-memcd.yml | 2 +- .github/workflows/test-version-mongo.yml | 2 +- .github/workflows/test-version-mysql.yml | 2 +- .github/workflows/test-version-pgsql.yml | 2 +- .github/workflows/test-version-redis.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) rename .github/workflows/{params-config.yml => params-php.yml} (100%) rename .github/workflows/{test-config.yml => test-php.yml} (96%) diff --git a/.github/workflows/params-config.yml b/.github/workflows/params-php.yml similarity index 100% rename from .github/workflows/params-config.yml rename to .github/workflows/params-php.yml diff --git a/.github/workflows/test-config.yml b/.github/workflows/test-php.yml similarity index 96% rename from .github/workflows/test-config.yml rename to .github/workflows/test-php.yml index 135029cc..105fc661 100644 --- a/.github/workflows/test-config.yml +++ b/.github/workflows/test-php.yml @@ -3,7 +3,7 @@ # ------------------------------------------------------------------------------------------------- # Job Name # ------------------------------------------------------------------------------------------------- -name: Config +name: PHP # ------------------------------------------------------------------------------------------------- @@ -26,7 +26,7 @@ jobs: # (1/3) Determine parameter settings # ----------------------------------------------------------------------------------------------- params: - uses: ./.github/workflows/params-config.yml + uses: ./.github/workflows/params-php.yml # ----------------------------------------------------------------------------------------------- diff --git a/.github/workflows/test-version-memcd.yml b/.github/workflows/test-version-memcd.yml index d3cac3e4..5832ab52 100644 --- a/.github/workflows/test-version-memcd.yml +++ b/.github/workflows/test-version-memcd.yml @@ -3,7 +3,7 @@ # ------------------------------------------------------------------------------------------------- # Job Name # ------------------------------------------------------------------------------------------------- -name: Versions +name: Memcd # ------------------------------------------------------------------------------------------------- diff --git a/.github/workflows/test-version-mongo.yml b/.github/workflows/test-version-mongo.yml index 3cb670f6..96369aa5 100644 --- a/.github/workflows/test-version-mongo.yml +++ b/.github/workflows/test-version-mongo.yml @@ -3,7 +3,7 @@ # ------------------------------------------------------------------------------------------------- # Job Name # ------------------------------------------------------------------------------------------------- -name: Versions +name: Mongo # ------------------------------------------------------------------------------------------------- diff --git a/.github/workflows/test-version-mysql.yml b/.github/workflows/test-version-mysql.yml index 04adeb6c..79b805ea 100644 --- a/.github/workflows/test-version-mysql.yml +++ b/.github/workflows/test-version-mysql.yml @@ -3,7 +3,7 @@ # ------------------------------------------------------------------------------------------------- # Job Name # ------------------------------------------------------------------------------------------------- -name: Versions +name: MySQL # ------------------------------------------------------------------------------------------------- diff --git a/.github/workflows/test-version-pgsql.yml b/.github/workflows/test-version-pgsql.yml index 2d062b2c..e0726820 100644 --- a/.github/workflows/test-version-pgsql.yml +++ b/.github/workflows/test-version-pgsql.yml @@ -3,7 +3,7 @@ # ------------------------------------------------------------------------------------------------- # Job Name # ------------------------------------------------------------------------------------------------- -name: Versions +name: PgSQL # ------------------------------------------------------------------------------------------------- diff --git a/.github/workflows/test-version-redis.yml b/.github/workflows/test-version-redis.yml index 83ba5210..76f1488d 100644 --- a/.github/workflows/test-version-redis.yml +++ b/.github/workflows/test-version-redis.yml @@ -3,7 +3,7 @@ # ------------------------------------------------------------------------------------------------- # Job Name # ------------------------------------------------------------------------------------------------- -name: Versions +name: Redis # ------------------------------------------------------------------------------------------------- From f632cc247f781db4fc92889c8bf4ca94bb30198e Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 27 Mar 2022 18:19:36 +0200 Subject: [PATCH 11/23] Fix Release version in CHANELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9028adee..58809691 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ Make sure to have a look at [UPDATING.md](https://github.com/cytopia/devilbox/bl ## Unreleased -## Release v1.11.0 (2022-04-01) +## Release v1.12.0 (2022-04-01) #### Added - Added CakePHP integration tests for PHP 8+ From 579ae15bcc1276bc39f750f8df43780e87398448 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 27 Mar 2022 19:40:09 +0200 Subject: [PATCH 12/23] Add exceptions for PHP CI to use older PGSQL versions --- .github/workflows/params-php.yml | 38 ++++++++++++++------------- .github/workflows/zzz-reuse-tests.yml | 14 ++++++++-- 2 files changed, 32 insertions(+), 20 deletions(-) diff --git a/.github/workflows/params-php.yml b/.github/workflows/params-php.yml index 4f28e4cf..7b5097d9 100644 --- a/.github/workflows/params-php.yml +++ b/.github/workflows/params-php.yml @@ -10,14 +10,16 @@ name: params # Custom Variables # ------------------------------------------------------------------------------------------------- env: + # Note: Older PHP versions use an older version of phpPgMyAdmin, which does not work with later + # PgSQL server versions. That's why we need to tell those combinations to use an old PgSQL server MATRIX: >- [ - {"PHP_SERVER": "PHP 5.3", "HTTPD_SERVER": "apache-2.2"}, - {"PHP_SERVER": "PHP 5.4", "HTTPD_SERVER": "apache-2.2"}, - {"PHP_SERVER": "PHP 5.5", "HTTPD_SERVER": "apache-2.2"}, - {"PHP_SERVER": "PHP 5.6", "HTTPD_SERVER": "apache-2.2"}, - {"PHP_SERVER": "PHP 7.0", "HTTPD_SERVER": "apache-2.2"}, - {"PHP_SERVER": "PHP 7.1", "HTTPD_SERVER": "apache-2.2"}, + {"PHP_SERVER": "PHP 5.3", "HTTPD_SERVER": "apache-2.2", "PGSQL_SERVER": "PgSQL 12"}, + {"PHP_SERVER": "PHP 5.4", "HTTPD_SERVER": "apache-2.2", "PGSQL_SERVER": "PgSQL 12"}, + {"PHP_SERVER": "PHP 5.5", "HTTPD_SERVER": "apache-2.2", "PGSQL_SERVER": "PgSQL 12"}, + {"PHP_SERVER": "PHP 5.6", "HTTPD_SERVER": "apache-2.2", "PGSQL_SERVER": "PgSQL 12"}, + {"PHP_SERVER": "PHP 7.0", "HTTPD_SERVER": "apache-2.2", "PGSQL_SERVER": "PgSQL 12"}, + {"PHP_SERVER": "PHP 7.1", "HTTPD_SERVER": "apache-2.2", "PGSQL_SERVER": "PgSQL 12"}, {"PHP_SERVER": "PHP 7.2", "HTTPD_SERVER": "apache-2.2"}, {"PHP_SERVER": "PHP 7.3", "HTTPD_SERVER": "apache-2.2"}, {"PHP_SERVER": "PHP 7.4", "HTTPD_SERVER": "apache-2.2"}, @@ -25,12 +27,12 @@ env: {"PHP_SERVER": "PHP 8.1", "HTTPD_SERVER": "apache-2.2"}, {"PHP_SERVER": "PHP 8.2", "HTTPD_SERVER": "apache-2.2"}, - {"PHP_SERVER": "PHP 5.3", "HTTPD_SERVER": "apache-2.4"}, - {"PHP_SERVER": "PHP 5.4", "HTTPD_SERVER": "apache-2.4"}, - {"PHP_SERVER": "PHP 5.5", "HTTPD_SERVER": "apache-2.4"}, - {"PHP_SERVER": "PHP 5.6", "HTTPD_SERVER": "apache-2.4"}, - {"PHP_SERVER": "PHP 7.0", "HTTPD_SERVER": "apache-2.4"}, - {"PHP_SERVER": "PHP 7.1", "HTTPD_SERVER": "apache-2.4"}, + {"PHP_SERVER": "PHP 5.3", "HTTPD_SERVER": "apache-2.4", "PGSQL_SERVER": "PgSQL 12"}, + {"PHP_SERVER": "PHP 5.4", "HTTPD_SERVER": "apache-2.4", "PGSQL_SERVER": "PgSQL 12"}, + {"PHP_SERVER": "PHP 5.5", "HTTPD_SERVER": "apache-2.4", "PGSQL_SERVER": "PgSQL 12"}, + {"PHP_SERVER": "PHP 5.6", "HTTPD_SERVER": "apache-2.4", "PGSQL_SERVER": "PgSQL 12"}, + {"PHP_SERVER": "PHP 7.0", "HTTPD_SERVER": "apache-2.4", "PGSQL_SERVER": "PgSQL 12"}, + {"PHP_SERVER": "PHP 7.1", "HTTPD_SERVER": "apache-2.4", "PGSQL_SERVER": "PgSQL 12"}, {"PHP_SERVER": "PHP 7.2", "HTTPD_SERVER": "apache-2.4"}, {"PHP_SERVER": "PHP 7.3", "HTTPD_SERVER": "apache-2.4"}, {"PHP_SERVER": "PHP 7.4", "HTTPD_SERVER": "apache-2.4"}, @@ -38,12 +40,12 @@ env: {"PHP_SERVER": "PHP 8.1", "HTTPD_SERVER": "apache-2.4"}, {"PHP_SERVER": "PHP 8.2", "HTTPD_SERVER": "apache-2.4"}, - {"PHP_SERVER": "PHP 5.3", "HTTPD_SERVER": "nginx-stable"}, - {"PHP_SERVER": "PHP 5.4", "HTTPD_SERVER": "nginx-stable"}, - {"PHP_SERVER": "PHP 5.5", "HTTPD_SERVER": "nginx-stable"}, - {"PHP_SERVER": "PHP 5.6", "HTTPD_SERVER": "nginx-stable"}, - {"PHP_SERVER": "PHP 7.0", "HTTPD_SERVER": "nginx-stable"}, - {"PHP_SERVER": "PHP 7.1", "HTTPD_SERVER": "nginx-stable"}, + {"PHP_SERVER": "PHP 5.3", "HTTPD_SERVER": "nginx-stable", "PGSQL_SERVER": "PgSQL 12"}, + {"PHP_SERVER": "PHP 5.4", "HTTPD_SERVER": "nginx-stable", "PGSQL_SERVER": "PgSQL 12"}, + {"PHP_SERVER": "PHP 5.5", "HTTPD_SERVER": "nginx-stable", "PGSQL_SERVER": "PgSQL 12"}, + {"PHP_SERVER": "PHP 5.6", "HTTPD_SERVER": "nginx-stable", "PGSQL_SERVER": "PgSQL 12"}, + {"PHP_SERVER": "PHP 7.0", "HTTPD_SERVER": "nginx-stable", "PGSQL_SERVER": "PgSQL 12"}, + {"PHP_SERVER": "PHP 7.1", "HTTPD_SERVER": "nginx-stable", "PGSQL_SERVER": "PgSQL 12"}, {"PHP_SERVER": "PHP 7.2", "HTTPD_SERVER": "nginx-stable"}, {"PHP_SERVER": "PHP 7.3", "HTTPD_SERVER": "nginx-stable"}, {"PHP_SERVER": "PHP 7.4", "HTTPD_SERVER": "nginx-stable"}, diff --git a/.github/workflows/zzz-reuse-tests.yml b/.github/workflows/zzz-reuse-tests.yml index ca3d73f2..04701273 100644 --- a/.github/workflows/zzz-reuse-tests.yml +++ b/.github/workflows/zzz-reuse-tests.yml @@ -45,12 +45,12 @@ jobs: run: | echo '${{ toJson(matrix) }}' | jq -r - - name: "[DEBUG] Show environment" + - name: "[DEBUG] Show env variables" shell: bash run: | env - - name: "[DEBUG] Show network" + - name: "[DEBUG] Show open network ports" shell: bash run: | netstat -an || true @@ -61,6 +61,11 @@ jobs: run: | docker version + - name: "[DEBUG] Show Docker Compose version" + shell: bash + run: | + docker-compose version + # ------------------------------------------------------------ # Configure # ------------------------------------------------------------ @@ -102,6 +107,11 @@ jobs: make configure KEY="${KEY}" VAL="${VAL}" done <<< "$( echo '${{ toJson(matrix) }}' | jq -r 'keys[]' )" + - name: "[Configure] Show .env file" + run: | + cat .env + + # ------------------------------------------------------------ # Startup # ------------------------------------------------------------ From a714821dea89812c740cb3194898545338411fe2 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 27 Mar 2022 19:40:34 +0200 Subject: [PATCH 13/23] Use tiny Alpine version of Bind container --- CHANGELOG.md | 3 ++- docker-compose.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58809691..dbdf26ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,10 +12,11 @@ Make sure to have a look at [UPDATING.md](https://github.com/cytopia/devilbox/bl - Added CakePHP integration tests for PHP 8+ #### Changed -- Changed default PostgreSQL server from `12.4` to `14-alpine` +- Changed default PostgreSQL server from `12.4` to `14-alpine` (breaking change) - Changed default Redis server from `6.0` to `6.2-alpine` - Changed default Memcached server from `1.6` to `1.6-alpine` - Changed default MongoDB server from `4.4` to `5.0` +- Use tiny Alpine version of Bind container ## Release v1.11.0 (2022-03-22) diff --git a/docker-compose.yml b/docker-compose.yml index ac44c32e..dc96837b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -34,7 +34,7 @@ services: # Bind (DNS Server) # ------------------------------------------------------------ bind: - image: cytopia/bind:0.28 + image: cytopia/bind:alpine-0.28 hostname: bind restart: always ports: From 052be908aa6ef0301eb3ac9da78c623015247e70 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 27 Mar 2022 19:40:53 +0200 Subject: [PATCH 14/23] Add new CI status badges --- README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index eccbe52b..d04e2860 100644 --- a/README.md +++ b/README.md @@ -25,9 +25,14 @@ [![Documentation Status](https://readthedocs.org/projects/devilbox/badge/?version=latest)](https://devilbox.readthedocs.io) [![Build Status](https://github.com/cytopia/devilbox/workflows/Lint/badge.svg)](https://github.com/cytopia/devilbox/actions?workflow=Lint) [![Build Status](https://github.com/cytopia/devilbox/workflows/Docs/badge.svg)](https://github.com/cytopia/devilbox/actions?workflow=Docs) -[![Build Status](https://github.com/cytopia/devilbox/workflows/Linux/badge.svg)](https://github.com/cytopia/devilbox/actions?workflow=Linux) -[![Build Status](https://github.com/cytopia/devilbox/workflows/Config/badge.svg)](https://github.com/cytopia/devilbox/actions?workflow=Config) -[![Build Status](https://github.com/cytopia/devilbox/workflows/Versions/badge.svg)](https://github.com/cytopia/devilbox/actions?workflow=Versions) + +[![PHP](https://github.com/cytopia/devilbox/actions/workflows/test-php.yml/badge.svg)](https://github.com/cytopia/devilbox/actions/workflows/test-php.yml) +[![MySQL](https://github.com/cytopia/devilbox/actions/workflows/test-version-mysql.yml/badge.svg)](https://github.com/cytopia/devilbox/actions/workflows/test-version-mysql.yml) +[![Memcd](https://github.com/cytopia/devilbox/actions/workflows/test-version-memcd.yml/badge.svg)](https://github.com/cytopia/devilbox/actions/workflows/test-version-memcd.yml) +[![Mongo](https://github.com/cytopia/devilbox/actions/workflows/test-version-mongo.yml/badge.svg)](https://github.com/cytopia/devilbox/actions/workflows/test-version-mongo.yml) +[![PgSQL](https://github.com/cytopia/devilbox/actions/workflows/test-version-pgsql.yml/badge.svg)](https://github.com/cytopia/devilbox/actions/workflows/test-version-pgsql.yml) +[![Redis](https://github.com/cytopia/devilbox/actions/workflows/test-version-redis.yml/badge.svg)](https://github.com/cytopia/devilbox/actions/workflows/test-version-redis.yml) +
Support for valid https out of the box. From 4f0542b756d1a82a33ca8d4cb1745f57e02dea6d Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 27 Mar 2022 19:41:12 +0200 Subject: [PATCH 15/23] Add breaking changes info to CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dbdf26ff..1ceb24c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ Make sure to have a look at [UPDATING.md](https://github.com/cytopia/devilbox/bl ## Release v1.12.0 (2022-04-01) +The goal of this release is to reduce the overall size of Docker images and bring in latest versions. + +**Important:** This release introduces backwards incompatible changes due to only keeping major versions of PostreSQL and therefore removing old volumes. Additionally the PostgreSQL volume names have changed. In order to guarantee a smooth transition, backup your PostgreSQL databases in the previous version before switching and then re-importing them in this version. + #### Added - Added CakePHP integration tests for PHP 8+ From ac07995595f16546efbc6099971c31c4cca59775 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 27 Mar 2022 19:42:35 +0200 Subject: [PATCH 16/23] Adjust version according to breaking changes --- .devilbox/www/config.php | 2 +- CHANGELOG.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.devilbox/www/config.php b/.devilbox/www/config.php index 28094c22..0ddd9989 100644 --- a/.devilbox/www/config.php +++ b/.devilbox/www/config.php @@ -13,7 +13,7 @@ error_reporting(-1); putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1'); -$DEVILBOX_VERSION = 'v1.12.0'; +$DEVILBOX_VERSION = 'v2.0.0'; $DEVILBOX_DATE = '2022-04-01'; $DEVILBOX_API_PAGE = 'devilbox-api/status.json'; diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ceb24c2..e3ed3e14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ Make sure to have a look at [UPDATING.md](https://github.com/cytopia/devilbox/bl ## Unreleased -## Release v1.12.0 (2022-04-01) +## Release v2.0.0 (2022-04-01) The goal of this release is to reduce the overall size of Docker images and bring in latest versions. From 0159d2a60bedc1e8d4e77d818f3f45a98000e860 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 27 Mar 2022 20:05:14 +0200 Subject: [PATCH 17/23] Ensure CI tests run on bash shell --- .github/workflows/zzz-reuse-tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/zzz-reuse-tests.yml b/.github/workflows/zzz-reuse-tests.yml index 04701273..da7441ca 100644 --- a/.github/workflows/zzz-reuse-tests.yml +++ b/.github/workflows/zzz-reuse-tests.yml @@ -42,6 +42,7 @@ jobs: fetch-depth: 0 - name: "[DEBUG] Show Matrix configuration" + shell: bash run: | echo '${{ toJson(matrix) }}' | jq -r @@ -70,6 +71,7 @@ jobs: # Configure # ------------------------------------------------------------ - name: "[Configure] Configure customized configuration" + shell: bash run: | cd "${GITHUB_WORKSPACE}/.tests/" @@ -89,6 +91,7 @@ jobs: if: inputs.custom_config - name: "[Configure] Configure versions" + shell: bash run: | # (1/3) Change to .tests/ directory cd "${GITHUB_WORKSPACE}/.tests/" @@ -108,6 +111,7 @@ jobs: done <<< "$( echo '${{ toJson(matrix) }}' | jq -r 'keys[]' )" - name: "[Configure] Show .env file" + shell: bash run: | cat .env From 49b919534ae550421a35b55f9f8569898177d4a3 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 27 Mar 2022 20:15:14 +0200 Subject: [PATCH 18/23] Give more startup-time for CI tests --- .tests/scripts/compose-start.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.tests/scripts/compose-start.sh b/.tests/scripts/compose-start.sh index ec9493cd..4af2a2a4 100755 --- a/.tests/scripts/compose-start.sh +++ b/.tests/scripts/compose-start.sh @@ -53,7 +53,7 @@ until curl -sS -I --fail -o /dev/null -w "%{http_code}" "http://localhost:${HOST printf "." i=$(( i + 1 )) - if [ "${i}" -eq "60" ]; then + if [ "${i}" -eq "120" ]; then printf "[FAIL]\\n\\n" echo "---- curl From host ----" curl -sS -v "http://localhost:${HOST_PORT_HTTPD}" || true @@ -84,7 +84,7 @@ until curl -sS --fail "http://localhost:${HOST_PORT_HTTPD}" 2>/dev/null | grep ' printf "." i=$(( i + 1 )) - if [ "${i}" -eq "60" ]; then + if [ "${i}" -eq "120" ]; then printf "[FAIL]\\n" curl -sS -v "http://localhost:${HOST_PORT_HTTPD}" curl -sS -I "http://localhost:${HOST_PORT_HTTPD}" @@ -120,7 +120,7 @@ until cd "${DVLBOX_PATH}" && docker-compose exec -T php mongofiles --host=mongo printf "." i=$(( i + 1 )) - if [ "${i}" -eq "60" ]; then + if [ "${i}" -eq "120" ]; then printf "[FAIL]\\n" run "cd ${DVLBOX_PATH} && docker-compose exec -T php mongofiles --host=mongo list" || true run "cd ${DVLBOX_PATH} && docker-compose logs" || true @@ -143,7 +143,7 @@ until cd "${DVLBOX_PATH}" && docker-compose exec -T php mysql --user=root --pass printf "." i=$(( i + 1 )) - if [ "${i}" -eq "60" ]; then + if [ "${i}" -eq "120" ]; then printf "[FAIL]\\n" run "cd ${DVLBOX_PATH} && docker-compose exec -T php mysql --user=root --password=\"${MYSQL_ROOT_PASSWORD}\" --host=mysql -e 'show databases;'" || true run "cd ${DVLBOX_PATH} && docker-compose logs" || true @@ -166,7 +166,7 @@ until cd "${DVLBOX_PATH}" && docker-compose exec -T php pg_isready --host=pgsql printf "." i=$(( i + 1 )) - if [ "${i}" -eq "60" ]; then + if [ "${i}" -eq "120" ]; then printf "[FAIL]\\n" run "cd ${DVLBOX_PATH} && docker-compose exec -T php pg_isready --host=pgsql" || true run "cd ${DVLBOX_PATH} && docker-compose logs" || true From d45a336d65821b3aeb53d8f20019f8d3549b2acb Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 27 Mar 2022 20:36:04 +0200 Subject: [PATCH 19/23] Removed CI for MongoDB `2.8` and MongoDB `3.0` due to segfault --- .github/workflows/params-version-mongo.yml | 4 ++-- CHANGELOG.md | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/params-version-mongo.yml b/.github/workflows/params-version-mongo.yml index 11caa1a5..602ff73b 100644 --- a/.github/workflows/params-version-mongo.yml +++ b/.github/workflows/params-version-mongo.yml @@ -10,10 +10,10 @@ name: params # Custom Variables # ------------------------------------------------------------------------------------------------- env: + # CI for Mongo 2.8 and Mongo 3.0 removed due to segfault + # https://github.com/docker-library/mongo/issues/251 MATRIX: >- [ - {"MONGO_SERVER": "Mongo 2.8"}, - {"MONGO_SERVER": "Mongo 3.0"}, {"MONGO_SERVER": "Mongo 3.2"}, {"MONGO_SERVER": "Mongo 3.4"}, {"MONGO_SERVER": "Mongo 3.6"}, diff --git a/CHANGELOG.md b/CHANGELOG.md index e3ed3e14..a049c284 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,9 @@ The goal of this release is to reduce the overall size of Docker images and brin - Changed default MongoDB server from `4.4` to `5.0` - Use tiny Alpine version of Bind container +#### Removed +- Removed CI for MongoDB `2.8` and MongoDB `3.0` due to segfault: https://github.com/docker-library/mongo/issues/251 + ## Release v1.11.0 (2022-03-22) From cbdabb2f971e6ace3212856773a4ad83f110fa05 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 27 Mar 2022 21:57:26 +0200 Subject: [PATCH 20/23] Add exceptions for PHP CI to use older PGSQL versions --- .github/workflows/params-php.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/params-php.yml b/.github/workflows/params-php.yml index 7b5097d9..76572e12 100644 --- a/.github/workflows/params-php.yml +++ b/.github/workflows/params-php.yml @@ -53,12 +53,12 @@ env: {"PHP_SERVER": "PHP 8.1", "HTTPD_SERVER": "nginx-stable"}, {"PHP_SERVER": "PHP 8.2", "HTTPD_SERVER": "nginx-stable"}, - {"PHP_SERVER": "PHP 5.3", "HTTPD_SERVER": "nginx-mainline"}, - {"PHP_SERVER": "PHP 5.4", "HTTPD_SERVER": "nginx-mainline"}, - {"PHP_SERVER": "PHP 5.5", "HTTPD_SERVER": "nginx-mainline"}, - {"PHP_SERVER": "PHP 5.6", "HTTPD_SERVER": "nginx-mainline"}, - {"PHP_SERVER": "PHP 7.0", "HTTPD_SERVER": "nginx-mainline"}, - {"PHP_SERVER": "PHP 7.1", "HTTPD_SERVER": "nginx-mainline"}, + {"PHP_SERVER": "PHP 5.3", "HTTPD_SERVER": "nginx-mainline", "PGSQL_SERVER": "PgSQL 12"}, + {"PHP_SERVER": "PHP 5.4", "HTTPD_SERVER": "nginx-mainline", "PGSQL_SERVER": "PgSQL 12"}, + {"PHP_SERVER": "PHP 5.5", "HTTPD_SERVER": "nginx-mainline", "PGSQL_SERVER": "PgSQL 12"}, + {"PHP_SERVER": "PHP 5.6", "HTTPD_SERVER": "nginx-mainline", "PGSQL_SERVER": "PgSQL 12"}, + {"PHP_SERVER": "PHP 7.0", "HTTPD_SERVER": "nginx-mainline", "PGSQL_SERVER": "PgSQL 12"}, + {"PHP_SERVER": "PHP 7.1", "HTTPD_SERVER": "nginx-mainline", "PGSQL_SERVER": "PgSQL 12"}, {"PHP_SERVER": "PHP 7.2", "HTTPD_SERVER": "nginx-mainline"}, {"PHP_SERVER": "PHP 7.3", "HTTPD_SERVER": "nginx-mainline"}, {"PHP_SERVER": "PHP 7.4", "HTTPD_SERVER": "nginx-mainline"}, From 8e8991896adf6c58a0c4aadb2262cb7133bee215 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 27 Mar 2022 23:25:23 +0200 Subject: [PATCH 21/23] Remove failing services in CI --- .github/workflows/params-version-mongo.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/params-version-mongo.yml b/.github/workflows/params-version-mongo.yml index 602ff73b..27265612 100644 --- a/.github/workflows/params-version-mongo.yml +++ b/.github/workflows/params-version-mongo.yml @@ -10,12 +10,12 @@ name: params # Custom Variables # ------------------------------------------------------------------------------------------------- env: - # CI for Mongo 2.8 and Mongo 3.0 removed due to segfault + # CI for Mongo 2.8 and Mongo 3.0 removed due to local segfault and non-segfault, but error in CI # https://github.com/docker-library/mongo/issues/251 + # + # CI for Mongo 3.2 and 3.4 removed due to non-reproducible error in CI MATRIX: >- [ - {"MONGO_SERVER": "Mongo 3.2"}, - {"MONGO_SERVER": "Mongo 3.4"}, {"MONGO_SERVER": "Mongo 3.6"}, {"MONGO_SERVER": "Mongo 4.0"}, {"MONGO_SERVER": "Mongo 4.2"}, From 77997405254cf54566b32d2dbc6a39932e147a9d Mon Sep 17 00:00:00 2001 From: cytopia Date: Mon, 28 Mar 2022 00:11:15 +0200 Subject: [PATCH 22/23] Added `.env` variable `HTTPD_FLAVOUR` to decide between `Debian` or `Alpine` for HTTP server --- .github/workflows/params-httpd.yml | 59 +++++++++++++++++++ ...ams-version-memcd.yml => params-memcd.yml} | 0 ...ams-version-mongo.yml => params-mongo.yml} | 0 ...ams-version-mysql.yml => params-mysql.yml} | 0 ...ams-version-pgsql.yml => params-pgsql.yml} | 0 ...ams-version-redis.yml => params-redis.yml} | 0 .github/workflows/test-httpd.yml | 53 +++++++++++++++++ ...{test-version-memcd.yml => test-memcd.yml} | 2 +- ...{test-version-mongo.yml => test-mongo.yml} | 2 +- ...{test-version-mysql.yml => test-mysql.yml} | 2 +- ...{test-version-pgsql.yml => test-pgsql.yml} | 2 +- .github/workflows/test-php.yml | 1 + ...{test-version-redis.yml => test-redis.yml} | 2 +- CHANGELOG.md | 2 + README.md | 11 ++-- docker-compose.yml | 2 +- env-example | 6 ++ 17 files changed, 133 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/params-httpd.yml rename .github/workflows/{params-version-memcd.yml => params-memcd.yml} (100%) rename .github/workflows/{params-version-mongo.yml => params-mongo.yml} (100%) rename .github/workflows/{params-version-mysql.yml => params-mysql.yml} (100%) rename .github/workflows/{params-version-pgsql.yml => params-pgsql.yml} (100%) rename .github/workflows/{params-version-redis.yml => params-redis.yml} (100%) create mode 100644 .github/workflows/test-httpd.yml rename .github/workflows/{test-version-memcd.yml => test-memcd.yml} (96%) rename .github/workflows/{test-version-mongo.yml => test-mongo.yml} (96%) rename .github/workflows/{test-version-mysql.yml => test-mysql.yml} (96%) rename .github/workflows/{test-version-pgsql.yml => test-pgsql.yml} (96%) rename .github/workflows/{test-version-redis.yml => test-redis.yml} (96%) diff --git a/.github/workflows/params-httpd.yml b/.github/workflows/params-httpd.yml new file mode 100644 index 00000000..56c7c3d0 --- /dev/null +++ b/.github/workflows/params-httpd.yml @@ -0,0 +1,59 @@ +--- + +# ------------------------------------------------------------------------------------------------- +# Job Name +# ------------------------------------------------------------------------------------------------- +name: params + + +# ------------------------------------------------------------------------------------------------- +# Custom Variables +# ------------------------------------------------------------------------------------------------- +env: + # Note: Older PHP versions use an older version of phpPgMyAdmin, which does not work with later + # PgSQL server versions. That's why we need to tell those combinations to use an old PgSQL server + MATRIX: >- + [ + {"HTTPD_SERVER": "apache-2.2", "HTTPD_FLAVOUR": "alpine"}, + {"HTTPD_SERVER": "apache-2.2", "HTTPD_FLAVOUR": "debian"}, + + {"HTTPD_SERVER": "apache-2.4", "HTTPD_FLAVOUR": "alpine"}, + {"HTTPD_SERVER": "apache-2.4", "HTTPD_FLAVOUR": "debian"}, + + {"HTTPD_SERVER": "nginx-stable", "HTTPD_FLAVOUR": "alpine"}, + {"HTTPD_SERVER": "nginx-stable", "HTTPD_FLAVOUR": "debian"}, + + {"HTTPD_SERVER": "nginx-mainline", "HTTPD_FLAVOUR": "alpine"}, + {"HTTPD_SERVER": "nginx-mainline", "HTTPD_FLAVOUR": "debian"} + ] + + +# ------------------------------------------------------------------------------------------------- +# When to run +# ------------------------------------------------------------------------------------------------- +on: + workflow_call: + outputs: + matrix: + description: "The determined version matrix" + value: ${{ jobs.params.outputs.matrix }} + +jobs: + params: + runs-on: ubuntu-latest + + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + + steps: + - name: "[Set-Output] Matrix" + id: set-matrix + run: | + echo "::set-output name=matrix::$( echo '${{ env.MATRIX }}' | jq -M -c )" + + - name: "[DEBUG] Show settings'" + run: | + echo 'Matrix' + echo '--------------------' + echo '${{ steps.set-matrix.outputs.matrix }}' + echo diff --git a/.github/workflows/params-version-memcd.yml b/.github/workflows/params-memcd.yml similarity index 100% rename from .github/workflows/params-version-memcd.yml rename to .github/workflows/params-memcd.yml diff --git a/.github/workflows/params-version-mongo.yml b/.github/workflows/params-mongo.yml similarity index 100% rename from .github/workflows/params-version-mongo.yml rename to .github/workflows/params-mongo.yml diff --git a/.github/workflows/params-version-mysql.yml b/.github/workflows/params-mysql.yml similarity index 100% rename from .github/workflows/params-version-mysql.yml rename to .github/workflows/params-mysql.yml diff --git a/.github/workflows/params-version-pgsql.yml b/.github/workflows/params-pgsql.yml similarity index 100% rename from .github/workflows/params-version-pgsql.yml rename to .github/workflows/params-pgsql.yml diff --git a/.github/workflows/params-version-redis.yml b/.github/workflows/params-redis.yml similarity index 100% rename from .github/workflows/params-version-redis.yml rename to .github/workflows/params-redis.yml diff --git a/.github/workflows/test-httpd.yml b/.github/workflows/test-httpd.yml new file mode 100644 index 00000000..c0dbfef6 --- /dev/null +++ b/.github/workflows/test-httpd.yml @@ -0,0 +1,53 @@ +--- + +# ------------------------------------------------------------------------------------------------- +# Job Name +# ------------------------------------------------------------------------------------------------- +name: Httpd + + +# ------------------------------------------------------------------------------------------------- +# When to run +# ------------------------------------------------------------------------------------------------- +on: + # Runs on Pull Requests + pull_request: + + # Runs on master Branch and Tags + push: + branches: + - master + tags: + - '[0-9]+.[0-9]+*' + + +jobs: + # ----------------------------------------------------------------------------------------------- + # (1/3) Determine parameter settings + # ----------------------------------------------------------------------------------------------- + params: + uses: ./.github/workflows/params-httpd.yml + + + # ----------------------------------------------------------------------------------------------- + # (2/3) Test with default settings + # ----------------------------------------------------------------------------------------------- + default: + needs: [params] + uses: ./.github/workflows/zzz-reuse-tests.yml + with: + matrix: ${{ needs.params.outputs.matrix }} + custom_config: false + operating_system: ubuntu-latest + + + # ----------------------------------------------------------------------------------------------- + # (3/3) Test with customizedt settings + # ----------------------------------------------------------------------------------------------- + custom: + needs: [params] + uses: ./.github/workflows/zzz-reuse-tests.yml + with: + matrix: ${{ needs.params.outputs.matrix }} + custom_config: true + operating_system: ubuntu-latest diff --git a/.github/workflows/test-version-memcd.yml b/.github/workflows/test-memcd.yml similarity index 96% rename from .github/workflows/test-version-memcd.yml rename to .github/workflows/test-memcd.yml index 5832ab52..5d073957 100644 --- a/.github/workflows/test-version-memcd.yml +++ b/.github/workflows/test-memcd.yml @@ -26,7 +26,7 @@ jobs: # (1/3) Determine parameter settings # ----------------------------------------------------------------------------------------------- params: - uses: ./.github/workflows/params-version-memcd.yml + uses: ./.github/workflows/params-memcd.yml # ----------------------------------------------------------------------------------------------- diff --git a/.github/workflows/test-version-mongo.yml b/.github/workflows/test-mongo.yml similarity index 96% rename from .github/workflows/test-version-mongo.yml rename to .github/workflows/test-mongo.yml index 96369aa5..cb44752e 100644 --- a/.github/workflows/test-version-mongo.yml +++ b/.github/workflows/test-mongo.yml @@ -26,7 +26,7 @@ jobs: # (1/3) Determine parameter settings # ----------------------------------------------------------------------------------------------- params: - uses: ./.github/workflows/params-version-mongo.yml + uses: ./.github/workflows/params-mongo.yml # ----------------------------------------------------------------------------------------------- diff --git a/.github/workflows/test-version-mysql.yml b/.github/workflows/test-mysql.yml similarity index 96% rename from .github/workflows/test-version-mysql.yml rename to .github/workflows/test-mysql.yml index 79b805ea..4c12e10e 100644 --- a/.github/workflows/test-version-mysql.yml +++ b/.github/workflows/test-mysql.yml @@ -26,7 +26,7 @@ jobs: # (1/3) Determine parameter settings # ----------------------------------------------------------------------------------------------- params: - uses: ./.github/workflows/params-version-mysql.yml + uses: ./.github/workflows/params-mysql.yml # ----------------------------------------------------------------------------------------------- diff --git a/.github/workflows/test-version-pgsql.yml b/.github/workflows/test-pgsql.yml similarity index 96% rename from .github/workflows/test-version-pgsql.yml rename to .github/workflows/test-pgsql.yml index e0726820..1f4cc9eb 100644 --- a/.github/workflows/test-version-pgsql.yml +++ b/.github/workflows/test-pgsql.yml @@ -26,7 +26,7 @@ jobs: # (1/3) Determine parameter settings # ----------------------------------------------------------------------------------------------- params: - uses: ./.github/workflows/params-version-pgsql.yml + uses: ./.github/workflows/params-pgsql.yml # ----------------------------------------------------------------------------------------------- diff --git a/.github/workflows/test-php.yml b/.github/workflows/test-php.yml index 105fc661..59558f37 100644 --- a/.github/workflows/test-php.yml +++ b/.github/workflows/test-php.yml @@ -40,6 +40,7 @@ jobs: custom_config: false operating_system: ubuntu-latest + # ----------------------------------------------------------------------------------------------- # (3/3) Test with customizedt settings # ----------------------------------------------------------------------------------------------- diff --git a/.github/workflows/test-version-redis.yml b/.github/workflows/test-redis.yml similarity index 96% rename from .github/workflows/test-version-redis.yml rename to .github/workflows/test-redis.yml index 76f1488d..d6a63bfb 100644 --- a/.github/workflows/test-version-redis.yml +++ b/.github/workflows/test-redis.yml @@ -26,7 +26,7 @@ jobs: # (1/3) Determine parameter settings # ----------------------------------------------------------------------------------------------- params: - uses: ./.github/workflows/params-version-redis.yml + uses: ./.github/workflows/params-redis.yml # ----------------------------------------------------------------------------------------------- diff --git a/CHANGELOG.md b/CHANGELOG.md index a049c284..11c21540 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,12 +14,14 @@ The goal of this release is to reduce the overall size of Docker images and brin #### Added - Added CakePHP integration tests for PHP 8+ +- Added `.env` variable `HTTPD_FLAVOUR` to decide between `Debian` or `Alpine` for HTTP server #### Changed - Changed default PostgreSQL server from `12.4` to `14-alpine` (breaking change) - Changed default Redis server from `6.0` to `6.2-alpine` - Changed default Memcached server from `1.6` to `1.6-alpine` - Changed default MongoDB server from `4.4` to `5.0` +- Changed default HTTPD server flavour from `Debian` to `Alpine` - Use tiny Alpine version of Bind container #### Removed diff --git a/README.md b/README.md index d04e2860..59589582 100644 --- a/README.md +++ b/README.md @@ -27,11 +27,12 @@ [![Build Status](https://github.com/cytopia/devilbox/workflows/Docs/badge.svg)](https://github.com/cytopia/devilbox/actions?workflow=Docs) [![PHP](https://github.com/cytopia/devilbox/actions/workflows/test-php.yml/badge.svg)](https://github.com/cytopia/devilbox/actions/workflows/test-php.yml) -[![MySQL](https://github.com/cytopia/devilbox/actions/workflows/test-version-mysql.yml/badge.svg)](https://github.com/cytopia/devilbox/actions/workflows/test-version-mysql.yml) -[![Memcd](https://github.com/cytopia/devilbox/actions/workflows/test-version-memcd.yml/badge.svg)](https://github.com/cytopia/devilbox/actions/workflows/test-version-memcd.yml) -[![Mongo](https://github.com/cytopia/devilbox/actions/workflows/test-version-mongo.yml/badge.svg)](https://github.com/cytopia/devilbox/actions/workflows/test-version-mongo.yml) -[![PgSQL](https://github.com/cytopia/devilbox/actions/workflows/test-version-pgsql.yml/badge.svg)](https://github.com/cytopia/devilbox/actions/workflows/test-version-pgsql.yml) -[![Redis](https://github.com/cytopia/devilbox/actions/workflows/test-version-redis.yml/badge.svg)](https://github.com/cytopia/devilbox/actions/workflows/test-version-redis.yml) +[![Httpd](https://github.com/cytopia/devilbox/actions/workflows/test-httpd.yml/badge.svg)](https://github.com/cytopia/devilbox/actions/workflows/test-httpd.yml) +[![MySQL](https://github.com/cytopia/devilbox/actions/workflows/test-mysql.yml/badge.svg)](https://github.com/cytopia/devilbox/actions/workflows/test-mysql.yml) +[![Memcd](https://github.com/cytopia/devilbox/actions/workflows/test-memcd.yml/badge.svg)](https://github.com/cytopia/devilbox/actions/workflows/test-memcd.yml) +[![Mongo](https://github.com/cytopia/devilbox/actions/workflows/test-mongo.yml/badge.svg)](https://github.com/cytopia/devilbox/actions/workflows/test-mongo.yml) +[![PgSQL](https://github.com/cytopia/devilbox/actions/workflows/test-pgsql.yml/badge.svg)](https://github.com/cytopia/devilbox/actions/workflows/test-pgsql.yml) +[![Redis](https://github.com/cytopia/devilbox/actions/workflows/test-redis.yml/badge.svg)](https://github.com/cytopia/devilbox/actions/workflows/test-redis.yml)
diff --git a/docker-compose.yml b/docker-compose.yml index dc96837b..511a544d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -220,7 +220,7 @@ services: # Web Server # ------------------------------------------------------------ httpd: - image: devilbox/${HTTPD_SERVER}:0.43 + image: devilbox/${HTTPD_SERVER}:${HTTPD_FLAVOUR:-alpine}-0.47 hostname: httpd environment: diff --git a/env-example b/env-example index 86cd2128..6d2b420a 100644 --- a/env-example +++ b/env-example @@ -273,6 +273,12 @@ PHP_SERVER=8.1 ### ### 1.2 Choose HTTPD Server Image ### +### Choose between 'debian' or 'alpine' flavour and then select the version +### +### Note: apache-2.2 has no arm64 support on 'alpine' flavour +### +HTTPD_FLAVOUR=alpine + #HTTPD_SERVER=apache-2.2 #HTTPD_SERVER=apache-2.4 HTTPD_SERVER=nginx-stable From 96610c756b34ab139db62c02c6281158b7550d56 Mon Sep 17 00:00:00 2001 From: cytopia Date: Mon, 28 Mar 2022 17:13:11 +0200 Subject: [PATCH 23/23] Update project files --- .devilbox/www/config.php | 2 +- CHANGELOG.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.devilbox/www/config.php b/.devilbox/www/config.php index 0ddd9989..0e2fd1af 100644 --- a/.devilbox/www/config.php +++ b/.devilbox/www/config.php @@ -14,7 +14,7 @@ putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1'); $DEVILBOX_VERSION = 'v2.0.0'; -$DEVILBOX_DATE = '2022-04-01'; +$DEVILBOX_DATE = '2022-03-28'; $DEVILBOX_API_PAGE = 'devilbox-api/status.json'; // diff --git a/CHANGELOG.md b/CHANGELOG.md index 11c21540..0ea6f6ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ Make sure to have a look at [UPDATING.md](https://github.com/cytopia/devilbox/bl ## Unreleased -## Release v2.0.0 (2022-04-01) +## Release v2.0.0 (2022-03-28) The goal of this release is to reduce the overall size of Docker images and bring in latest versions.