diff --git a/composer.lock b/composer.lock index 68548f738..57cda174b 100644 --- a/composer.lock +++ b/composer.lock @@ -2099,16 +2099,16 @@ }, { "name": "drupal/core", - "version": "9.5.7", + "version": "9.5.8", "source": { "type": "git", "url": "https://github.com/drupal/core.git", - "reference": "bf51aa8ed6ab733fcaf60d0860aefd3918140fe3" + "reference": "a9a1e4e1fe23fb8c83fd6aeafb740c1462a218fc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core/zipball/bf51aa8ed6ab733fcaf60d0860aefd3918140fe3", - "reference": "bf51aa8ed6ab733fcaf60d0860aefd3918140fe3", + "url": "https://api.github.com/repos/drupal/core/zipball/a9a1e4e1fe23fb8c83fd6aeafb740c1462a218fc", + "reference": "a9a1e4e1fe23fb8c83fd6aeafb740c1462a218fc", "shasum": "" }, "require": { @@ -2260,9 +2260,9 @@ ], "description": "Drupal is an open source content management platform powering millions of websites and applications.", "support": { - "source": "https://github.com/drupal/core/tree/9.5.7" + "source": "https://github.com/drupal/core/tree/9.5.8" }, - "time": "2023-03-24T16:54:38+00:00" + "time": "2023-04-19T16:14:39+00:00" }, { "name": "drupal/core-composer-scaffold", @@ -2718,17 +2718,17 @@ }, { "name": "drupal/editoria11y", - "version": "2.0.11", + "version": "2.0.12", "source": { "type": "git", "url": "https://git.drupalcode.org/project/editoria11y.git", - "reference": "2.0.11" + "reference": "2.0.12" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/editoria11y-2.0.11.zip", - "reference": "2.0.11", - "shasum": "08e690cdf40d44a6d9386b393f83259a2cf07a21" + "url": "https://ftp.drupal.org/files/projects/editoria11y-2.0.12.zip", + "reference": "2.0.12", + "shasum": "e0e584a2f409709f4547dfe9cc7376a80f8fa317" }, "require": { "drupal/core": "^9 || ^10" @@ -2736,8 +2736,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "2.0.11", - "datestamp": "1679952007", + "version": "2.0.12", + "datestamp": "1680556093", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -3911,16 +3911,16 @@ }, { "name": "drupal/hdbt", - "version": "5.0.19", + "version": "5.0.21", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-hdbt.git", - "reference": "41b141d9351106129c8c24e87440373657beb4a0" + "reference": "ccc8c1cb500df43c95e1f6b2c7fac42c8f954eea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/41b141d9351106129c8c24e87440373657beb4a0", - "reference": "41b141d9351106129c8c24e87440373657beb4a0", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/ccc8c1cb500df43c95e1f6b2c7fac42c8f954eea", + "reference": "ccc8c1cb500df43c95e1f6b2c7fac42c8f954eea", "shasum": "" }, "require": { @@ -3938,10 +3938,10 @@ "Drupal" ], "support": { - "source": "https://github.com/City-of-Helsinki/drupal-hdbt/tree/5.0.19", + "source": "https://github.com/City-of-Helsinki/drupal-hdbt/tree/5.0.21", "issues": "https://github.com/City-of-Helsinki/drupal-hdbt/issues" }, - "time": "2023-04-18T05:15:46+00:00" + "time": "2023-04-19T11:08:29+00:00" }, { "name": "drupal/hdbt_admin", @@ -4029,23 +4029,23 @@ }, { "name": "drupal/helfi_api_base", - "version": "2.4.0", + "version": "2.4.2", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-module-helfi-api-base.git", - "reference": "9fef0cb03d5d0e31dba160331bc5365d0b424be4" + "reference": "7cbeef9a7a7d158c103c9fdc88ebf05dc8e82700" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-module-helfi-api-base/zipball/9fef0cb03d5d0e31dba160331bc5365d0b424be4", - "reference": "9fef0cb03d5d0e31dba160331bc5365d0b424be4", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-module-helfi-api-base/zipball/7cbeef9a7a7d158c103c9fdc88ebf05dc8e82700", + "reference": "7cbeef9a7a7d158c103c9fdc88ebf05dc8e82700", "shasum": "" }, "require": { "drupal/entity": "^1.0", "drupal/filelog": "^2.1", "drupal/health_check": "^3.0", - "php": "^8.0", + "php": "^8.1", "t4web/composer-lock-parser": "^1.0" }, "conflict": { @@ -4062,10 +4062,10 @@ ], "description": "Helfi - API Base", "support": { - "source": "https://github.com/City-of-Helsinki/drupal-module-helfi-api-base/tree/2.4.0", + "source": "https://github.com/City-of-Helsinki/drupal-module-helfi-api-base/tree/2.4.2", "issues": "https://github.com/City-of-Helsinki/drupal-module-helfi-api-base/issues" }, - "time": "2023-02-15T04:42:26+00:00" + "time": "2023-04-20T08:24:46+00:00" }, { "name": "drupal/helfi_azure_fs", @@ -6077,8 +6077,12 @@ "authors": [ { "name": "Christian Fritsch", - "homepage": "https://www.drupal.org/user/2103716", + "homepage": "https://www.drupal.org/user/157725", "email": "christian.fritsch@burda.com" + }, + { + "name": "chr.fritsch", + "homepage": "https://www.drupal.org/user/2103716" } ], "description": "Integration with the select2 JavaScript library.", @@ -9550,16 +9554,16 @@ }, { "name": "pear/pear-core-minimal", - "version": "v1.10.11", + "version": "v1.10.13", "source": { "type": "git", "url": "https://github.com/pear/pear-core-minimal.git", - "reference": "68d0d32ada737153b7e93b8d3c710ebe70ac867d" + "reference": "aed862e95fd286c53cc546734868dc38ff4b5b1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/68d0d32ada737153b7e93b8d3c710ebe70ac867d", - "reference": "68d0d32ada737153b7e93b8d3c710ebe70ac867d", + "url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/aed862e95fd286c53cc546734868dc38ff4b5b1d", + "reference": "aed862e95fd286c53cc546734868dc38ff4b5b1d", "shasum": "" }, "require": { @@ -9594,7 +9598,7 @@ "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PEAR", "source": "https://github.com/pear/pear-core-minimal" }, - "time": "2021-08-10T22:31:03+00:00" + "time": "2023-04-19T19:15:47+00:00" }, { "name": "pear/pear_exception", @@ -15843,16 +15847,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.19.0", + "version": "1.19.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "178b33aa1c8b8d7725f0abee618ef47337e607ce" + "reference": "f545fc30978190a056832aa7ed995e36a66267f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/178b33aa1c8b8d7725f0abee618ef47337e607ce", - "reference": "178b33aa1c8b8d7725f0abee618ef47337e607ce", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/f545fc30978190a056832aa7ed995e36a66267f3", + "reference": "f545fc30978190a056832aa7ed995e36a66267f3", "shasum": "" }, "require": { @@ -15882,9 +15886,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.19.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.19.1" }, - "time": "2023-04-17T13:16:52+00:00" + "time": "2023-04-18T11:30:56+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/conf/cmi/core.base_field_override.paragraphs_library_item.paragraphs_library_item.paragraphs.yml b/conf/cmi/core.base_field_override.paragraphs_library_item.paragraphs_library_item.paragraphs.yml index 717f1e0f7..2f07cc59f 100644 --- a/conf/cmi/core.base_field_override.paragraphs_library_item.paragraphs_library_item.paragraphs.yml +++ b/conf/cmi/core.base_field_override.paragraphs_library_item.paragraphs_library_item.paragraphs.yml @@ -29,7 +29,7 @@ id: paragraphs_library_item.paragraphs_library_item.paragraphs field_name: paragraphs entity_type: paragraphs_library_item bundle: paragraphs_library_item -label: Paragraphs +label: Lohkot description: '' required: true translatable: true diff --git a/conf/cmi/core.extension.yml b/conf/cmi/core.extension.yml index a79dc29a0..35d18b901 100644 --- a/conf/cmi/core.extension.yml +++ b/conf/cmi/core.extension.yml @@ -5,6 +5,7 @@ module: admin_toolbar: 0 admin_toolbar_tools: 0 allowed_formats: 0 + basic_auth: 0 better_exposed_filters: 0 block: 0 breakpoint: 0 diff --git a/conf/cmi/field.field.node.landing_page.field_content.yml b/conf/cmi/field.field.node.landing_page.field_content.yml index d27d7d2c3..722689579 100644 --- a/conf/cmi/field.field.node.landing_page.field_content.yml +++ b/conf/cmi/field.field.node.landing_page.field_content.yml @@ -37,7 +37,7 @@ id: node.landing_page.field_content field_name: field_content entity_type: node bundle: landing_page -label: 'Content region' +label: Sisältöalue description: '' required: false translatable: true diff --git a/conf/cmi/field.field.node.landing_page.field_hero.yml b/conf/cmi/field.field.node.landing_page.field_hero.yml index 104415710..94a08d059 100644 --- a/conf/cmi/field.field.node.landing_page.field_hero.yml +++ b/conf/cmi/field.field.node.landing_page.field_hero.yml @@ -14,7 +14,7 @@ id: node.landing_page.field_hero field_name: field_hero entity_type: node bundle: landing_page -label: Hero +label: Hero-lohko description: '' required: false translatable: true diff --git a/conf/cmi/field.field.node.news_item.field_content.yml b/conf/cmi/field.field.node.news_item.field_content.yml index 14a05a96d..b08fa10e8 100644 --- a/conf/cmi/field.field.node.news_item.field_content.yml +++ b/conf/cmi/field.field.node.news_item.field_content.yml @@ -17,7 +17,7 @@ id: node.news_item.field_content field_name: field_content entity_type: node bundle: news_item -label: 'Content region' +label: Sisältöalue description: '' required: false translatable: true diff --git a/conf/cmi/field.field.node.page.field_content.yml b/conf/cmi/field.field.node.page.field_content.yml index 7c29a699c..f5692320b 100644 --- a/conf/cmi/field.field.node.page.field_content.yml +++ b/conf/cmi/field.field.node.page.field_content.yml @@ -34,7 +34,7 @@ id: node.page.field_content field_name: field_content entity_type: node bundle: page -label: 'Upper content region' +label: 'Ylempi sisältöalue' description: '' required: false translatable: true diff --git a/conf/cmi/field.field.node.page.field_hero.yml b/conf/cmi/field.field.node.page.field_hero.yml index 3ef70ce81..8d4d2fa46 100644 --- a/conf/cmi/field.field.node.page.field_hero.yml +++ b/conf/cmi/field.field.node.page.field_hero.yml @@ -14,7 +14,7 @@ id: node.page.field_hero field_name: field_hero entity_type: node bundle: page -label: Hero +label: Hero-lohko description: '' required: false translatable: true diff --git a/conf/cmi/field.field.node.page.field_lower_content.yml b/conf/cmi/field.field.node.page.field_lower_content.yml index b40a884d5..34fb30fbb 100644 --- a/conf/cmi/field.field.node.page.field_lower_content.yml +++ b/conf/cmi/field.field.node.page.field_lower_content.yml @@ -35,7 +35,7 @@ id: node.page.field_lower_content field_name: field_lower_content entity_type: node bundle: page -label: 'Lower content region' +label: 'Alempi sisältöalue' description: '' required: false translatable: true diff --git a/conf/cmi/field.field.node.page.field_sidebar_content.yml b/conf/cmi/field.field.node.page.field_sidebar_content.yml index 3f34f4f09..c37b73f5a 100644 --- a/conf/cmi/field.field.node.page.field_sidebar_content.yml +++ b/conf/cmi/field.field.node.page.field_sidebar_content.yml @@ -15,7 +15,7 @@ id: node.page.field_sidebar_content field_name: field_sidebar_content entity_type: node bundle: page -label: 'Sidebar content' +label: 'Sivupalkin sisältö' description: '' required: false translatable: true diff --git a/conf/cmi/field.field.paragraph.accordion.field_accordion_items.yml b/conf/cmi/field.field.paragraph.accordion.field_accordion_items.yml index 6d7ff4db0..da1b20d4b 100644 --- a/conf/cmi/field.field.paragraph.accordion.field_accordion_items.yml +++ b/conf/cmi/field.field.paragraph.accordion.field_accordion_items.yml @@ -17,7 +17,7 @@ id: paragraph.accordion.field_accordion_items field_name: field_accordion_items entity_type: paragraph bundle: accordion -label: Items +label: Sisältö description: '' required: true translatable: false diff --git a/conf/cmi/field.field.paragraph.accordion_item.field_accordion_item_content.yml b/conf/cmi/field.field.paragraph.accordion_item.field_accordion_item_content.yml index 087aa0a6e..788bf8a53 100644 --- a/conf/cmi/field.field.paragraph.accordion_item.field_accordion_item_content.yml +++ b/conf/cmi/field.field.paragraph.accordion_item.field_accordion_item_content.yml @@ -17,7 +17,7 @@ id: paragraph.accordion_item.field_accordion_item_content field_name: field_accordion_item_content entity_type: paragraph bundle: accordion_item -label: Content +label: Sisältö description: '' required: true translatable: false diff --git a/conf/cmi/field.field.paragraph.columns.field_columns_left_column.yml b/conf/cmi/field.field.paragraph.columns.field_columns_left_column.yml index 6fa7797a5..58295246b 100644 --- a/conf/cmi/field.field.paragraph.columns.field_columns_left_column.yml +++ b/conf/cmi/field.field.paragraph.columns.field_columns_left_column.yml @@ -15,7 +15,7 @@ id: paragraph.columns.field_columns_left_column field_name: field_columns_left_column entity_type: paragraph bundle: columns -label: 'Left column' +label: 'Vasen palsta' description: '' required: true translatable: false diff --git a/conf/cmi/field.field.paragraph.columns.field_columns_right_column.yml b/conf/cmi/field.field.paragraph.columns.field_columns_right_column.yml index dd87d918e..ecb5afb76 100644 --- a/conf/cmi/field.field.paragraph.columns.field_columns_right_column.yml +++ b/conf/cmi/field.field.paragraph.columns.field_columns_right_column.yml @@ -15,7 +15,7 @@ id: paragraph.columns.field_columns_right_column field_name: field_columns_right_column entity_type: paragraph bundle: columns -label: 'Right column' +label: 'Oikea palsta' description: '' required: true translatable: false diff --git a/conf/cmi/field.field.paragraph.contact_card.field_contact_social_media.yml b/conf/cmi/field.field.paragraph.contact_card.field_contact_social_media.yml index cfb633bf6..4d12c4162 100644 --- a/conf/cmi/field.field.paragraph.contact_card.field_contact_social_media.yml +++ b/conf/cmi/field.field.paragraph.contact_card.field_contact_social_media.yml @@ -14,7 +14,7 @@ id: paragraph.contact_card.field_contact_social_media field_name: field_contact_social_media entity_type: paragraph bundle: contact_card -label: 'Social media' +label: 'Sosiaalinen media' description: '' required: false translatable: false diff --git a/conf/cmi/field.field.paragraph.contact_card_listing.field_contact_card.yml b/conf/cmi/field.field.paragraph.contact_card_listing.field_contact_card.yml index ce4a004a1..0af5c40f6 100644 --- a/conf/cmi/field.field.paragraph.contact_card_listing.field_contact_card.yml +++ b/conf/cmi/field.field.paragraph.contact_card_listing.field_contact_card.yml @@ -14,7 +14,7 @@ id: paragraph.contact_card_listing.field_contact_card field_name: field_contact_card entity_type: paragraph bundle: contact_card_listing -label: 'Contact card' +label: Yhteystietokortti description: '' required: false translatable: false diff --git a/conf/cmi/field.field.paragraph.list_of_links.field_list_of_links_links.yml b/conf/cmi/field.field.paragraph.list_of_links.field_list_of_links_links.yml index 9d7780cce..7bd587b3e 100644 --- a/conf/cmi/field.field.paragraph.list_of_links.field_list_of_links_links.yml +++ b/conf/cmi/field.field.paragraph.list_of_links.field_list_of_links_links.yml @@ -14,8 +14,8 @@ id: paragraph.list_of_links.field_list_of_links_links field_name: field_list_of_links_links entity_type: paragraph bundle: list_of_links -label: Links -description: 'The links that you want the paragraph to display.' +label: Linkit +description: 'Linkkilistan linkit.' required: true translatable: false default_value: { } diff --git a/conf/cmi/field.field.paragraph.phasing.field_phasing_item.yml b/conf/cmi/field.field.paragraph.phasing.field_phasing_item.yml index 97c529beb..860185ed6 100644 --- a/conf/cmi/field.field.paragraph.phasing.field_phasing_item.yml +++ b/conf/cmi/field.field.paragraph.phasing.field_phasing_item.yml @@ -12,7 +12,7 @@ id: paragraph.phasing.field_phasing_item field_name: field_phasing_item entity_type: paragraph bundle: phasing -label: 'Phasing item' +label: Vaihe description: '' required: true translatable: false diff --git a/conf/cmi/field.field.paragraph.popular_services.field_service_items.yml b/conf/cmi/field.field.paragraph.popular_services.field_service_items.yml index bbfa83bf8..ff86aa703 100644 --- a/conf/cmi/field.field.paragraph.popular_services.field_service_items.yml +++ b/conf/cmi/field.field.paragraph.popular_services.field_service_items.yml @@ -14,8 +14,8 @@ id: paragraph.popular_services.field_service_items field_name: field_service_items entity_type: paragraph bundle: popular_services -label: 'Service items' -description: 'Service items to showcase.' +label: Palvelut +description: 'Palvelut, joita esitellään.' required: true translatable: false default_value: { } diff --git a/conf/cmi/field.field.tpr_service.tpr_service.field_content.yml b/conf/cmi/field.field.tpr_service.tpr_service.field_content.yml index 2f0a98151..9a24fd9bb 100644 --- a/conf/cmi/field.field.tpr_service.tpr_service.field_content.yml +++ b/conf/cmi/field.field.tpr_service.tpr_service.field_content.yml @@ -23,7 +23,7 @@ id: tpr_service.tpr_service.field_content field_name: field_content entity_type: tpr_service bundle: tpr_service -label: 'Upper content region' +label: 'Ylempi sisältöalue' description: '' required: false translatable: true diff --git a/conf/cmi/field.field.tpr_service.tpr_service.field_lower_content.yml b/conf/cmi/field.field.tpr_service.tpr_service.field_lower_content.yml index 86b25fb00..a8811c9b7 100644 --- a/conf/cmi/field.field.tpr_service.tpr_service.field_lower_content.yml +++ b/conf/cmi/field.field.tpr_service.tpr_service.field_lower_content.yml @@ -25,7 +25,7 @@ id: tpr_service.tpr_service.field_lower_content field_name: field_lower_content entity_type: tpr_service bundle: tpr_service -label: 'Lower content region' +label: 'Alempi sisältöalue' description: '' required: false translatable: true diff --git a/conf/cmi/field.field.tpr_service.tpr_service.field_sidebar_content.yml b/conf/cmi/field.field.tpr_service.tpr_service.field_sidebar_content.yml index 670fe7c93..c95016d1a 100644 --- a/conf/cmi/field.field.tpr_service.tpr_service.field_sidebar_content.yml +++ b/conf/cmi/field.field.tpr_service.tpr_service.field_sidebar_content.yml @@ -15,7 +15,7 @@ id: tpr_service.tpr_service.field_sidebar_content field_name: field_sidebar_content entity_type: tpr_service bundle: tpr_service -label: 'Sidebar content' +label: 'Sivupalkin sisältö' description: '' required: false translatable: true diff --git a/conf/cmi/field.field.tpr_unit.tpr_unit.field_content.yml b/conf/cmi/field.field.tpr_unit.tpr_unit.field_content.yml index 8a44be4d1..a9befdf45 100644 --- a/conf/cmi/field.field.tpr_unit.tpr_unit.field_content.yml +++ b/conf/cmi/field.field.tpr_unit.tpr_unit.field_content.yml @@ -23,7 +23,7 @@ id: tpr_unit.tpr_unit.field_content field_name: field_content entity_type: tpr_unit bundle: tpr_unit -label: 'Upper content region' +label: 'Ylempi sisältöalue' description: '' required: false translatable: true diff --git a/conf/cmi/field.field.tpr_unit.tpr_unit.field_lower_content.yml b/conf/cmi/field.field.tpr_unit.tpr_unit.field_lower_content.yml index 9957067c4..10ed03569 100644 --- a/conf/cmi/field.field.tpr_unit.tpr_unit.field_lower_content.yml +++ b/conf/cmi/field.field.tpr_unit.tpr_unit.field_lower_content.yml @@ -25,7 +25,7 @@ id: tpr_unit.tpr_unit.field_lower_content field_name: field_lower_content entity_type: tpr_unit bundle: tpr_unit -label: 'Lower content region' +label: 'Alempi sisältöalue' description: '' required: false translatable: true diff --git a/conf/cmi/filter.format.minimal.yml b/conf/cmi/filter.format.minimal.yml index 2c7675ebc..0a904cb2b 100644 --- a/conf/cmi/filter.format.minimal.yml +++ b/conf/cmi/filter.format.minimal.yml @@ -8,7 +8,7 @@ dependencies: - linkit _core: default_config_hash: iir5dZUojC1bWTysG1mu4qEgxkT8Le4FLCF6C1hQSoY -name: Minimal +name: Minimaalinen format: minimal weight: 0 filters: diff --git a/conf/cmi/filter.format.plain_text.yml b/conf/cmi/filter.format.plain_text.yml index 17a6a94b8..3584ee0a0 100644 --- a/conf/cmi/filter.format.plain_text.yml +++ b/conf/cmi/filter.format.plain_text.yml @@ -6,7 +6,7 @@ dependencies: - helfi_api_base _core: default_config_hash: NIKBt6kw_uPhNI0qtR2DnRf7mSOgAQdx7Q94SKMjXbQ -name: 'Plain text' +name: 'Puhdas teksti' format: plain_text weight: 10 filters: diff --git a/conf/cmi/rest.resource.helfi_debug_data.yml b/conf/cmi/rest.resource.helfi_debug_data.yml index 60ffdc307..54c0a98fb 100644 --- a/conf/cmi/rest.resource.helfi_debug_data.yml +++ b/conf/cmi/rest.resource.helfi_debug_data.yml @@ -3,6 +3,7 @@ langcode: en status: true dependencies: module: + - basic_auth - helfi_api_base - serialization - user @@ -18,3 +19,4 @@ configuration: - json authentication: - cookie + - basic_auth diff --git a/conf/cmi/rest.resource.helfi_debug_package_version.yml b/conf/cmi/rest.resource.helfi_debug_package_version.yml index 24a48c351..b9c479541 100644 --- a/conf/cmi/rest.resource.helfi_debug_package_version.yml +++ b/conf/cmi/rest.resource.helfi_debug_package_version.yml @@ -3,6 +3,9 @@ langcode: en status: true dependencies: module: + - basic_auth + - helfi_api_base + - serialization - user id: helfi_debug_package_version plugin_id: helfi_debug_package_version @@ -14,3 +17,4 @@ configuration: - json authentication: - cookie + - basic_auth diff --git a/docker/openshift/entrypoints/20-deploy.sh b/docker/openshift/entrypoints/20-deploy.sh index e7dc298d6..d71b89c16 100644 --- a/docker/openshift/entrypoints/20-deploy.sh +++ b/docker/openshift/entrypoints/20-deploy.sh @@ -13,20 +13,44 @@ if [ ! -n "$OPENSHIFT_BUILD_NAME" ]; then exit 1 fi +function get_deploy_id { + echo $(drush state:get deploy_id) +} + # Generate twig caches. if [ ! -d "/tmp/twig" ]; then drush twig:compile || true fi +# Attempt to set deploy ID in case this is the first deploy. +if [[ -z "$(get_deploy_id)" ]]; then + drush state:set deploy_id $OPENSHIFT_BUILD_NAME +fi + +# Exit early if deploy ID is still not set. This usually means either Redis or +# something else is down. +if [[ -z "$(get_deploy_id)" ]]; then + echo "Could not fetch deploy ID. Something is probably wrong. Exiting early." + exit 1 +fi + # This script is run every time a container is spawned and certain environments might # start more than one Drupal container. This is used to make sure we run deploy # tasks only once per deploy. -if [ "$(drush state:get deploy_id)" != "$OPENSHIFT_BUILD_NAME" ]; then +if [ "$(get_deploy_id)" != "$OPENSHIFT_BUILD_NAME" ]; then drush state:set deploy_id $OPENSHIFT_BUILD_NAME - # Put site in maintenance mode during deploy + # Put site in maintenance mode drush state:set system.maintenance_mode 1 --input-format=integer + # Run helfi specific pre-deploy tasks. Allow this to fail in case + # the environment is not using the 'helfi_api_base' module. + # @see https://github.com/City-of-Helsinki/drupal-module-helfi-api-base + drush helfi:pre-deploy || true # Run maintenance tasks (config import, database updates etc) drush deploy + # Run helfi specific post deploy tasks. Allow this to fail in case + # the environment is not using the 'helfi_api_base' module. + # @see https://github.com/City-of-Helsinki/drupal-module-helfi-api-base + drush helfi:post-deploy || true # Disable maintenance mode drush state:set system.maintenance_mode 0 --input-format=integer fi diff --git a/public/sites/default/settings.php b/public/sites/default/settings.php index 0c1ebff55..0e41a605a 100755 --- a/public/sites/default/settings.php +++ b/public/sites/default/settings.php @@ -63,19 +63,16 @@ } $routes[] = 'http://127.0.0.1'; +if ($drush_options_uri = getenv('DRUSH_OPTIONS_URI')) { + $routes[] = $drush_options_uri; +} + foreach ($routes as $route) { $host = parse_url($route, PHP_URL_HOST); $trusted_host = str_replace('.', '\.', $host); $settings['trusted_host_patterns'][] = '^' . $trusted_host . '$'; } -$drush_options_uri = getenv('DRUSH_OPTIONS_URI'); - -if ($drush_options_uri && !in_array($drush_options_uri, $routes)) { - $host = str_replace('.', '\.', parse_url($drush_options_uri)['host']); - $settings['trusted_host_patterns'][] = '^' . $host . '$'; -} - $settings['config_sync_directory'] = '../conf/cmi'; $settings['file_public_path'] = getenv('DRUPAL_FILES_PUBLIC') ?: 'sites/default/files'; $settings['file_private_path'] = getenv('DRUPAL_FILES_PRIVATE'); @@ -171,6 +168,12 @@ $config['stage_file_proxy.settings']['use_imagecache_root'] = FALSE; } +// Map API accounts. The value should be a base64 encoded JSON string. +// @see https://github.com/City-of-Helsinki/drupal-module-helfi-api-base/blob/main/documentation/api-accounts.md. +if ($api_accounts = getenv('DRUPAL_API_ACCOUNTS')) { + $config['helfi_api_base.api_accounts']['accounts'] = json_decode(base64_decode($api_accounts), TRUE); +} + // Override session suffix when present. if ($session_suffix = getenv('DRUPAL_SESSION_SUFFIX')) { $config['helfi_proxy.settings']['session_suffix'] = $session_suffix;