From 9473e44f11d7afdbfc1eddae3177a13bdd2f1568 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 13:42:50 +0000 Subject: [PATCH 01/18] Update actions/checkout action to v4.2.1 --- .github/workflows/renovate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index 0bd2ee11f..31c893806 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4.2.0 + uses: actions/checkout@v4.2.1 - uses: suzuki-shunsuke/github-action-renovate-config-validator@v1.1.0 From 317656b620aee119385953d8bcd6a84bb0664870 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 12 Oct 2024 03:12:32 +0000 Subject: [PATCH 02/18] Update renovatebot/github-action action to v40.3.3 --- .github/workflows/renovate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index 31c893806..7a75fb0bf 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -14,7 +14,7 @@ jobs: - uses: suzuki-shunsuke/github-action-renovate-config-validator@v1.1.0 - name: Self-hosted Renovate - uses: renovatebot/github-action@v40.3.1 + uses: renovatebot/github-action@v40.3.3 with: configurationFile: renovate.json token: ${{ secrets.RENOVATE_TOKEN }} From 07cfb8f1efd0a5ab43022e54d37ba5dc686e1d20 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Thu, 17 Oct 2024 07:43:31 +1100 Subject: [PATCH 03/18] [#1422] Renamed `ENVIRONMENT_TEST` to `ENVIRONMENT_STAGE`. --- .vortex/docs/content/drupal/settings.mdx | 2 +- .../Drupal/EnvironmentSettingsTest.php | 30 +++++++++++-------- tests/phpunit/Drupal/SettingsTestCase.php | 4 +-- .../phpunit/Drupal/SwitchableSettingsTest.php | 10 +++---- .../modules/settings.config_split.php | 2 +- .../settings.environment_indicator.php | 2 +- .../includes/providers/settings.acquia.php | 3 +- .../includes/providers/settings.lagoon.php | 4 +-- web/sites/default/settings.php | 4 +-- 9 files changed, 34 insertions(+), 27 deletions(-) diff --git a/.vortex/docs/content/drupal/settings.mdx b/.vortex/docs/content/drupal/settings.mdx index 9fc57b9b6..9e836866a 100644 --- a/.vortex/docs/content/drupal/settings.mdx +++ b/.vortex/docs/content/drupal/settings.mdx @@ -50,7 +50,7 @@ Available constants include: - `ENVIRONMENT_LOCAL` - `ENVIRONMENT_CI` - `ENVIRONMENT_PROD` -- `ENVIRONMENT_TEST` +- `ENVIRONMENT_STAGE` - `ENVIRONMENT_DEV` These are later used to set `$settings['environment']` variable, which can be diff --git a/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/tests/phpunit/Drupal/EnvironmentSettingsTest.php index 332d1f3ea..cfdfc0f3b 100644 --- a/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -66,11 +66,17 @@ public function dataProviderEnvironmentTypeResolution(): array { ], static::ENVIRONMENT_PROD, ], + [ + [ + 'AH_SITE_ENVIRONMENT' => 'stage', + ], + static::ENVIRONMENT_STAGE, + ], [ [ 'AH_SITE_ENVIRONMENT' => 'test', ], - static::ENVIRONMENT_TEST, + static::ENVIRONMENT_STAGE, ], [ [ @@ -123,7 +129,7 @@ public function dataProviderEnvironmentTypeResolution(): array { 'VORTEX_LAGOON_PRODUCTION_BRANCH' => 'master', 'LAGOON_ENVIRONMENT_TYPE' => 'development', ], - static::ENVIRONMENT_TEST, + static::ENVIRONMENT_STAGE, ], [ [ @@ -132,7 +138,7 @@ public function dataProviderEnvironmentTypeResolution(): array { 'VORTEX_LAGOON_PRODUCTION_BRANCH' => FALSE, 'LAGOON_ENVIRONMENT_TYPE' => 'development', ], - static::ENVIRONMENT_TEST, + static::ENVIRONMENT_STAGE, ], [ [ @@ -150,7 +156,7 @@ public function dataProviderEnvironmentTypeResolution(): array { 'VORTEX_LAGOON_PRODUCTION_BRANCH' => FALSE, 'LAGOON_ENVIRONMENT_TYPE' => 'development', ], - static::ENVIRONMENT_TEST, + static::ENVIRONMENT_STAGE, ], [ [ @@ -176,7 +182,7 @@ public function dataProviderEnvironmentTypeResolution(): array { 'LAGOON_ENVIRONMENT_TYPE' => 'development', 'LAGOON_GIT_BRANCH' => 'release/1.2.3', ], - static::ENVIRONMENT_TEST, + static::ENVIRONMENT_STAGE, ], [ [ @@ -192,7 +198,7 @@ public function dataProviderEnvironmentTypeResolution(): array { 'LAGOON_ENVIRONMENT_TYPE' => 'development', 'LAGOON_GIT_BRANCH' => 'hotfix/1.2.3', ], - static::ENVIRONMENT_TEST, + static::ENVIRONMENT_STAGE, ], [ @@ -498,9 +504,9 @@ public function testEnvironmentAcquiaDev(): void { /** * Test per-environment settings for Test environment. */ - public function testEnvironmentAcquiaTest(): void { + public function testEnvironmentAcquiaStage(): void { $this->setEnvVars([ - 'AH_SITE_ENVIRONMENT' => 'test', + 'AH_SITE_ENVIRONMENT' => 'stage', ]); $this->requireSettingsFile(); @@ -509,7 +515,7 @@ public function testEnvironmentAcquiaTest(): void { $config['config_split.config_split.test']['status'] = TRUE; $config['environment_indicator.indicator']['bg_color'] = '#fff176'; $config['environment_indicator.indicator']['fg_color'] = '#000000'; - $config['environment_indicator.indicator']['name'] = static::ENVIRONMENT_TEST; + $config['environment_indicator.indicator']['name'] = static::ENVIRONMENT_STAGE; $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['maintenance_theme'] = 'your_site_theme'; @@ -523,7 +529,7 @@ public function testEnvironmentAcquiaTest(): void { $settings['config_sync_directory'] = static::CONFIG_PATH_TESTING; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; - $settings['environment'] = static::ENVIRONMENT_TEST; + $settings['environment'] = static::ENVIRONMENT_STAGE; $settings['file_private_path'] = static::PRIVATE_PATH_TESTING; $settings['file_scan_ignore_directories'] = [ 'node_modules', @@ -700,7 +706,7 @@ public function testEnvironmentLagoonTest(): void { $config['config_split.config_split.test']['status'] = TRUE; $config['environment_indicator.indicator']['bg_color'] = '#fff176'; $config['environment_indicator.indicator']['fg_color'] = '#000000'; - $config['environment_indicator.indicator']['name'] = static::ENVIRONMENT_TEST; + $config['environment_indicator.indicator']['name'] = static::ENVIRONMENT_STAGE; $config['environment_indicator.settings']['favicon'] = TRUE; $config['environment_indicator.settings']['toolbar_integration'] = [TRUE]; $config['maintenance_theme'] = 'your_site_theme'; @@ -715,7 +721,7 @@ public function testEnvironmentLagoonTest(): void { $settings['config_sync_directory'] = static::CONFIG_PATH_TESTING; $settings['container_yamls'][0] = $this->app_root . '/' . $this->site_path . '/services.yml'; $settings['entity_update_batch_size'] = 50; - $settings['environment'] = static::ENVIRONMENT_TEST; + $settings['environment'] = static::ENVIRONMENT_STAGE; $settings['file_private_path'] = static::PRIVATE_PATH_TESTING; $settings['file_scan_ignore_directories'] = [ 'node_modules', diff --git a/tests/phpunit/Drupal/SettingsTestCase.php b/tests/phpunit/Drupal/SettingsTestCase.php index 7f213e255..3c4128925 100644 --- a/tests/phpunit/Drupal/SettingsTestCase.php +++ b/tests/phpunit/Drupal/SettingsTestCase.php @@ -40,9 +40,9 @@ abstract class SettingsTestCase extends TestCase { final const ENVIRONMENT_PROD = 'prod'; /** - * Defines a constant for the name of the 'test' environment. + * Defines a constant for the name of the 'stage' environment. */ - final const ENVIRONMENT_TEST = 'test'; + final const ENVIRONMENT_STAGE = 'stage'; /** * Defines a constant for the name of the 'dev' environment. diff --git a/tests/phpunit/Drupal/SwitchableSettingsTest.php b/tests/phpunit/Drupal/SwitchableSettingsTest.php index 7b71d2337..75802a7b5 100644 --- a/tests/phpunit/Drupal/SwitchableSettingsTest.php +++ b/tests/phpunit/Drupal/SwitchableSettingsTest.php @@ -128,7 +128,7 @@ public static function dataProviderConfigSplit(): array { ], ], [ - static::ENVIRONMENT_TEST, + static::ENVIRONMENT_STAGE, [ 'config_split.config_split.test' => ['status' => TRUE], ], @@ -204,9 +204,9 @@ public static function dataProviderEnvironmentIndicator(): array { ], ], [ - static::ENVIRONMENT_TEST, + static::ENVIRONMENT_STAGE, [ - 'environment_indicator.indicator' => ['name' => static::ENVIRONMENT_TEST, 'bg_color' => '#fff176', 'fg_color' => '#000000'], + 'environment_indicator.indicator' => ['name' => static::ENVIRONMENT_STAGE, 'bg_color' => '#fff176', 'fg_color' => '#000000'], 'environment_indicator.settings' => ['toolbar_integration' => [TRUE], 'favicon' => TRUE], ], ], @@ -353,7 +353,7 @@ public static function dataProviderShield(): array { ], [ - static::ENVIRONMENT_TEST, + static::ENVIRONMENT_STAGE, [ 'DRUPAL_SHIELD_USER' => 'drupal_shield_user', 'DRUPAL_SHIELD_PASS' => 'drupal_shield_pass', @@ -481,7 +481,7 @@ public static function dataProviderStageFileProxy(): array { ], [ - static::ENVIRONMENT_TEST, + static::ENVIRONMENT_STAGE, [ 'DRUPAL_STAGE_FILE_PROXY_ORIGIN' => 'https://example.com/', 'DRUPAL_SHIELD_USER' => 'drupal_shield_user', diff --git a/web/sites/default/includes/modules/settings.config_split.php b/web/sites/default/includes/modules/settings.config_split.php index 108c82292..dea1150be 100644 --- a/web/sites/default/includes/modules/settings.config_split.php +++ b/web/sites/default/includes/modules/settings.config_split.php @@ -8,7 +8,7 @@ declare(strict_types=1); switch ($settings['environment']) { - case ENVIRONMENT_TEST: + case ENVIRONMENT_STAGE: $config['config_split.config_split.test']['status'] = TRUE; break; diff --git a/web/sites/default/includes/modules/settings.environment_indicator.php b/web/sites/default/includes/modules/settings.environment_indicator.php index 121f987e5..5dc16da52 100644 --- a/web/sites/default/includes/modules/settings.environment_indicator.php +++ b/web/sites/default/includes/modules/settings.environment_indicator.php @@ -19,7 +19,7 @@ $config['environment_indicator.indicator']['fg_color'] = '#000000'; break; - case ENVIRONMENT_TEST: + case ENVIRONMENT_STAGE: $config['environment_indicator.indicator']['bg_color'] = '#fff176'; $config['environment_indicator.indicator']['fg_color'] = '#000000'; break; diff --git a/web/sites/default/includes/providers/settings.acquia.php b/web/sites/default/includes/providers/settings.acquia.php index 32d408e91..04a16fb89 100644 --- a/web/sites/default/includes/providers/settings.acquia.php +++ b/web/sites/default/includes/providers/settings.acquia.php @@ -38,8 +38,9 @@ $settings['environment'] = ENVIRONMENT_PROD; break; + case 'stage': case 'test': - $settings['environment'] = ENVIRONMENT_TEST; + $settings['environment'] = ENVIRONMENT_STAGE; break; } } diff --git a/web/sites/default/includes/providers/settings.lagoon.php b/web/sites/default/includes/providers/settings.lagoon.php index 24c3d5b3a..087e20452 100644 --- a/web/sites/default/includes/providers/settings.lagoon.php +++ b/web/sites/default/includes/providers/settings.lagoon.php @@ -28,12 +28,12 @@ } // Dedicated test environment based on a branch name. elseif (getenv('LAGOON_GIT_BRANCH') == 'main' || getenv('LAGOON_GIT_BRANCH') == 'master') { - $settings['environment'] = ENVIRONMENT_TEST; + $settings['environment'] = ENVIRONMENT_STAGE; } // Test environment based on a branch prefix for release and // hotfix branches. elseif (!empty(getenv('LAGOON_GIT_BRANCH')) && (str_starts_with(getenv('LAGOON_GIT_BRANCH'), 'release/') || str_starts_with(getenv('LAGOON_GIT_BRANCH'), 'hotfix/'))) { - $settings['environment'] = ENVIRONMENT_TEST; + $settings['environment'] = ENVIRONMENT_STAGE; } } diff --git a/web/sites/default/settings.php b/web/sites/default/settings.php index 82e8b62c1..5799835f3 100644 --- a/web/sites/default/settings.php +++ b/web/sites/default/settings.php @@ -37,8 +37,8 @@ if (!defined('ENVIRONMENT_PROD')) { define('ENVIRONMENT_PROD', 'prod'); } -if (!defined('ENVIRONMENT_TEST')) { - define('ENVIRONMENT_TEST', 'test'); +if (!defined('ENVIRONMENT_STAGE')) { + define('ENVIRONMENT_STAGE', 'stage'); } if (!defined('ENVIRONMENT_DEV')) { define('ENVIRONMENT_DEV', 'dev'); From 67931e238f58aedcb67c8a3eed4fcf8e3dfad34b Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Thu, 17 Oct 2024 07:48:16 +1100 Subject: [PATCH 04/18] Upgraded to `mglaman/phpstan-drupal:^1.3` and updated PHPStan config. --- composer.json | 2 +- phpstan.neon | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/composer.json b/composer.json index e5f275c90..11cde76b0 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ "drupal/core-dev": "~10.3.2", "drupal/drupal-extension": "^5", "ergebnis/composer-normalize": "^2.43", - "mglaman/phpstan-drupal": "^1.2", + "mglaman/phpstan-drupal": "^1.3", "palantirnet/drupal-rector": "^0.20", "phpcompatibility/php-compatibility": "^9.3", "phpmd/phpmd": "^2.15", diff --git a/phpstan.neon b/phpstan.neon index 1272b9fa8..dc8f52331 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -26,9 +26,6 @@ parameters: - ../*/vendor/* - ../*/node_modules/* - drupal: - drupal_root: web - ignoreErrors: - # Since tests and data providers do not have to have parameter docblocks, From 2c206066a6bfd5a796e695ffbcc859f986b52fb5 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Thu, 17 Oct 2024 08:22:31 +1100 Subject: [PATCH 05/18] [#1419] Moved `services.local.php` inclusion into `settings.local.php`. --- web/sites/default/default.settings.local.php | 4 ++++ web/sites/default/settings.php | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/web/sites/default/default.settings.local.php b/web/sites/default/default.settings.local.php index 85f6a6474..f0931a2a9 100644 --- a/web/sites/default/default.settings.local.php +++ b/web/sites/default/default.settings.local.php @@ -7,6 +7,10 @@ declare(strict_types=1); +if (file_exists($app_root . '/' . $site_path . '/services.local.yml')) { + $settings['container_yamls'][] = $app_root . '/' . $site_path . '/services.local.yml'; +} + // Show all error messages on the site. $config['system.logging']['error_level'] = 'all'; diff --git a/web/sites/default/settings.php b/web/sites/default/settings.php index 5799835f3..a9ca2d0ea 100644 --- a/web/sites/default/settings.php +++ b/web/sites/default/settings.php @@ -192,13 +192,11 @@ // // Copy default.settings.local.php and default.services.local.yml to // settings.local.php and services.local.yml respectively. +// services.local.yml is loaded in in settings.local.php. // // Keep this code block at the end of this file to take full effect. // @codeCoverageIgnoreStart if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) { require $app_root . '/' . $site_path . '/settings.local.php'; } -if (file_exists($app_root . '/' . $site_path . '/services.local.yml')) { - $settings['container_yamls'][] = $app_root . '/' . $site_path . '/services.local.yml'; -} // @codeCoverageIgnoreEnd From 26f5bb3e9d80614e1a6acf8dc77c8cff2fed9b86 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Thu, 17 Oct 2024 08:33:38 +1100 Subject: [PATCH 06/18] [#1421] Added SecKit module. --- composer.json | 1 + tests/phpunit/Drupal/EnvironmentSettingsTest.php | 2 ++ .../default/includes/modules/settings.seckit.php | 13 +++++++++++++ 3 files changed, 16 insertions(+) create mode 100644 web/sites/default/includes/modules/settings.seckit.php diff --git a/composer.json b/composer.json index 11cde76b0..7d28983b4 100644 --- a/composer.json +++ b/composer.json @@ -20,6 +20,7 @@ "drupal/redis": "^1.8", "drupal/search_api": "^1.35", "drupal/search_api_solr": "^4.3", + "drupal/seckit": "^2.0", "drupal/shield": "^1.8", "drupal/stage_file_proxy": "^2.1", "drush/drush": "^13", diff --git a/tests/phpunit/Drupal/EnvironmentSettingsTest.php b/tests/phpunit/Drupal/EnvironmentSettingsTest.php index cfdfc0f3b..d31944064 100644 --- a/tests/phpunit/Drupal/EnvironmentSettingsTest.php +++ b/tests/phpunit/Drupal/EnvironmentSettingsTest.php @@ -347,6 +347,7 @@ public function testEnvironmentLocal(): void { $config['system.performance']['cache']['page']['max_age'] = 900; $config['system.performance']['css']['preprocess'] = 1; $config['system.performance']['js']['preprocess'] = 1; + $config['seckit.settings']['seckit_xss']['csp']['checkbox'] = FALSE; $this->assertConfig($config); $settings['config_exclude_modules'] = []; @@ -392,6 +393,7 @@ public function testEnvironmentCi(): void { $config['system.performance']['cache']['page']['max_age'] = 900; $config['system.performance']['css']['preprocess'] = 1; $config['system.performance']['js']['preprocess'] = 1; + $config['seckit.settings']['seckit_xss']['csp']['checkbox'] = FALSE; $this->assertConfig($config); $settings['config_exclude_modules'] = []; diff --git a/web/sites/default/includes/modules/settings.seckit.php b/web/sites/default/includes/modules/settings.seckit.php new file mode 100644 index 000000000..eac6dec87 --- /dev/null +++ b/web/sites/default/includes/modules/settings.seckit.php @@ -0,0 +1,13 @@ + Date: Mon, 21 Oct 2024 13:43:03 +0000 Subject: [PATCH 07/18] Update Container images to v24.10.0 --- .docker/clamav.dockerfile | 2 +- .docker/cli.dockerfile | 2 +- .docker/mariadb.dockerfile | 2 +- .docker/nginx-drupal.dockerfile | 2 +- .docker/php.dockerfile | 2 +- .docker/solr.dockerfile | 2 +- docker-compose.yml | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.docker/clamav.dockerfile b/.docker/clamav.dockerfile index 83cc7be1e..765490ec0 100644 --- a/.docker/clamav.dockerfile +++ b/.docker/clamav.dockerfile @@ -9,7 +9,7 @@ # # @see https://hub.docker.com/r/uselagoon/commons/tags # @see https://github.com/uselagoon/lagoon-images/tree/main/images/commons -FROM uselagoon/commons:24.9.0 as commons +FROM uselagoon/commons:24.10.0 as commons FROM clamav/clamav:1.4.1 diff --git a/.docker/cli.dockerfile b/.docker/cli.dockerfile index bcd471fd5..bd73166ed 100644 --- a/.docker/cli.dockerfile +++ b/.docker/cli.dockerfile @@ -6,7 +6,7 @@ # # @see https://hub.docker.com/r/uselagoon/php-8.3-cli-drupal/tags # @see https://github.com/uselagoon/lagoon-images/tree/main/images/php-cli-drupal -FROM uselagoon/php-8.3-cli-drupal:24.9.0 +FROM uselagoon/php-8.3-cli-drupal:24.10.0 # Add missing variables. # @todo Remove once https://github.com/uselagoon/lagoon/issues/3121 is resolved. diff --git a/.docker/mariadb.dockerfile b/.docker/mariadb.dockerfile index 3c62de4e1..a19cebbdb 100644 --- a/.docker/mariadb.dockerfile +++ b/.docker/mariadb.dockerfile @@ -8,7 +8,7 @@ # @see https://github.com/drevops/mariadb-drupal-data # # The ARG value will be updated with a value passed from docker-compose.yml -ARG IMAGE=uselagoon/mariadb-10.11-drupal:24.9.0 +ARG IMAGE=uselagoon/mariadb-10.11-drupal:24.10.0 # hadolint ignore=DL3006 FROM ${IMAGE} diff --git a/.docker/nginx-drupal.dockerfile b/.docker/nginx-drupal.dockerfile index 6ebcd43bf..2b599a486 100644 --- a/.docker/nginx-drupal.dockerfile +++ b/.docker/nginx-drupal.dockerfile @@ -9,7 +9,7 @@ FROM ${CLI_IMAGE:-cli} as cli # @see https://hub.docker.com/r/uselagoon/nginx-drupal/tags # @see https://github.com/uselagoon/lagoon-images/tree/main/images/nginx-drupal -FROM uselagoon/nginx-drupal:24.9.0 +FROM uselagoon/nginx-drupal:24.10.0 # Webroot is used for Nginx docroot configuration. ARG WEBROOT=web diff --git a/.docker/php.dockerfile b/.docker/php.dockerfile index c6d8f2fae..f9da8c0c5 100644 --- a/.docker/php.dockerfile +++ b/.docker/php.dockerfile @@ -10,7 +10,7 @@ FROM ${CLI_IMAGE:-cli} as cli # @see https://hub.docker.com/r/uselagoon/php-8.3-fpm/tags # @see https://github.com/uselagoon/lagoon-images/tree/main/images/php-fpm -FROM uselagoon/php-8.3-fpm:24.9.0 +FROM uselagoon/php-8.3-fpm:24.10.0 RUN apk add --no-cache tzdata diff --git a/.docker/solr.dockerfile b/.docker/solr.dockerfile index bb7673283..2f7256b5f 100644 --- a/.docker/solr.dockerfile +++ b/.docker/solr.dockerfile @@ -5,7 +5,7 @@ FROM ${CLI_IMAGE} as cli # @see https://hub.docker.com/r/uselagoon/solr-8/tags # @see https://github.com/uselagoon/lagoon-images/blob/main/images/solr/8.Dockerfile -FROM uselagoon/solr-8:24.9.0 +FROM uselagoon/solr-8:24.10.0 # Solr Jump-start config needs to be manually copied from search_api_solr module # /app/docroot/modules/contrib/search_api_solr/jump-start/solr8/config-set. diff --git a/docker-compose.yml b/docker-compose.yml index e7baa369f..83696fc57 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -155,7 +155,7 @@ services: context: . dockerfile: .docker/mariadb.dockerfile args: - IMAGE: "${VORTEX_DB_IMAGE:-uselagoon/mariadb-10.11-drupal:24.9.0}" # Use custom database image (if defined) or fallback to standard database image. + IMAGE: "${VORTEX_DB_IMAGE:-uselagoon/mariadb-10.11-drupal:24.10.0}" # Use custom database image (if defined) or fallback to standard database image. <<: *default-user environment: <<: *default-environment @@ -168,7 +168,7 @@ services: #;< REDIS redis: - image: uselagoon/redis-6:24.9.0 + image: uselagoon/redis-6:24.10.0 #;< LAGOON labels: lagoon.type: redis # Change to 'none' if dedicated Redis service is used. See https://docs.lagoon.sh/using-lagoon-advanced/service-types/ From 3eb97596d51a0a746313654ef6e86bbdf2ca97dc Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Fri, 18 Oct 2024 12:59:53 +1100 Subject: [PATCH 08/18] Updated gherkinlint rules to respect indentation of pystrings. --- gherkinlint.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gherkinlint.json b/gherkinlint.json index 49de8655e..3adb04978 100644 --- a/gherkinlint.json +++ b/gherkinlint.json @@ -1,7 +1,8 @@ { "rules": { "indentation": { - "width": 2 + "width": 2, + "literalBlock": 3 }, "keyword-order": { "enabled": false From 273b8a4bdb64817b885a7397a5edc863a44df0dc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 18 Oct 2024 14:31:53 +0000 Subject: [PATCH 09/18] Update renovatebot/github-action action to v40.3.4 --- .github/workflows/renovate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index 7a75fb0bf..14f6fb628 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -14,7 +14,7 @@ jobs: - uses: suzuki-shunsuke/github-action-renovate-config-validator@v1.1.0 - name: Self-hosted Renovate - uses: renovatebot/github-action@v40.3.3 + uses: renovatebot/github-action@v40.3.4 with: configurationFile: renovate.json token: ${{ secrets.RENOVATE_TOKEN }} From cc95abe1ce91d5ecc06688a8a64e8ec260d4edf9 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Tue, 22 Oct 2024 07:42:33 +1100 Subject: [PATCH 10/18] [#1413] Added `composer normalize` check to CI. --- .circleci/config.yml | 4 ++++ .github/workflows/build-test-deploy.yml | 4 ++++ .vortex/docs/.utils/variables/extra/ci.variables.sh | 3 +++ .vortex/docs/content/workflows/variables.mdx | 8 ++++++++ 4 files changed, 19 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 43bfbd08b..60ae70e0b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -267,6 +267,10 @@ jobs: if [ -n \"${GITHUB_TOKEN:-}\" ]; then export COMPOSER_AUTH='{\"github-oauth\": {\"github.com\": \"${GITHUB_TOKEN-}\"}}'; fi && \ COMPOSER_MEMORY_LIMIT=-1 composer --ansi install --prefer-dist" + - run: + name: Validate Composer configuration normalised + command: docker compose exec -T cli composer normalize --dry-run || [ "${VORTEX_CI_COMPOSER_NORMALIZE_IGNORE_FAILURE:-0}" -eq 1 ] + - run: name: Lint code with PHPCS command: docker compose exec -T cli vendor/bin/phpcs || [ "${VORTEX_CI_PHPCS_IGNORE_FAILURE:-0}" -eq 1 ] diff --git a/.github/workflows/build-test-deploy.yml b/.github/workflows/build-test-deploy.yml index 3a3a38bc2..798afacc3 100644 --- a/.github/workflows/build-test-deploy.yml +++ b/.github/workflows/build-test-deploy.yml @@ -239,6 +239,10 @@ jobs: if [ -n \"${GITHUB_TOKEN:-}\" ]; then export COMPOSER_AUTH='{\"github-oauth\": {\"github.com\": \"${GITHUB_TOKEN-}\"}}'; fi && \ COMPOSER_MEMORY_LIMIT=-1 composer --ansi install --prefer-dist" + - name: Validate Composer configuration normalised + run: docker compose exec -T cli composer normalize --dry-run + continue-on-error: ${{ vars.VORTEX_CI_COMPOSER_NORMALIZE_IGNORE_FAILURE == '1' }} + - name: Lint code with PHPCS run: docker compose exec -T cli vendor/bin/phpcs continue-on-error: ${{ vars.VORTEX_CI_PHPCS_IGNORE_FAILURE == '1' }} diff --git a/.vortex/docs/.utils/variables/extra/ci.variables.sh b/.vortex/docs/.utils/variables/extra/ci.variables.sh index 186fe316e..1edce6099 100755 --- a/.vortex/docs/.utils/variables/extra/ci.variables.sh +++ b/.vortex/docs/.utils/variables/extra/ci.variables.sh @@ -15,6 +15,9 @@ VORTEX_CI_HADOLINT_IGNORE_FAILURE=0 # Ignore `composer validate` failures. VORTEX_CI_COMPOSER_VALIDATE_IGNORE_FAILURE=0 +# Ignore `composer normalize` failures. +VORTEX_CI_COMPOSER_NORMALIZE_IGNORE_FAILURE=0 + # Ignore PHPCS failures. VORTEX_CI_PHPCS_IGNORE_FAILURE=0 diff --git a/.vortex/docs/content/workflows/variables.mdx b/.vortex/docs/content/workflows/variables.mdx index 3135b9916..4c5c91dbd 100644 --- a/.vortex/docs/content/workflows/variables.mdx +++ b/.vortex/docs/content/workflows/variables.mdx @@ -300,6 +300,14 @@ Default value: `UNDEFINED` Defined in: `CI config` +### `VORTEX_CI_COMPOSER_NORMALIZE_IGNORE_FAILURE` + +Ignore `composer normalize` failures. + +Default value: `UNDEFINED` + +Defined in: `CI config` + ### `VORTEX_CI_COMPOSER_VALIDATE_IGNORE_FAILURE` Ignore `composer validate` failures. From 9968b7f4c688a18debc380ed82eb167b88d30cca Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Tue, 22 Oct 2024 08:34:44 +1100 Subject: [PATCH 11/18] Disabled starting space in Yaml comments to allow Vortex's internal comments. --- .vortex/tests/.yamllint-for-gha.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.vortex/tests/.yamllint-for-gha.yml b/.vortex/tests/.yamllint-for-gha.yml index 3b57fffef..c71d9ae85 100644 --- a/.vortex/tests/.yamllint-for-gha.yml +++ b/.vortex/tests/.yamllint-for-gha.yml @@ -1,9 +1,12 @@ -# Yamllint configuration file used to check GitHub Actions configuration files. +# Yamllint configuration file used to check GitHub Actions configuration files. extends: default rules: + comments-indentation: false comments: min-spaces-from-content: 1 + # Disable to support Vortex's internal comments like `#;<` and `#;>`. + require-starting-space: false document-start: present: false empty-lines: From dfbfaa2c6a61babbc67cf26c547a8e24e5adef79 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2024 13:56:20 +0000 Subject: [PATCH 12/18] Update selenium/standalone-chromium Docker tag to v130 --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 83696fc57..0a181b7eb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -217,7 +217,7 @@ services: # Chrome container, used for browser testing. chrome: - image: selenium/standalone-chromium:129.0 + image: selenium/standalone-chromium:130.0 ports: - "7900" # Find port on host with `docker compose port chrome 7900`. shm_size: '1gb' # Increase '/dev/shm' partition size to avoid browser crashing. From d666276590f99b9c42a549ed6bdefdea4bf97c69 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2024 13:56:16 +0000 Subject: [PATCH 13/18] Update actions/checkout action to v4.2.2 --- .github/workflows/renovate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index 14f6fb628..1de71f2c3 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4.2.1 + uses: actions/checkout@v4.2.2 - uses: suzuki-shunsuke/github-action-renovate-config-validator@v1.1.0 From 65caec86378de7bc96212aee4b23fffc97a71856 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Sun, 3 Nov 2024 21:46:22 +1100 Subject: [PATCH 14/18] Reverted Clamav. --- .docker/clamav.dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.docker/clamav.dockerfile b/.docker/clamav.dockerfile index 765490ec0..66c1d801d 100644 --- a/.docker/clamav.dockerfile +++ b/.docker/clamav.dockerfile @@ -9,9 +9,9 @@ # # @see https://hub.docker.com/r/uselagoon/commons/tags # @see https://github.com/uselagoon/lagoon-images/tree/main/images/commons -FROM uselagoon/commons:24.10.0 as commons +FROM uselagoon/commons:24.10.0 AS commons -FROM clamav/clamav:1.4.1 +FROM clamav/clamav:1.4.0 COPY --from=commons /lagoon /lagoon COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/wait-for /bin/ From c027391eab85738d86761ba00984c9c80f8ad0c3 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Sun, 3 Nov 2024 21:56:36 +1100 Subject: [PATCH 15/18] Fixed Redis install. --- scripts/custom/provision-10-example.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/custom/provision-10-example.sh b/scripts/custom/provision-10-example.sh index 09b46298c..53d4769e6 100644 --- a/scripts/custom/provision-10-example.sh +++ b/scripts/custom/provision-10-example.sh @@ -34,7 +34,7 @@ if echo "${VORTEX_PROVISION_ENVIRONMENT:-}" | grep -q -e dev -e test -e ci -e lo drush pm:install admin_toolbar coffee config_split config_update media environment_indicator pathauto redirect shield stage_file_proxy #;< REDIS - drush pm:install redis + drush pm:install redis || true #;> REDIS #;< CLAMAV From 95b3d861ea3db13f08e32213fd4b301044e32b4b Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Mon, 4 Nov 2024 08:18:09 +1100 Subject: [PATCH 16/18] Fixed output of `ahoy login` used in `ahoy info`. (#1442) --- scripts/vortex/login.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/vortex/login.sh b/scripts/vortex/login.sh index 9aeb40cb3..17b2f2867 100755 --- a/scripts/vortex/login.sh +++ b/scripts/vortex/login.sh @@ -25,9 +25,9 @@ drush() { ./vendor/bin/drush -y "$@"; } if [ "${DRUPAL_UNBLOCK_ADMIN:-}" = "1" ]; then if drush pm:list --status=enabled | grep -q password_policy; then - drush sql:query 'UPDATE `user__field_password_expiration` SET `field_password_expiration_value` = 0 WHERE `bundle` = "user" AND `entity_id` = 1;' + drush sql:query 'UPDATE `user__field_password_expiration` SET `field_password_expiration_value` = 0 WHERE `bundle` = "user" AND `entity_id` = 1;' >/dev/null fi - drush sql:query "SELECT name FROM \`users_field_data\` WHERE \`uid\` = '1';" | head -n 1 | xargs drush -- user:unblock + drush sql:query "SELECT name FROM \`users_field_data\` WHERE \`uid\` = '1';" | head -n 1 | xargs drush -- user:unblock 2>/dev/null fi drush user:login From 904a94604e1c7f30c84e9bf0998445e59ff6adb1 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Mon, 4 Nov 2024 08:18:21 +1100 Subject: [PATCH 17/18] Updated to ClamAV to `1.4.1` and explicitly set the platform. (#1443) --- .docker/clamav.dockerfile | 2 +- .vortex/tests/bats/fixtures/docker-compose.env.json | 1 + .vortex/tests/bats/fixtures/docker-compose.env_local.json | 1 + .vortex/tests/bats/fixtures/docker-compose.env_mod.json | 1 + .vortex/tests/bats/fixtures/docker-compose.noenv.json | 1 + docker-compose.yml | 1 + 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.docker/clamav.dockerfile b/.docker/clamav.dockerfile index 66c1d801d..78b4b7dfd 100644 --- a/.docker/clamav.dockerfile +++ b/.docker/clamav.dockerfile @@ -11,7 +11,7 @@ # @see https://github.com/uselagoon/lagoon-images/tree/main/images/commons FROM uselagoon/commons:24.10.0 AS commons -FROM clamav/clamav:1.4.0 +FROM clamav/clamav:1.4.1 COPY --from=commons /lagoon /lagoon COPY --from=commons /bin/fix-permissions /bin/ep /bin/docker-sleep /bin/wait-for /bin/ diff --git a/.vortex/tests/bats/fixtures/docker-compose.env.json b/.vortex/tests/bats/fixtures/docker-compose.env.json index 49a3b2228..5c1c6d68d 100644 --- a/.vortex/tests/bats/fixtures/docker-compose.env.json +++ b/.vortex/tests/bats/fixtures/docker-compose.env.json @@ -99,6 +99,7 @@ "networks": { "default": null }, + "platform": "linux/amd64", "ports": [ { "mode": "ingress", diff --git a/.vortex/tests/bats/fixtures/docker-compose.env_local.json b/.vortex/tests/bats/fixtures/docker-compose.env_local.json index 49a3b2228..5c1c6d68d 100644 --- a/.vortex/tests/bats/fixtures/docker-compose.env_local.json +++ b/.vortex/tests/bats/fixtures/docker-compose.env_local.json @@ -99,6 +99,7 @@ "networks": { "default": null }, + "platform": "linux/amd64", "ports": [ { "mode": "ingress", diff --git a/.vortex/tests/bats/fixtures/docker-compose.env_mod.json b/.vortex/tests/bats/fixtures/docker-compose.env_mod.json index 33240c9e6..2faa6e947 100644 --- a/.vortex/tests/bats/fixtures/docker-compose.env_mod.json +++ b/.vortex/tests/bats/fixtures/docker-compose.env_mod.json @@ -99,6 +99,7 @@ "networks": { "default": null }, + "platform": "linux/amd64", "ports": [ { "mode": "ingress", diff --git a/.vortex/tests/bats/fixtures/docker-compose.noenv.json b/.vortex/tests/bats/fixtures/docker-compose.noenv.json index c87e61c03..b420522b2 100644 --- a/.vortex/tests/bats/fixtures/docker-compose.noenv.json +++ b/.vortex/tests/bats/fixtures/docker-compose.noenv.json @@ -99,6 +99,7 @@ "networks": { "default": null }, + "platform": "linux/amd64", "ports": [ { "mode": "ingress", diff --git a/docker-compose.yml b/docker-compose.yml index 0a181b7eb..ccd83ab33 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -201,6 +201,7 @@ services: build: context: . dockerfile: .docker/clamav.dockerfile + platform: linux/amd64 ports: - "3310" # Find port on host with `docker compose port clamav 3310`. environment: From 5133d2aecd60c480ef4b53226fb3712f31c0af94 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Mon, 4 Nov 2024 08:18:30 +1100 Subject: [PATCH 18/18] Updated CI Runner to 24.11.0. (#1439) --- .circleci/config.yml | 2 +- .github/workflows/build-test-deploy.yml | 6 +++--- .github/workflows/vortex-test-common.yml | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 60ae70e0b..ed724af1a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -57,7 +57,7 @@ aliases: # This container has all the necessary tools to run a dockerized environment. # @see https://github.com/drevops/ci-runner # @see https://hub.docker.com/repository/docker/drevops/ci-runner/tags - - image: drevops/ci-runner:24.10.0 + - image: drevops/ci-runner:24.11.0 auth: username: ${VORTEX_CONTAINER_REGISTRY_USER} password: ${VORTEX_CONTAINER_REGISTRY_PASS} diff --git a/.github/workflows/build-test-deploy.yml b/.github/workflows/build-test-deploy.yml index 798afacc3..57ee7a888 100644 --- a/.github/workflows/build-test-deploy.yml +++ b/.github/workflows/build-test-deploy.yml @@ -56,7 +56,7 @@ jobs: runs-on: ubuntu-latest container: - image: drevops/ci-runner:24.10.0 + image: drevops/ci-runner:24.11.0 env: TZ: Australia/Melbourne @@ -147,7 +147,7 @@ jobs: fail-fast: false container: - image: drevops/ci-runner:24.10.0 + image: drevops/ci-runner:24.11.0 env: TZ: Australia/Melbourne @@ -342,7 +342,7 @@ jobs: #;> !PROVISION_USE_PROFILE container: - image: drevops/ci-runner:24.10.0 + image: drevops/ci-runner:24.11.0 env: TZ: Australia/Melbourne TERM: xterm-256color diff --git a/.github/workflows/vortex-test-common.yml b/.github/workflows/vortex-test-common.yml index 0d982b868..9284c1abb 100644 --- a/.github/workflows/vortex-test-common.yml +++ b/.github/workflows/vortex-test-common.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest container: - image: drevops/ci-runner:24.10.0 + image: drevops/ci-runner:24.11.0 env: # Prevent GitHub overriding the Docker config. DOCKER_CONFIG: /root/.docker @@ -89,7 +89,7 @@ jobs: batch: [0, 1, 2] container: - image: drevops/ci-runner:24.10.0 + image: drevops/ci-runner:24.11.0 env: # Prevent GitHub overriding the Docker config. DOCKER_CONFIG: /root/.docker @@ -141,7 +141,7 @@ jobs: batch: [0, 1] container: - image: drevops/ci-runner:24.10.0 + image: drevops/ci-runner:24.11.0 env: # Prevent GitHub overriding the Docker config. DOCKER_CONFIG: /root/.docker