From 3e38364fcd7edfee3df8d82e38ebc640c62add5c Mon Sep 17 00:00:00 2001 From: actions-bot Date: Thu, 20 Apr 2023 08:54:21 +0000 Subject: [PATCH 1/2] Update configuration --- composer.lock | 54 ++++++++++--------- ...tem.paragraphs_library_item.paragraphs.yml | 2 +- conf/cmi/core.extension.yml | 1 + ....field.node.landing_page.field_content.yml | 2 +- ...eld.field.node.landing_page.field_hero.yml | 2 +- .../field.field.node.page.field_content.yml | 2 +- conf/cmi/field.field.node.page.field_hero.yml | 2 +- ...ld.field.node.page.field_lower_content.yml | 2 +- ....field.node.page.field_sidebar_content.yml | 2 +- ...agraph.accordion.field_accordion_items.yml | 2 +- ...dion_item.field_accordion_item_content.yml | 2 +- ...raph.columns.field_columns_left_column.yml | 2 +- ...aph.columns.field_columns_right_column.yml | 2 +- ...ontact_card.field_contact_social_media.yml | 2 +- ...ontact_card_listing.field_contact_card.yml | 2 +- ...ist_of_links.field_list_of_links_links.yml | 4 +- ...d.paragraph.phasing.field_phasing_item.yml | 2 +- ...h.popular_services.field_service_items.yml | 4 +- ....tpr_service.tpr_service.field_content.yml | 2 +- ...ervice.tpr_service.field_lower_content.yml | 2 +- ...vice.tpr_service.field_sidebar_content.yml | 2 +- ....field.tpr_unit.tpr_unit.field_content.yml | 2 +- ....tpr_unit.tpr_unit.field_lower_content.yml | 2 +- conf/cmi/filter.format.plain_text.yml | 2 +- conf/cmi/rest.resource.entity.node.yml | 23 ++++++++ conf/cmi/rest.resource.helfi_debug_data.yml | 4 ++ ...t.resource.helfi_debug_package_version.yml | 4 ++ docker/openshift/entrypoints/20-deploy.sh | 28 +++++++++- public/sites/default/settings.php | 17 +++--- 29 files changed, 121 insertions(+), 58 deletions(-) create mode 100644 conf/cmi/rest.resource.entity.node.yml diff --git a/composer.lock b/composer.lock index 1f894cf8..d3f0fd64 100644 --- a/composer.lock +++ b/composer.lock @@ -2031,16 +2031,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": { @@ -2192,9 +2192,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", @@ -3741,16 +3741,16 @@ }, { "name": "drupal/hdbt", - "version": "5.0.20", + "version": "5.0.21", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-hdbt.git", - "reference": "a44d2c229bd5dd8fc301004f0e126671afc2df1f" + "reference": "ccc8c1cb500df43c95e1f6b2c7fac42c8f954eea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/a44d2c229bd5dd8fc301004f0e126671afc2df1f", - "reference": "a44d2c229bd5dd8fc301004f0e126671afc2df1f", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/ccc8c1cb500df43c95e1f6b2c7fac42c8f954eea", + "reference": "ccc8c1cb500df43c95e1f6b2c7fac42c8f954eea", "shasum": "" }, "require": { @@ -3768,10 +3768,10 @@ "Drupal" ], "support": { - "source": "https://github.com/City-of-Helsinki/drupal-hdbt/tree/5.0.20", + "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-18T09:55:29+00:00" + "time": "2023-04-19T11:08:29+00:00" }, { "name": "drupal/hdbt_admin", @@ -3859,23 +3859,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": { @@ -3892,10 +3892,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", @@ -5617,8 +5617,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.", @@ -9039,16 +9043,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": { @@ -9083,7 +9087,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", 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 8d0aeac7..e67d4098 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 3d8c43c1..f34a38dc 100644 --- a/conf/cmi/core.extension.yml +++ b/conf/cmi/core.extension.yml @@ -6,6 +6,7 @@ module: admin_toolbar: 0 admin_toolbar_tools: 0 allowed_formats: 0 + basic_auth: 0 block: 0 breakpoint: 0 ckeditor: 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 9cdda417..27cf82f3 100644 --- a/conf/cmi/field.field.node.landing_page.field_content.yml +++ b/conf/cmi/field.field.node.landing_page.field_content.yml @@ -29,7 +29,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 7c681f12..b44f17f7 100644 --- a/conf/cmi/field.field.node.landing_page.field_hero.yml +++ b/conf/cmi/field.field.node.landing_page.field_hero.yml @@ -12,7 +12,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.page.field_content.yml b/conf/cmi/field.field.node.page.field_content.yml index 2391ddad..3374b7ef 100644 --- a/conf/cmi/field.field.node.page.field_content.yml +++ b/conf/cmi/field.field.node.page.field_content.yml @@ -28,7 +28,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 8a1f40c8..d631a629 100644 --- a/conf/cmi/field.field.node.page.field_hero.yml +++ b/conf/cmi/field.field.node.page.field_hero.yml @@ -12,7 +12,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 efd54012..16063d0d 100644 --- a/conf/cmi/field.field.node.page.field_lower_content.yml +++ b/conf/cmi/field.field.node.page.field_lower_content.yml @@ -28,7 +28,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 b5ddd9b6..c6f1ba93 100644 --- a/conf/cmi/field.field.node.page.field_sidebar_content.yml +++ b/conf/cmi/field.field.node.page.field_sidebar_content.yml @@ -13,7 +13,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 02ec8392..1720d13f 100644 --- a/conf/cmi/field.field.paragraph.accordion.field_accordion_items.yml +++ b/conf/cmi/field.field.paragraph.accordion.field_accordion_items.yml @@ -15,7 +15,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 7f50171e..a5c4c3b6 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 @@ -15,7 +15,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 83cb426d..56da6771 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 @@ -13,7 +13,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 b510272b..a3d2f792 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 @@ -13,7 +13,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 f22f23f0..bcefe591 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 @@ -12,7 +12,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 a304a412..54d4c54d 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 @@ -12,7 +12,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 f7bc15bd..b2f4058c 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 @@ -12,8 +12,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 808bd208..aa8af901 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 8a34165b..31ed3bc9 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 @@ -12,8 +12,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 7071fe8f..8cf3b3b3 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 55ce397e..67a94a8e 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 5d9093a1..e227a4f8 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 21bdc669..2619078f 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 21511238..35d3036d 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.plain_text.yml b/conf/cmi/filter.format.plain_text.yml index 3f8b3ac0..73dc9436 100644 --- a/conf/cmi/filter.format.plain_text.yml +++ b/conf/cmi/filter.format.plain_text.yml @@ -4,7 +4,7 @@ status: true dependencies: module: - helfi_api_base -name: 'Plain text' +name: 'Puhdas teksti' format: plain_text weight: 10 filters: diff --git a/conf/cmi/rest.resource.entity.node.yml b/conf/cmi/rest.resource.entity.node.yml new file mode 100644 index 00000000..e116959e --- /dev/null +++ b/conf/cmi/rest.resource.entity.node.yml @@ -0,0 +1,23 @@ +uuid: 3f4ad863-f17d-4edf-9908-31a1ccdfc159 +langcode: en +status: true +dependencies: + module: + - basic_auth + - hal + - node +_core: + default_config_hash: t_jfECmZhJqBOJuSOFn87EOi_TWi-_fRYTuJgd19vgg +id: entity.node +plugin_id: 'entity:node' +granularity: resource +configuration: + methods: + - GET + - POST + - PATCH + - DELETE + formats: + - hal_json + authentication: + - basic_auth diff --git a/conf/cmi/rest.resource.helfi_debug_data.yml b/conf/cmi/rest.resource.helfi_debug_data.yml index 523e4634..9ddc792b 100644 --- a/conf/cmi/rest.resource.helfi_debug_data.yml +++ b/conf/cmi/rest.resource.helfi_debug_data.yml @@ -3,6 +3,9 @@ langcode: en status: true dependencies: module: + - basic_auth + - helfi_api_base + - serialization - user id: helfi_debug_data plugin_id: helfi_debug_data @@ -14,3 +17,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 15d35c7a..2299f211 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 e7dc298d..d71b89c1 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 0c1ebff5..0e41a605 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; From 203c9e3d06a781dabe06bf68dbd5d1a522345d9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Kalij=C3=A4rvi?= Date: Thu, 20 Apr 2023 12:30:23 +0300 Subject: [PATCH 2/2] Reverted labels. --- ...graphs_library_item.paragraphs_library_item.paragraphs.yml | 2 +- conf/cmi/field.field.node.landing_page.field_content.yml | 2 +- conf/cmi/field.field.node.landing_page.field_hero.yml | 2 +- conf/cmi/field.field.node.page.field_content.yml | 2 +- conf/cmi/field.field.node.page.field_hero.yml | 2 +- conf/cmi/field.field.node.page.field_lower_content.yml | 2 +- conf/cmi/field.field.node.page.field_sidebar_content.yml | 2 +- .../field.field.paragraph.accordion.field_accordion_items.yml | 2 +- ....paragraph.accordion_item.field_accordion_item_content.yml | 2 +- ...ield.field.paragraph.columns.field_columns_left_column.yml | 2 +- ...eld.field.paragraph.columns.field_columns_right_column.yml | 2 +- ...ield.paragraph.contact_card.field_contact_social_media.yml | 2 +- ...ield.paragraph.contact_card_listing.field_contact_card.yml | 2 +- ...ield.paragraph.list_of_links.field_list_of_links_links.yml | 4 ++-- conf/cmi/field.field.paragraph.phasing.field_phasing_item.yml | 2 +- ...d.field.paragraph.popular_services.field_service_items.yml | 4 ++-- .../cmi/field.field.tpr_service.tpr_service.field_content.yml | 2 +- ...ield.field.tpr_service.tpr_service.field_lower_content.yml | 2 +- ...ld.field.tpr_service.tpr_service.field_sidebar_content.yml | 2 +- conf/cmi/field.field.tpr_unit.tpr_unit.field_content.yml | 2 +- .../cmi/field.field.tpr_unit.tpr_unit.field_lower_content.yml | 2 +- conf/cmi/filter.format.plain_text.yml | 2 +- 22 files changed, 24 insertions(+), 24 deletions(-) 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 e67d4098..8d0aeac7 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: Lohkot +label: Paragraphs description: '' required: true translatable: true 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 27cf82f3..9cdda417 100644 --- a/conf/cmi/field.field.node.landing_page.field_content.yml +++ b/conf/cmi/field.field.node.landing_page.field_content.yml @@ -29,7 +29,7 @@ id: node.landing_page.field_content field_name: field_content entity_type: node bundle: landing_page -label: Sisältöalue +label: 'Content region' 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 b44f17f7..7c681f12 100644 --- a/conf/cmi/field.field.node.landing_page.field_hero.yml +++ b/conf/cmi/field.field.node.landing_page.field_hero.yml @@ -12,7 +12,7 @@ id: node.landing_page.field_hero field_name: field_hero entity_type: node bundle: landing_page -label: Hero-lohko +label: Hero 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 3374b7ef..2391ddad 100644 --- a/conf/cmi/field.field.node.page.field_content.yml +++ b/conf/cmi/field.field.node.page.field_content.yml @@ -28,7 +28,7 @@ id: node.page.field_content field_name: field_content entity_type: node bundle: page -label: 'Ylempi sisältöalue' +label: 'Upper content region' 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 d631a629..8a1f40c8 100644 --- a/conf/cmi/field.field.node.page.field_hero.yml +++ b/conf/cmi/field.field.node.page.field_hero.yml @@ -12,7 +12,7 @@ id: node.page.field_hero field_name: field_hero entity_type: node bundle: page -label: Hero-lohko +label: Hero 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 16063d0d..efd54012 100644 --- a/conf/cmi/field.field.node.page.field_lower_content.yml +++ b/conf/cmi/field.field.node.page.field_lower_content.yml @@ -28,7 +28,7 @@ id: node.page.field_lower_content field_name: field_lower_content entity_type: node bundle: page -label: 'Alempi sisältöalue' +label: 'Lower content region' 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 c6f1ba93..b5ddd9b6 100644 --- a/conf/cmi/field.field.node.page.field_sidebar_content.yml +++ b/conf/cmi/field.field.node.page.field_sidebar_content.yml @@ -13,7 +13,7 @@ id: node.page.field_sidebar_content field_name: field_sidebar_content entity_type: node bundle: page -label: 'Sivupalkin sisältö' +label: 'Sidebar content' 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 1720d13f..02ec8392 100644 --- a/conf/cmi/field.field.paragraph.accordion.field_accordion_items.yml +++ b/conf/cmi/field.field.paragraph.accordion.field_accordion_items.yml @@ -15,7 +15,7 @@ id: paragraph.accordion.field_accordion_items field_name: field_accordion_items entity_type: paragraph bundle: accordion -label: Sisältö +label: Items 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 a5c4c3b6..7f50171e 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 @@ -15,7 +15,7 @@ id: paragraph.accordion_item.field_accordion_item_content field_name: field_accordion_item_content entity_type: paragraph bundle: accordion_item -label: Sisältö +label: Content 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 56da6771..83cb426d 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 @@ -13,7 +13,7 @@ id: paragraph.columns.field_columns_left_column field_name: field_columns_left_column entity_type: paragraph bundle: columns -label: 'Vasen palsta' +label: 'Left column' 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 a3d2f792..b510272b 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 @@ -13,7 +13,7 @@ id: paragraph.columns.field_columns_right_column field_name: field_columns_right_column entity_type: paragraph bundle: columns -label: 'Oikea palsta' +label: 'Right column' 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 bcefe591..f22f23f0 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 @@ -12,7 +12,7 @@ id: paragraph.contact_card.field_contact_social_media field_name: field_contact_social_media entity_type: paragraph bundle: contact_card -label: 'Sosiaalinen media' +label: 'Social 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 54d4c54d..a304a412 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 @@ -12,7 +12,7 @@ id: paragraph.contact_card_listing.field_contact_card field_name: field_contact_card entity_type: paragraph bundle: contact_card_listing -label: Yhteystietokortti +label: 'Contact card' 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 b2f4058c..f7bc15bd 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 @@ -12,8 +12,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: Linkit -description: 'Linkkilistan linkit.' +label: Links +description: 'The links that you want the paragraph to display.' 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 aa8af901..808bd208 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: Vaihe +label: 'Phasing item' 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 31ed3bc9..8a34165b 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 @@ -12,8 +12,8 @@ id: paragraph.popular_services.field_service_items field_name: field_service_items entity_type: paragraph bundle: popular_services -label: Palvelut -description: 'Palvelut, joita esitellään.' +label: 'Service items' +description: 'Service items to showcase.' 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 8cf3b3b3..7071fe8f 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: 'Ylempi sisältöalue' +label: 'Upper content region' 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 67a94a8e..55ce397e 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: 'Alempi sisältöalue' +label: 'Lower content region' 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 e227a4f8..5d9093a1 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: 'Sivupalkin sisältö' +label: 'Sidebar content' 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 2619078f..21bdc669 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: 'Ylempi sisältöalue' +label: 'Upper content region' 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 35d3036d..21511238 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: 'Alempi sisältöalue' +label: 'Lower content region' description: '' required: false translatable: true diff --git a/conf/cmi/filter.format.plain_text.yml b/conf/cmi/filter.format.plain_text.yml index 73dc9436..3f8b3ac0 100644 --- a/conf/cmi/filter.format.plain_text.yml +++ b/conf/cmi/filter.format.plain_text.yml @@ -4,7 +4,7 @@ status: true dependencies: module: - helfi_api_base -name: 'Puhdas teksti' +name: 'Plain text' format: plain_text weight: 10 filters: