From 7c58cf95f7523fd9f2471f859deef9653abaca0c Mon Sep 17 00:00:00 2001 From: Vincent Gao Date: Wed, 22 Feb 2023 16:00:30 +1100 Subject: [PATCH 1/2] Enable tide_ckeditor module --- baywatch.install | 9 +++++++++ src/BaywatchOperation.php | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/baywatch.install b/baywatch.install index f32110e..28719cc 100644 --- a/baywatch.install +++ b/baywatch.install @@ -42,6 +42,7 @@ function baywatch_install() { $baywatch->enable_coi(); $baywatch->enable_tide_content_collection(); $baywatch->enable_tide_logs(); + $baywatch->enable_tide_ckeditor(); } /** @@ -560,3 +561,11 @@ function baywatch_update_8029() { $seckit_config->save(); } } + +/** + * Enable tide_ckeditor module for Ckeditor5 upgrade. + */ +function baywatch_update_8030() { + $baywatch = new BaywatchOperation(); + $baywatch->enable_tide_ckeditor(); +} diff --git a/src/BaywatchOperation.php b/src/BaywatchOperation.php index 8ba02b6..b66244e 100644 --- a/src/BaywatchOperation.php +++ b/src/BaywatchOperation.php @@ -408,5 +408,8 @@ public function enable_tide_logs() { $this->baywatch_install_module('tide_logs'); } -} + public function enable_tide_ckeditor() { + $this->baywatch_install_module('tide_ckeditor'); + } +} From 0be62ce0fcfd393795046e36e9e2ecd248b0cd13 Mon Sep 17 00:00:00 2001 From: edyuenyw <67810118+edyuenyw@users.noreply.github.com> Date: Wed, 8 Mar 2023 14:01:46 +1100 Subject: [PATCH 2/2] Includes tide ckeditor module baywatch (#81) * Added functions to enable tide site alert module for all SDP projects. (#78) * [DDS-1343] Init bay_platform_dependencies module (#79) * Update install hook number (#80) * Enables back ckeditor after baywatch master update. --------- Co-authored-by: Md Nadim Hossain Co-authored-by: Guy Owen Co-authored-by: Anthony Malkoun --- README.md | 11 ++------ baywatch.info.yml | 1 + baywatch.install | 21 +++++++++++++- baywatch.module | 16 ----------- composer.json | 23 ++------------- .../optional/key.key.section_io_password.yml | 13 --------- .../section_purger.settings.8714ff77fc.yml | 28 ------------------- src/BaywatchOperation.php | 12 +++++++- 8 files changed, 36 insertions(+), 89 deletions(-) delete mode 100644 config/optional/key.key.section_io_password.yml delete mode 100644 config/optional/section_purger.settings.8714ff77fc.yml diff --git a/README.md b/README.md index 2ce7abd..3a9d2b0 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,2 @@ -# baywatch - -Configuration for integration with Bay hosting platform - -## Features - -- Ensures dependencies required for the bay hosting platform are installed. -- Allows configuring the default `Reply-To` email address via `SMTP_REPLYTO` - environment variable. +# Baywatch +Drupal configuration and deployment tooling for SDP specific features. diff --git a/baywatch.info.yml b/baywatch.info.yml index 1bdf928..2cc7e26 100644 --- a/baywatch.info.yml +++ b/baywatch.info.yml @@ -23,6 +23,7 @@ dependencies: - smtp:smtp - config_split:config_split - jwt:jwt + - bay_platform_dependencies:bay_platform_dependencies config_devel: optional: - password_policy.password_policy.password_policy_sdpa diff --git a/baywatch.install b/baywatch.install index 28719cc..73ac1d0 100644 --- a/baywatch.install +++ b/baywatch.install @@ -42,6 +42,8 @@ function baywatch_install() { $baywatch->enable_coi(); $baywatch->enable_tide_content_collection(); $baywatch->enable_tide_logs(); + $baywatch->enable_tide_site_alert(); + $baywatch->enable_bay_platform_dependencies(); $baywatch->enable_tide_ckeditor(); } @@ -440,6 +442,7 @@ function baywatch_update_8022() { $baywatch = new BaywatchOperation(); $baywatch->enable_tide_content_collection(); } + /** * Enables Tide Logs module. */ @@ -563,9 +566,25 @@ function baywatch_update_8029() { } /** - * Enable tide_ckeditor module for Ckeditor5 upgrade. + * Enables Tide Site Alert module. */ function baywatch_update_8030() { + $baywatch = new BaywatchOperation(); + $baywatch->enable_tide_site_alert(); +} + +/** + * Enables bay_platform_dependencies module. + */ +function baywatch_update_8031() { + $baywatch = new BaywatchOperation(); + $baywatch->enable_bay_platform_dependencies(); +} + +/** + * Enable tide_ckeditor module for Ckeditor5 upgrade. + */ +function baywatch_update_8032() { $baywatch = new BaywatchOperation(); $baywatch->enable_tide_ckeditor(); } diff --git a/baywatch.module b/baywatch.module index 3cf14d7..5becd89 100644 --- a/baywatch.module +++ b/baywatch.module @@ -6,19 +6,3 @@ * Procedural hooks for baywatch module. */ -/** - * Implements hook_mail_alter(). - */ -function baywatch_mail_alter(&$message) { - // Ensures that the Reply-To header points to a no-reply address if it is - // using the default value. This is to ensure the SES verified address - // doesn't get spammed. The second check ensures that modules which change - // the reply-to (such as webform) still function correctly. - // - // The SMTP_REPLYTO environment variable is set in lagoon. - $reply_to = getenv("SMTP_REPLYTO") ?: ''; - if ($reply_to && ($message['from'] == $message['reply-to'])) { - $message['reply-to'] = $reply_to; - $message['headers']['Reply-to'] = $reply_to; - } -} diff --git a/composer.json b/composer.json index c3af585..da49fa5 100644 --- a/composer.json +++ b/composer.json @@ -7,35 +7,16 @@ "drupal/autologout": "^1.3", "drush/drush": "^10.3", "drupal/coi": "^3", - "drupal/purge": "3.3", "drupal/purge_queuer_url": "^1.0@RC", - "drupal/section_purger": "dev-updates_to_compatible_with_drupal_9", - "drupal/redis": "^1.0", - "drupal/smtp": "^1.2", "drupal/queue_mail": "^1", "drupal/jwt": "^1.0", "drupal/config_split": "^1.4", - "dpc-sdp/tide_logs": "1.0.0" + "dpc-sdp/bay_platform_dependencies": "^1.0" }, - "exclude": [ - "drupal/section_purger" - ], "repositories": { "drupal": { "type": "composer", - "url": "https://packages.drupal.org/8", - "exclude": [ - "drupal/section_purger" - ] - }, - "drupal/section_purger": { - "type": "git", - "url": "https://git.drupalcode.org/issue/section_purge-3227034.git" - }, - "dpc-sdp/tide_logs": { - "type": "vcs", - "no-api": true, - "url": "https://github.com/dpc-sdp/tide_logs" + "url": "https://packages.drupal.org/8" } }, "minimum-stability": "dev", diff --git a/config/optional/key.key.section_io_password.yml b/config/optional/key.key.section_io_password.yml deleted file mode 100644 index a1feeb4..0000000 --- a/config/optional/key.key.section_io_password.yml +++ /dev/null @@ -1,13 +0,0 @@ -langcode: en -status: true -dependencies: { } -id: section_io_password -label: 'Section.io Password' -key_type: authentication -key_type_settings: { } -key_provider: env -key_provider_settings: - env_variable: SECTION_IO_PASSWORD - strip_line_breaks: true -key_input: none -key_input_settings: { } diff --git a/config/optional/section_purger.settings.8714ff77fc.yml b/config/optional/section_purger.settings.8714ff77fc.yml deleted file mode 100644 index 02c626f..0000000 --- a/config/optional/section_purger.settings.8714ff77fc.yml +++ /dev/null @@ -1,28 +0,0 @@ -langcode: en -status: true -dependencies: { } -id: 8714ff77fc -name: 'Section Develop' -invalidationtype: tag -hostname: aperture.section.io -sitename: '' -port: 443 -path: / -account: 1918 -application: 1234 -environmentname: Develop -username: de.ops@dpc.vic.gov.au -password: section_io_password -request_method: POST -scheme: https -verify: '1' -varnishname: varnish -headers: { } -body: '' -body_content_type: application/json -runtime_measurement: true -timeout: !!float 0 -connect_timeout: !!float 0 -cooldown_time: !!float 0 -max_requests: 100 -http_errors: true diff --git a/src/BaywatchOperation.php b/src/BaywatchOperation.php index b66244e..bf9feec 100644 --- a/src/BaywatchOperation.php +++ b/src/BaywatchOperation.php @@ -408,8 +408,18 @@ public function enable_tide_logs() { $this->baywatch_install_module('tide_logs'); } + public function enable_tide_site_alert() { + // Enable tide_site_alert module. + $this->baywatch_install_module('tide_site_alert'); + } + + public function enable_bay_platform_dependencies() { + // Enable bay_platform_dependencies module. + $this->baywatch_install_module('bay_platform_dependencies'); + } + public function enable_tide_ckeditor() { $this->baywatch_install_module('tide_ckeditor'); } - + }