diff --git a/composer.lock b/composer.lock index 7a10aef6..727376f4 100644 --- a/composer.lock +++ b/composer.lock @@ -2727,17 +2727,17 @@ }, { "name": "drupal/editoria11y", - "version": "2.0.13", + "version": "2.0.14", "source": { "type": "git", "url": "https://git.drupalcode.org/project/editoria11y.git", - "reference": "2.0.13" + "reference": "2.0.14" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/editoria11y-2.0.13.zip", - "reference": "2.0.13", - "shasum": "2c1683f0c075918c74f7ccd526f7bc787f260a7f" + "url": "https://ftp.drupal.org/files/projects/editoria11y-2.0.14.zip", + "reference": "2.0.14", + "shasum": "ac0e3d232f3c36e0d7759f1991e08ef767d11acd" }, "require": { "drupal/core": "^9 || ^10" @@ -2745,8 +2745,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "2.0.13", - "datestamp": "1690052595", + "version": "2.0.14", + "datestamp": "1692130094", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -3658,7 +3658,7 @@ "source": { "type": "git", "url": "https://git.drupalcode.org/project/flysystem_azure.git", - "reference": "1f54cbcccaf9a7a609a48353fca78c3bdca71f1d" + "reference": "a29917177083ecb457f524ac8c7ff7e478c697e0" }, "require": { "drupal/core": "^8 || ^9", @@ -3673,7 +3673,7 @@ }, "drupal": { "version": "1.0.x-dev", - "datestamp": "1620053329", + "datestamp": "1692017626", "security-coverage": { "status": "not-covered", "message": "Project has not opted into security advisory coverage!" @@ -3986,16 +3986,16 @@ }, { "name": "drupal/hdbt", - "version": "5.5.4", + "version": "5.5.6", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-hdbt.git", - "reference": "9557d2dd8f24a1535e96db73202879b6c09073b8" + "reference": "aeb6fedc6f41d13d7bf3d8dd5e3a3636a9fc6558" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/9557d2dd8f24a1535e96db73202879b6c09073b8", - "reference": "9557d2dd8f24a1535e96db73202879b6c09073b8", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/aeb6fedc6f41d13d7bf3d8dd5e3a3636a9fc6558", + "reference": "aeb6fedc6f41d13d7bf3d8dd5e3a3636a9fc6558", "shasum": "" }, "require": { @@ -4013,10 +4013,10 @@ "Drupal" ], "support": { - "source": "https://github.com/City-of-Helsinki/drupal-hdbt/tree/5.5.4", + "source": "https://github.com/City-of-Helsinki/drupal-hdbt/tree/5.5.6", "issues": "https://github.com/City-of-Helsinki/drupal-hdbt/issues" }, - "time": "2023-08-15T07:11:28+00:00" + "time": "2023-08-24T14:28:34+00:00" }, { "name": "drupal/hdbt_admin", @@ -4105,16 +4105,16 @@ }, { "name": "drupal/helfi_api_base", - "version": "2.4.18", + "version": "2.4.19", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-module-helfi-api-base.git", - "reference": "ae834a75fff07abb6a52ce6eafe2617dcdbb23e5" + "reference": "917de458ac2ed2b046a9c4125094f3d233c47289" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-module-helfi-api-base/zipball/ae834a75fff07abb6a52ce6eafe2617dcdbb23e5", - "reference": "ae834a75fff07abb6a52ce6eafe2617dcdbb23e5", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-module-helfi-api-base/zipball/917de458ac2ed2b046a9c4125094f3d233c47289", + "reference": "917de458ac2ed2b046a9c4125094f3d233c47289", "shasum": "" }, "require": { @@ -4140,10 +4140,10 @@ ], "description": "Helfi - API Base", "support": { - "source": "https://github.com/City-of-Helsinki/drupal-module-helfi-api-base/tree/2.4.18", + "source": "https://github.com/City-of-Helsinki/drupal-module-helfi-api-base/tree/2.4.19", "issues": "https://github.com/City-of-Helsinki/drupal-module-helfi-api-base/issues" }, - "time": "2023-08-14T08:36:44+00:00" + "time": "2023-08-25T05:23:13+00:00" }, { "name": "drupal/helfi_azure_fs", @@ -4246,16 +4246,16 @@ }, { "name": "drupal/helfi_platform_config", - "version": "3.3.2", + "version": "3.3.5", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config.git", - "reference": "a44de2707583ec84fce7ddbef86906d00749d239" + "reference": "f950e0a07a2aa99f7c52c29df3b3a65f18bcccc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/a44de2707583ec84fce7ddbef86906d00749d239", - "reference": "a44de2707583ec84fce7ddbef86906d00749d239", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/f950e0a07a2aa99f7c52c29df3b3a65f18bcccc4", + "reference": "f950e0a07a2aa99f7c52c29df3b3a65f18bcccc4", "shasum": "" }, "require": { @@ -4358,10 +4358,10 @@ ], "description": "HELfi platform config", "support": { - "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/3.3.2", + "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/3.3.5", "issues": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/issues" }, - "time": "2023-08-10T06:02:41+00:00" + "time": "2023-08-23T11:08:09+00:00" }, { "name": "drupal/helfi_proxy", @@ -5288,17 +5288,17 @@ }, { "name": "drupal/oembed_providers", - "version": "2.1.1", + "version": "2.1.2", "source": { "type": "git", "url": "https://git.drupalcode.org/project/oembed_providers.git", - "reference": "2.1.1" + "reference": "2.1.2" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/oembed_providers-2.1.1.zip", - "reference": "2.1.1", - "shasum": "d0f87b92528b082d25f8b84b82a84d118fed12e0" + "url": "https://ftp.drupal.org/files/projects/oembed_providers-2.1.2.zip", + "reference": "2.1.2", + "shasum": "ad125c7e55555499f001755c365f96edce1d6343" }, "require": { "drupal/core": "^9.0|^10.0" @@ -5306,8 +5306,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "2.1.1", - "datestamp": "1683987092", + "version": "2.1.2", + "datestamp": "1692724351", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -10265,32 +10265,32 @@ }, { "name": "phrity/net-uri", - "version": "1.2.0", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/sirn-se/phrity-net-uri.git", - "reference": "c6ecf127e7c99a41ce04d3cdcda7f51108dd96f7" + "reference": "3f458e0c4d1ddc0e218d7a5b9420127c63925f43" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sirn-se/phrity-net-uri/zipball/c6ecf127e7c99a41ce04d3cdcda7f51108dd96f7", - "reference": "c6ecf127e7c99a41ce04d3cdcda7f51108dd96f7", + "url": "https://api.github.com/repos/sirn-se/phrity-net-uri/zipball/3f458e0c4d1ddc0e218d7a5b9420127c63925f43", + "reference": "3f458e0c4d1ddc0e218d7a5b9420127c63925f43", "shasum": "" }, "require": { - "php": "^7.4|^8.0", + "php": "^7.4 | ^8.0", "psr/http-factory": "^1.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 | ^2.0" }, "require-dev": { "php-coveralls/php-coveralls": "^2.0", - "phpunit/phpunit": "^9.0", + "phpunit/phpunit": "^9.0 | ^10.0", "squizlabs/php_codesniffer": "^3.0" }, "type": "library", "autoload": { "psr-4": { - "": "src/" + "Phrity\\Net\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -10314,9 +10314,9 @@ ], "support": { "issues": "https://github.com/sirn-se/phrity-net-uri/issues", - "source": "https://github.com/sirn-se/phrity-net-uri/tree/1.2.0" + "source": "https://github.com/sirn-se/phrity-net-uri/tree/1.3.0" }, - "time": "2022-11-30T07:20:06+00:00" + "time": "2023-08-21T10:33:06+00:00" }, { "name": "phrity/util-errorhandler", diff --git a/conf/cmi/system.action.user_add_role_action.super_administrator.yml b/conf/cmi/system.action.user_add_role_action.super_administrator.yml new file mode 100644 index 00000000..9ddf75a1 --- /dev/null +++ b/conf/cmi/system.action.user_add_role_action.super_administrator.yml @@ -0,0 +1,14 @@ +uuid: 8db61334-6040-41d0-8b71-ec088a491e4a +langcode: en +status: true +dependencies: + config: + - user.role.super_administrator + module: + - user +id: user_add_role_action.super_administrator +label: 'Add the Super administrator role to the selected user(s)' +type: user +plugin: user_add_role_action +configuration: + rid: super_administrator diff --git a/conf/cmi/system.action.user_remove_role_action.super_administrator.yml b/conf/cmi/system.action.user_remove_role_action.super_administrator.yml new file mode 100644 index 00000000..a1612055 --- /dev/null +++ b/conf/cmi/system.action.user_remove_role_action.super_administrator.yml @@ -0,0 +1,14 @@ +uuid: e2a7ce78-004c-4c08-ae74-f00ab26ae3ee +langcode: en +status: true +dependencies: + config: + - user.role.super_administrator + module: + - user +id: user_remove_role_action.super_administrator +label: 'Remove the Super administrator role from the selected user(s)' +type: user +plugin: user_remove_role_action +configuration: + rid: super_administrator diff --git a/conf/cmi/user.role.super_administrator.yml b/conf/cmi/user.role.super_administrator.yml new file mode 100644 index 00000000..6e8b4067 --- /dev/null +++ b/conf/cmi/user.role.super_administrator.yml @@ -0,0 +1,9 @@ +uuid: 38a7ecf2-90a0-44f2-8f35-bc06023f4b63 +langcode: en +status: true +dependencies: { } +id: super_administrator +label: 'Super administrator' +weight: 7 +is_admin: true +permissions: { } diff --git a/docker/openshift/Dockerfile b/docker/openshift/Dockerfile index 007fefd3..25b26fa5 100644 --- a/docker/openshift/Dockerfile +++ b/docker/openshift/Dockerfile @@ -5,9 +5,10 @@ COPY / /var/www/html/ WORKDIR /var/www/html RUN composer install --no-progress --profile --prefer-dist --no-interaction --no-dev --optimize-autoloader -# Copy deploy script -COPY docker/openshift/entrypoints/20-deploy.sh /entrypoints -RUN chmod +x /entrypoints/20-deploy.sh +# Copy ALL deploy scripts +COPY docker/openshift/entrypoints/ /entrypoints +RUN chmod +x /entrypoints/* + # Copy cron scripts RUN mkdir /crons diff --git a/tools/make/include.mk b/tools/make/include.mk index 2216bc1f..cf95f4d5 100644 --- a/tools/make/include.mk +++ b/tools/make/include.mk @@ -12,7 +12,6 @@ include $(DRUIDFI_TOOLS_MAKE_DIR)qa.mk IS_DRUPAL ?= $(shell test -f $(WEBROOT)/sites/default/settings.php && echo yes || echo no) IS_SYMFONY ?= $(shell test -f config/bundles.php && echo yes || echo no) -IS_WP ?= $(shell (test -f $(WEBROOT)/wp-settings.php || test -f conf/wp-config.php) && echo yes || echo no) ifeq ($(IS_DRUPAL),yes) include $(DRUIDFI_TOOLS_MAKE_DIR)drupal.mk @@ -22,10 +21,6 @@ ifeq ($(IS_SYMFONY),yes) include $(DRUIDFI_TOOLS_MAKE_DIR)symfony.mk endif -ifeq ($(IS_WP),yes) -include $(DRUIDFI_TOOLS_MAKE_DIR)wordpress.mk -endif - # # Hosting systems # diff --git a/tools/make/kubectl.mk b/tools/make/kubectl.mk index 91237eff..c85f123f 100644 --- a/tools/make/kubectl.mk +++ b/tools/make/kubectl.mk @@ -6,6 +6,7 @@ KUBECTL_WORKDIR ?= /app PHONY += kubectl-sync-db kubectl-sync-db: ## Sync database from Kubernetes + $(call drush,sql-drop --quiet -y) ifeq ($(DUMP_SQL_EXISTS),no) $(eval POD := $(call kubectl_get_pod)) $(call step,Get database dump from $(POD)...\n) diff --git a/tools/make/wordpress.mk b/tools/make/wordpress.mk deleted file mode 100644 index b6af511c..00000000 --- a/tools/make/wordpress.mk +++ /dev/null @@ -1,98 +0,0 @@ -WP_FRESH_TARGETS := up build sync post-install -BUILD_TARGETS += set-files -WP_CONF_PATH := conf -WP_DELETE_PLUGINS := akismet hello -WP_DELETE_THEMES := twentynineteen twentyseventeen -WP_SQL_READY := yes -WP_POST_INSTALL_TARGETS := prepare -DUMP_SQL_EXISTS := $(shell test -f $(DUMP_SQL_FILENAME) && echo yes || echo no) -SYNC_TARGETS += wp-sync-db wp-sync-files - -ifeq ($(GH_DUMP_ARTIFACT),yes) - WP_FRESH_TARGETS := gh-download-dump $(WP_FRESH_TARGETS) -endif - -PHONY += fresh -fresh: ## Build fresh development environment - @$(MAKE) $(WP_FRESH_TARGETS) - -PHONY += post-install -post-install: ## Run post-install actions - @$(MAKE) $(WP_POST_INSTALL_TARGETS) - -PHONY += set-files -set-files: - $(call step,Remove obsolete files\n) - @rm -f $(WEBROOT)/*.{txt,html} $(WEBROOT)/composer.json && printf "Files deleted.\n" - $(call step,Copy $(WP_CONF_PATH)/wp-config.php to $(WEBROOT)...\n) - $(call copy,$(WP_CONF_PATH)/wp-config.php,$(WEBROOT)/wp-config.php) - -PHONY += prepare -prepare: - $(call step,Delete inactivated plugins\n) - $(call wp,plugin delete $(WP_DELETE_PLUGINS)) - $(call step,Delete inactivated themes\n) - $(call wp,theme delete $(WP_DELETE_THEMES)) - $(call step,Replace $(WP_SYNC_SOURCE) domain with local domain\n) - $(call wp,search-replace $(WP_SYNC_SOURCE_DOMAIN) $(WP_HOSTNAME)) - $(call step,Check your site: https://$(WP_HOSTNAME)) - -PHONY += wp-sync-db -wp-sync-db: ## Sync database -ifeq ($(DUMP_SQL_EXISTS),yes) - $(call step,Import local SQL dump...\n) - $(call wp,db import $(DUMP_SQL_FILENAME)) -else - $(call step,Create database dump in $(WP_SYNC_SOURCE)...) - $(eval HOST := INSTANCE_$(WP_SYNC_SOURCE)_HOST) - $(eval USER := INSTANCE_$(WP_SYNC_SOURCE)_USER) - $(eval OPTS := INSTANCE_$(WP_SYNC_SOURCE)_OPTS) - @ssh $($(OPTS)) $($(USER))@$($(HOST)) -t "cd $(DOCKER_PROJECT_ROOT)/$(WEBROOT); wp db export $(DUMP_SQL_FILENAME); exit;" - $(call step,Download $(DUMP_SQL_FILENAME) from test server...) - @scp $($(OPTS)) $($(USER))@$($(HOST)):/var/www/html/$(WEBROOT)/$(DUMP_SQL_FILENAME) ./$(DUMP_SQL_FILENAME) - $(call step,Remove the $(DUMP_SQL_FILENAME) from $(WP_SYNC_SOURCE)...) - @ssh $($(OPTS)) $($(USER))@$($(HOST)) -t "rm $(DOCKER_PROJECT_ROOT)/$(WEBROOT)/$(DUMP_SQL_FILENAME); exit;" && echo "Removed" - $(call step,Import $(DUMP_SQL_FILENAME) to local database...) - $(call wp,db import $(DUMP_SQL_FILENAME)) -endif - -PHONY += wp-sync-files -wp-sync-files: UPLOADS := wp-content/uploads -wp-sync-files: ## Sync files - $(call step,Sync files from $(WP_SYNC_SOURCE)...\n) - $(eval HOST := INSTANCE_$(WP_SYNC_SOURCE)_HOST) - $(eval USER := INSTANCE_$(WP_SYNC_SOURCE)_USER) - $(eval OPTS := INSTANCE_$(WP_SYNC_SOURCE)_OPTS) - @rsync -av -e "ssh $($(OPTS))" $($(USER))@$($(HOST)):$(DOCKER_PROJECT_ROOT)/$(WEBROOT)/$(UPLOADS)/ $(WEBROOT)/$(UPLOADS)/ - -PHONY += wp-cache-flush -wp-cache-flush: ## Flush cache - $(call step,Flush cache) - $(call wp,cache flush) - -PHONY += wp-login -wp-login: ## Get login link - $(call wp,package install aaemnnosttv/wp-cli-login-command --quiet) - $(call wp,login install --activate --yes --quiet) - $(call wp,login create 1 --url-only) - -PHONY += wp-help -wp-help: ## Show wp-cli help - $(call wp,) - -PHONY += wp-plugins -wp-plugins: ## List plugins - $(call step,List plugins) - $(call wp,plugin list) - -define wp - $(call docker_compose_exec,wp --color --path=$(DOCKER_PROJECT_ROOT)/$(WEBROOT) $(1)) -endef - -ifeq ($(WP_SYNC_SOURCE),) - $(error WP_SYNC_SOURCE is not set. Add eg. WP_SYNC_SOURCE=prod to .env file) -endif - -ifeq ($(WP_SYNC_SOURCE_DOMAIN),) - $(error WP_SYNC_SOURCE_DOMAIN is not set. Add eg. WP_SYNC_SOURCE_DOMAIN=domain.tld to .env file) -endif