From 881007f1fd8cafbda068c69d2e9f4aadbe884737 Mon Sep 17 00:00:00 2001 From: tuutti <771113+tuutti@users.noreply.github.com> Date: Mon, 17 Feb 2025 08:14:41 +0000 Subject: [PATCH] Update configuration --- .platform/schema | 2 +- composer.lock | 156 ++++++++++-------- conf/cmi/views.view.er_tpr_unit.yml | 2 +- conf/cmi/views.view.locked_services.yml | 2 +- conf/cmi/views.view.locked_units.yml | 2 +- conf/cmi/views.view.service_list.yml | 4 +- conf/cmi/views.view.service_units.yml | 6 +- conf/cmi/views.view.unit_search.yml | 2 +- docker/openshift/Dockerfile | 14 +- docker/openshift/cron-entrypoint.sh | 42 ----- docker/openshift/deploy/10-preflight.sh | 11 ++ docker/openshift/deploy/20-deploy.sh | 27 +++ .../openshift/entrypoints/15-twig-compile.sh | 6 + docker/openshift/entrypoints/20-deploy.sh | 1 + 14 files changed, 145 insertions(+), 132 deletions(-) delete mode 100644 docker/openshift/cron-entrypoint.sh create mode 100644 docker/openshift/deploy/10-preflight.sh create mode 100644 docker/openshift/deploy/20-deploy.sh create mode 100644 docker/openshift/entrypoints/15-twig-compile.sh diff --git a/.platform/schema b/.platform/schema index 3f10ffe7..19c7bdba 100644 --- a/.platform/schema +++ b/.platform/schema @@ -1 +1 @@ -15 \ No newline at end of file +16 \ No newline at end of file diff --git a/composer.lock b/composer.lock index 49199a8f..792b0c4e 100644 --- a/composer.lock +++ b/composer.lock @@ -3173,17 +3173,17 @@ }, { "name": "drupal/entity_browser", - "version": "2.12.0", + "version": "2.13.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/entity_browser.git", - "reference": "8.x-2.12" + "reference": "8.x-2.13" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/entity_browser-8.x-2.12.zip", - "reference": "8.x-2.12", - "shasum": "eeafb55f02317c63b17d71913cb918e6341b7c0d" + "url": "https://ftp.drupal.org/files/projects/entity_browser-8.x-2.13.zip", + "reference": "8.x-2.13", + "shasum": "9c31caed2602a5cb582cb4f1e1feaac44cbbc21b" }, "require": { "drupal/core": "^10.2 || ^11" @@ -3192,12 +3192,11 @@ "drupal/media_entity": "1.*" }, "require-dev": { - "drupal/ckeditor": "^1.0", "drupal/embed": "^1.0", "drupal/entity_embed": "^1.0", "drupal/entity_reference_revisions": "^1.0", "drupal/entityqueue": "^1.0", - "drupal/inline_entity_form": "^1.0@rc", + "drupal/inline_entity_form": "^1 || ^3", "drupal/paragraphs": "^1.0", "drupal/search_api": "^1.0", "drupal/token": "^1.0" @@ -3205,8 +3204,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-2.12", - "datestamp": "1730631838", + "version": "8.x-2.13", + "datestamp": "1739701403", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -3332,17 +3331,17 @@ }, { "name": "drupal/entity_usage", - "version": "2.0.0-beta17", + "version": "2.0.0-beta18", "source": { "type": "git", "url": "https://git.drupalcode.org/project/entity_usage.git", - "reference": "8.x-2.0-beta17" + "reference": "8.x-2.0-beta18" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/entity_usage-8.x-2.0-beta17.zip", - "reference": "8.x-2.0-beta17", - "shasum": "29691274f6b68b13a8d1ba295677453c85c2ed39" + "url": "https://ftp.drupal.org/files/projects/entity_usage-8.x-2.0-beta18.zip", + "reference": "8.x-2.0-beta18", + "shasum": "d7303b5b0384da129580236cc96bb06990eeadef" }, "require": { "drupal/core": "^10.2 || ^11" @@ -3357,13 +3356,14 @@ "drupal/entity_reference_revisions": "~1.0", "drupal/inline_entity_form": "^1.0@RC || ^3.0@RC", "drupal/paragraphs": "~1.0", + "drupal/redirect": "^1.11", "drupal/webform": "^6.0.0-alpha4" }, "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-2.0-beta17", - "datestamp": "1736865887", + "version": "8.x-2.0-beta18", + "datestamp": "1739640732", "security-coverage": { "status": "not-covered", "message": "Beta releases are not covered by Drupal security advisories." @@ -3942,17 +3942,17 @@ }, { "name": "drupal/gin", - "version": "4.0.2", + "version": "4.0.4", "source": { "type": "git", "url": "https://git.drupalcode.org/project/gin.git", - "reference": "4.0.2" + "reference": "4.0.4" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/gin-4.0.2.zip", - "reference": "4.0.2", - "shasum": "501f167bd7009cffa29848a918b3982cb0a8245b" + "url": "https://ftp.drupal.org/files/projects/gin-4.0.4.zip", + "reference": "4.0.4", + "shasum": "de1a6012eb5543ac4fb807e8314e369d64812c62" }, "require": { "drupal/core": "^10 || ^11", @@ -3961,8 +3961,8 @@ "type": "drupal-theme", "extra": { "drupal": { - "version": "4.0.2", - "datestamp": "1735405135", + "version": "4.0.4", + "datestamp": "1739529395", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -4125,16 +4125,16 @@ }, { "name": "drupal/hdbt", - "version": "6.9.16", + "version": "6.9.21", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-hdbt.git", - "reference": "b30f5a708ee6a9fbf5b777683667a35473103fa7" + "reference": "a414f2e44295948058e7a90434755d1d36d97889" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/b30f5a708ee6a9fbf5b777683667a35473103fa7", - "reference": "b30f5a708ee6a9fbf5b777683667a35473103fa7", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/a414f2e44295948058e7a90434755d1d36d97889", + "reference": "a414f2e44295948058e7a90434755d1d36d97889", "shasum": "" }, "require": { @@ -4153,10 +4153,10 @@ "Drupal" ], "support": { - "source": "https://github.com/City-of-Helsinki/drupal-hdbt/tree/6.9.16", + "source": "https://github.com/City-of-Helsinki/drupal-hdbt/tree/6.9.21", "issues": "https://github.com/City-of-Helsinki/drupal-hdbt/issues" }, - "time": "2025-02-11T07:11:26+00:00" + "time": "2025-02-14T10:43:01+00:00" }, { "name": "drupal/hdbt_admin", @@ -4344,12 +4344,12 @@ "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-tools.git", - "reference": "bc5416375195d1307adf188098d75a19a5de0224" + "reference": "cdb4837a98b7f30f2db719e03f45507abfedbe3b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-tools/zipball/bc5416375195d1307adf188098d75a19a5de0224", - "reference": "bc5416375195d1307adf188098d75a19a5de0224", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-tools/zipball/cdb4837a98b7f30f2db719e03f45507abfedbe3b", + "reference": "cdb4837a98b7f30f2db719e03f45507abfedbe3b", "shasum": "" }, "require": { @@ -4424,7 +4424,7 @@ "source": "https://github.com/City-of-Helsinki/drupal-tools/tree/main", "issues": "https://github.com/City-of-Helsinki/drupal-tools/issues" }, - "time": "2025-01-15T12:24:04+00:00" + "time": "2025-02-14T10:49:04+00:00" }, { "name": "drupal/helfi_navigation", @@ -4462,16 +4462,16 @@ }, { "name": "drupal/helfi_platform_config", - "version": "4.12.16", + "version": "4.12.18", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config.git", - "reference": "f903111158324d608b3d60f837472934d3d93f2d" + "reference": "06ae3bf2e741d88ad542a8d2c5f261ed80765936" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/f903111158324d608b3d60f837472934d3d93f2d", - "reference": "f903111158324d608b3d60f837472934d3d93f2d", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/06ae3bf2e741d88ad542a8d2c5f261ed80765936", + "reference": "06ae3bf2e741d88ad542a8d2c5f261ed80765936", "shasum": "" }, "require": { @@ -4595,10 +4595,10 @@ ], "description": "HELfi platform config", "support": { - "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/4.12.16", + "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/4.12.18", "issues": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/issues" }, - "time": "2025-02-10T15:16:22+00:00" + "time": "2025-02-14T06:03:48+00:00" }, { "name": "drupal/helfi_proxy", @@ -5593,20 +5593,20 @@ }, { "name": "drupal/openid_connect", - "version": "3.0.0-alpha5", + "version": "3.0.0-alpha6", "source": { "type": "git", "url": "https://git.drupalcode.org/project/openid_connect.git", - "reference": "3.0.0-alpha5" + "reference": "3.0.0-alpha6" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/openid_connect-3.0.0-alpha5.zip", - "reference": "3.0.0-alpha5", - "shasum": "6bca4f7ac0f675370008a0631095722347379b04" + "url": "https://ftp.drupal.org/files/projects/openid_connect-3.0.0-alpha6.zip", + "reference": "3.0.0-alpha6", + "shasum": "ae9b7a24d8ad2534756e5b2689fad6688e6b3cb0" }, "require": { - "drupal/core": "^9.5 || ^10.2 || ^11", + "drupal/core": "^10.2 || ^11", "drupal/externalauth": "^2.0", "ext-json": "*", "php": ">=8.1.0" @@ -5614,8 +5614,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "3.0.0-alpha5", - "datestamp": "1735590945", + "version": "3.0.0-alpha6", + "datestamp": "1739445531", "security-coverage": { "status": "not-covered", "message": "Alpha releases are not covered by Drupal security advisories." @@ -5843,7 +5843,7 @@ "extra": { "drupal": { "version": "8.x-1.13", - "datestamp": "1722507672", + "datestamp": "1739552840", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -7330,12 +7330,20 @@ "shasum": "9fbddb71417113d58345d2fbe9d0a1aa9c5d5c36" }, "require": { - "drupal/core": "^8 || ^9 || ^10" + "drupal/core": "^8 || ^9 || ^10", + "drupal/purge": "~3.0" }, "require-dev": { - "drupal/purge": "*", + "behat/mink-extension": "v2.2", + "behat/mink-selenium2-driver": "1.3.x-dev", + "bex/behat-screenshot": "dev-master", + "drupal/coder": "^8.3", + "drupal/drupal-extension": "master-dev", + "drupal/purge": "dev-3.x", "drupal/purge_tokens": "*", - "drupal/varnish_purger-varnish_purger": "*" + "drupal/varnish_purger-varnish_purger": "*", + "phpmd/phpmd": "dev-master", + "phpmetrics/phpmetrics": "dev-master" }, "type": "drupal-module", "extra": { @@ -7350,13 +7358,17 @@ }, "notification-url": "https://packages.drupal.org/8/downloads", "license": [ - "GPL-2.0-or-later" + "GPL-2.0+" ], "authors": [ { "name": "deadbeef", "homepage": "https://www.drupal.org/user/93644" }, + { + "name": "dieterholvoet", + "homepage": "https://www.drupal.org/user/3567222" + }, { "name": "javivf", "homepage": "https://www.drupal.org/user/2789335" @@ -7366,10 +7378,11 @@ "homepage": "https://www.drupal.org/user/2479724" }, { - "name": "MiSc", + "name": "misc", "homepage": "https://www.drupal.org/user/382892" } ], + "description": "Provides a purger for Varnish for Purger module.", "homepage": "https://www.drupal.org/project/varnish_purge", "support": { "source": "https://git.drupalcode.org/project/varnish_purge" @@ -7501,17 +7514,17 @@ }, { "name": "drupal/views_bulk_operations", - "version": "4.3.2", + "version": "4.3.3", "source": { "type": "git", "url": "https://git.drupalcode.org/project/views_bulk_operations.git", - "reference": "4.3.2" + "reference": "4.3.3" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/views_bulk_operations-4.3.2.zip", - "reference": "4.3.2", - "shasum": "b3d0ee06abb15520595b83324e93c5500d5dcef3" + "url": "https://ftp.drupal.org/files/projects/views_bulk_operations-4.3.3.zip", + "reference": "4.3.3", + "shasum": "60d83a18ef31fd1e85fb30137fd03a55cad275f3" }, "require": { "drupal/core": "^10.3 || ^11" @@ -7528,8 +7541,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "4.3.2", - "datestamp": "1731070018", + "version": "4.3.3", + "datestamp": "1739278730", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -7557,9 +7570,9 @@ "description": "Adds an ability to perform bulk operations on selected entities from view results. Provides an API to create such operations.", "homepage": "https://www.drupal.org/project/views_bulk_operations", "support": { - "source": "https://git.drupalcode.org/project/views_bulk_operations/-/tree/8.x-3.x", - "issues": "https://www.drupal.org/project/issues/views_bulk_operations?version=8.x", - "docs": "https://www.drupal.org/docs/8/modules/views-bulk-operations-vbo" + "source": "https://git.drupalcode.org/project/views_bulk_operations", + "issues": "https://www.drupal.org/project/issues/views_bulk_operations?version=any_4.", + "docs": "https://www.drupal.org/docs/contributed-modules/views-bulk-operations-vbo" } }, { @@ -14247,24 +14260,23 @@ }, { "name": "twig/twig", - "version": "v3.19.0", + "version": "v3.20.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "d4f8c2b86374f08efc859323dbcd95c590f7124e" + "reference": "3468920399451a384bef53cf7996965f7cd40183" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/d4f8c2b86374f08efc859323dbcd95c590f7124e", - "reference": "d4f8c2b86374f08efc859323dbcd95c590f7124e", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/3468920399451a384bef53cf7996965f7cd40183", + "reference": "3468920399451a384bef53cf7996965f7cd40183", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1.0", "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php81": "^1.29" + "symfony/polyfill-mbstring": "^1.3" }, "require-dev": { "phpstan/phpstan": "^2.0", @@ -14311,7 +14323,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.19.0" + "source": "https://github.com/twigphp/Twig/tree/v3.20.0" }, "funding": [ { @@ -14323,7 +14335,7 @@ "type": "tidelift" } ], - "time": "2025-01-29T07:06:14+00:00" + "time": "2025-02-13T08:34:43+00:00" }, { "name": "twistor/flysystem-stream-wrapper", diff --git a/conf/cmi/views.view.er_tpr_unit.yml b/conf/cmi/views.view.er_tpr_unit.yml index 8c8ebf5f..718471df 100644 --- a/conf/cmi/views.view.er_tpr_unit.yml +++ b/conf/cmi/views.view.er_tpr_unit.yml @@ -91,7 +91,6 @@ display: type: mini options: offset: 0 - pagination_heading_level: h4 items_per_page: 10 total_pages: null id: 0 @@ -106,6 +105,7 @@ display: items_per_page_options_all_label: '- All -' offset: false offset_label: Offset + pagination_heading_level: h4 exposed_form: type: basic options: diff --git a/conf/cmi/views.view.locked_services.yml b/conf/cmi/views.view.locked_services.yml index e415252d..cc8f0814 100644 --- a/conf/cmi/views.view.locked_services.yml +++ b/conf/cmi/views.view.locked_services.yml @@ -381,7 +381,6 @@ display: type: full options: offset: 0 - pagination_heading_level: h4 items_per_page: 50 total_pages: null id: 0 @@ -399,6 +398,7 @@ display: offset: false offset_label: Offset quantity: 9 + pagination_heading_level: h4 exposed_form: type: basic options: diff --git a/conf/cmi/views.view.locked_units.yml b/conf/cmi/views.view.locked_units.yml index 42e93f44..ab35d997 100644 --- a/conf/cmi/views.view.locked_units.yml +++ b/conf/cmi/views.view.locked_units.yml @@ -381,7 +381,6 @@ display: type: full options: offset: 0 - pagination_heading_level: h4 items_per_page: 50 total_pages: null id: 0 @@ -399,6 +398,7 @@ display: offset: false offset_label: Offset quantity: 9 + pagination_heading_level: h4 exposed_form: type: basic options: diff --git a/conf/cmi/views.view.service_list.yml b/conf/cmi/views.view.service_list.yml index e0d9d02a..746f7477 100644 --- a/conf/cmi/views.view.service_list.yml +++ b/conf/cmi/views.view.service_list.yml @@ -109,7 +109,6 @@ display: type: full options: offset: 0 - pagination_heading_level: h4 items_per_page: 4 total_pages: null id: 0 @@ -127,6 +126,7 @@ display: offset: false offset_label: Offset quantity: 9 + pagination_heading_level: h4 exposed_form: type: basic options: @@ -646,7 +646,6 @@ display: type: full options: offset: 0 - pagination_heading_level: h4 items_per_page: 5 total_pages: null id: 0 @@ -664,6 +663,7 @@ display: offset: false offset_label: Offset quantity: 9 + pagination_heading_level: h4 exposed_form: type: basic options: diff --git a/conf/cmi/views.view.service_units.yml b/conf/cmi/views.view.service_units.yml index 85678618..f4389def 100644 --- a/conf/cmi/views.view.service_units.yml +++ b/conf/cmi/views.view.service_units.yml @@ -8,7 +8,7 @@ dependencies: - helfi_tpr - user _core: - default_config_hash: O46G67qV6_G1xzwLExy9VPlecjQCKLaSIOuBoK11V18 + default_config_hash: nPWw6LpPY3CT9DQwdHOOtIiHmatTZbcX6eSBxtbrq5A id: service_units label: 'Service units' module: views @@ -93,8 +93,7 @@ display: type: full options: offset: 0 - pagination_heading_level: h4 - items_per_page: 8 + items_per_page: 15 total_pages: null id: 0 tags: @@ -111,6 +110,7 @@ display: offset: false offset_label: Offset quantity: 9 + pagination_heading_level: h4 exposed_form: type: basic options: diff --git a/conf/cmi/views.view.unit_search.yml b/conf/cmi/views.view.unit_search.yml index 38c913d8..91cf0ae6 100644 --- a/conf/cmi/views.view.unit_search.yml +++ b/conf/cmi/views.view.unit_search.yml @@ -286,7 +286,6 @@ display: type: full options: offset: 0 - pagination_heading_level: h4 items_per_page: 15 total_pages: null id: 0 @@ -304,6 +303,7 @@ display: offset: false offset_label: Offset quantity: 9 + pagination_heading_level: h4 exposed_form: type: basic options: diff --git a/docker/openshift/Dockerfile b/docker/openshift/Dockerfile index 32d4a3a2..401de35e 100644 --- a/docker/openshift/Dockerfile +++ b/docker/openshift/Dockerfile @@ -5,17 +5,15 @@ COPY / /var/www/html/ WORKDIR /var/www/html RUN composer install --no-progress --profile --prefer-dist --no-interaction --no-dev --optimize-autoloader -# Copy ALL deploy scripts +# Copy custom entrypoints. +# @see https://github.com/City-of-Helsinki/drupal-docker-images/tree/main/openshift/drupal +RUN mkdir -p /crons /entrypoints /deploy COPY docker/openshift/entrypoints/ /entrypoints -RUN chmod +x /entrypoints/* +COPY docker/openshift/crons/ /crons +COPY docker/openshift/deploy /deploy +RUN chmod +x /entrypoints/* /deploy/* /crons/* COPY docker/openshift/init.sh / -# Copy cron scripts -RUN mkdir /crons -COPY docker/openshift/crons/ /crons -COPY docker/openshift/cron-entrypoint.sh /usr/local/bin/cron-entrypoint -RUN chmod +x /crons/* /usr/local/bin/cron-entrypoint - # Copy nginx overrides. COPY docker/openshift/custom.locations /etc/nginx/conf.d/custom.locations diff --git a/docker/openshift/cron-entrypoint.sh b/docker/openshift/cron-entrypoint.sh deleted file mode 100644 index b9f55232..00000000 --- a/docker/openshift/cron-entrypoint.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -source /init.sh - -echo "Starting cron: $(date)" - -# You can add any additional cron "daemons" to docker/openshift/crons/ folder. -# -# Example: -# @code -# #!/bin/bash -# while true -# do -# drush some-command -# sleep 600 -# done -# @endcode - -for cron in /crons/*.sh; do - # Skip legacy base.sh script if it exists. - # Skip Kubernetes hooks that are stored in crons directory. - if [[ "${cron##*/}" == "base.sh" ]] || [[ "${cron##*/}" == *-hook.sh ]]; then - continue - elif [[ -r "$cron" ]]; then - echo "Starting $cron" - exec "$cron" & - fi -done - -while true -do - # Rudimentary process supervisor: - # Waits for the next process to terminate. The parent - # process is killed if any subprocess exists with failure. - # OpenShift should then restart the cron pod. - wait -n - exit_code=$? - if [[ "$exit_code" -ne 0 ]]; then - output_error_message "Cron subprocess failed with exit code $exit_code" - exit 1 - fi -done diff --git a/docker/openshift/deploy/10-preflight.sh b/docker/openshift/deploy/10-preflight.sh new file mode 100644 index 00000000..b58e6213 --- /dev/null +++ b/docker/openshift/deploy/10-preflight.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +source /init.sh + +if [ -f "../docker/openshift/preflight/preflight.php" ]; then + echo "Running preflight checks ..." + if ! php ../docker/openshift/preflight/preflight.php; then + exit 1 + fi +fi + diff --git a/docker/openshift/deploy/20-deploy.sh b/docker/openshift/deploy/20-deploy.sh new file mode 100644 index 00000000..bec9b3ad --- /dev/null +++ b/docker/openshift/deploy/20-deploy.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +# Skip deployment script if ENV var is true +if [ "$SKIP_DEPLOY_SCRIPTS" = "true" ]; then + echo "SKIP_DEPLOY_SCRIPTS is true. Skipping the steps." + return +fi + +source /init.sh + +echo "Starting deploy: $(date)" + +# Populate deploy ID so 20-deploy.sh is skipped. +# @todo Remove this once 20-deploy.sh is removed. +set_deploy_id $OPENSHIFT_BUILD_NAME + +drush state:set system.maintenance_mode 1 --input-format=integer +# Run pre-deploy tasks. +# @see https://github.com/City-of-Helsinki/drupal-module-helfi-api-base/blob/main/documentation/deploy-hooks.md +drush helfi:pre-deploy || true +# Run maintenance tasks (config import, database updates etc) +drush deploy +# Run post-deploy tasks. +# @see https://github.com/City-of-Helsinki/drupal-module-helfi-api-base/blob/main/documentation/deploy-hooks.md +drush helfi:post-deploy || true +# Disable maintenance mode +drush state:set system.maintenance_mode 0 --input-format=integer diff --git a/docker/openshift/entrypoints/15-twig-compile.sh b/docker/openshift/entrypoints/15-twig-compile.sh new file mode 100644 index 00000000..c164dbee --- /dev/null +++ b/docker/openshift/entrypoints/15-twig-compile.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# Populate twig caches. +if [ ! -d "/tmp/twig" ]; then + drush twig:compile || true +fi diff --git a/docker/openshift/entrypoints/20-deploy.sh b/docker/openshift/entrypoints/20-deploy.sh index 4c02d6f1..a983c701 100644 --- a/docker/openshift/entrypoints/20-deploy.sh +++ b/docker/openshift/entrypoints/20-deploy.sh @@ -1,4 +1,5 @@ #!/bin/bash +# NOTE: This script is being phased out in favor of new deployment job pod. # Skip deployment script if ENV var is true if [ "$SKIP_DEPLOY_SCRIPTS" = "true" ]; then