Skip to content

Commit

Permalink
Update configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-bot authored Dec 19, 2022
1 parent ccace3a commit f2ebcd0
Show file tree
Hide file tree
Showing 14 changed files with 240 additions and 164 deletions.
16 changes: 8 additions & 8 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@
*.config text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.css text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.dist text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.engine text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.engine text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
*.html text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=html
*.inc text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.install text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.inc text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
*.install text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
*.js text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.json text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.lock text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.map text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.md text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.module text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.module text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
*.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
*.po text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.profile text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.profile text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
*.script text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.sh text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.sh text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
*.sql text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.svg text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.theme text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.theme text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
*.twig text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.txt text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.xml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
Expand Down
257 changes: 129 additions & 128 deletions composer.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ langcode: en
status: true
dependencies:
config:
- field.field.paragraph.popular_services.field_popular_services_title
- field.field.paragraph.popular_services.field_service_items
- paragraphs.paragraphs_type.popular_services
module:
Expand All @@ -16,7 +17,7 @@ mode: default
content:
field_service_items:
type: paragraphs
weight: 0
weight: 1
region: content
settings:
title: Paragraph
Expand All @@ -32,6 +33,15 @@ content:
collapse_edit_all: collapse_edit_all
duplicate: duplicate
third_party_settings: { }
field_popular_services_title:
type: string_textfield
weight: 0
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
hidden:
created: true
field_popular_services_title: true
status: true
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ langcode: en
status: true
dependencies:
config:
- field.field.paragraph.popular_services.field_popular_services_title
- field.field.paragraph.popular_services.field_service_items
- paragraphs.paragraphs_type.popular_services
module:
Expand All @@ -21,7 +22,16 @@ content:
view_mode: default
link: ''
third_party_settings: { }
weight: 1
region: content
field_popular_services_title:
type: string
label: hidden
settings:
link_to_entity: false
third_party_settings: { }
weight: 0
region: content
hidden:
field_popular_services_title: true
search_api_excerpt: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
uuid: a0ad4f64-cf71-42d7-ada8-5a82f7f4f595
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.field_popular_services_title
- paragraphs.paragraphs_type.popular_services
id: paragraph.popular_services.field_popular_services_title
field_name: field_popular_services_title
entity_type: paragraph
bundle: popular_services
label: Title
description: 'If this field is left empty, the title will be "Popular services"'
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: string
21 changes: 21 additions & 0 deletions conf/cmi/field.storage.paragraph.field_popular_services_title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
uuid: 09b044bf-66af-4947-ad10-ee8fcb2b7929
langcode: en
status: true
dependencies:
module:
- paragraphs
id: paragraph.field_popular_services_title
field_name: field_popular_services_title
entity_type: paragraph
type: string
settings:
max_length: 255
case_sensitive: false
is_ascii: false
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
description: 'Jos kenttä jätetään tyhjäksi, otsikoksi tulee "Suosittuja palveluja"'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
description: 'Om detta lämnas tomt, titel är "Populära tjänster"'
17 changes: 0 additions & 17 deletions tools/make/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,6 @@ UNAME_S := $(shell uname -s)
UPDATE_SCRIPT_URL := https://git.io/JP10q
WEBROOT ?= public

# Detect app
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)

# Detect additional tooling
LAGOON := $(shell test -f .lagoon.yml && echo yes || echo no)
WODBY := $(shell test -f wodby.yml && echo yes || echo no)

ifeq ($(LAGOON),yes)
SYSTEM := LAGOON
else ifeq ($(WODBY),yes)
SYSTEM := WODBY
else
SYSTEM := WHOKNOWS
endif

include $(DRUIDFI_TOOLS_MAKE_DIR)utils.mk

# Include druidfi/tools make files
Expand Down
3 changes: 2 additions & 1 deletion tools/make/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ build-production:

PHONY += clean
clean: ## Cleanup
$(call step,Do Git clean\n)
$(call step,Cleanup loaded files...\n)
@rm -rf vendor
@git clean -fdx $(foreach item,$(CLEAN_EXCLUDE),-e $(item))

PHONY += self-update
Expand Down
10 changes: 5 additions & 5 deletions tools/make/docker.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CLI_SERVICE := cli
CLI_SHELL := sh
CLI_USER := root
DOCKER_COMPOSE := docker-compose
DOCKER_COMPOSE := docker compose
DOCKER_COMPOSE_EXEC ?= $(DOCKER_COMPOSE) exec
DOCKER_COMPOSE_YML_PATH ?= docker-compose.yml
DOCKER_COMPOSE_YML_EXISTS := $(shell test -f $(DOCKER_COMPOSE_YML_PATH) && echo yes || echo no)
Expand All @@ -15,7 +15,7 @@ endif

PHONY += config
config: ## Show docker-compose config
$(call step,Show docker-compose config...\n)
$(call step,Show Docker Compose config...\n)
$(call docker_compose,config)

PHONY += pull
Expand All @@ -29,8 +29,8 @@ down: ## Tear down the environment
$(call docker_compose,down -v --remove-orphans --rmi local)

PHONY += ps
ps: ## Show docker-compose ps
$(call step,Show docker-compose ps...\n)
ps: ## List containers
$(call step,List container(s)...\n)
$(call docker_compose,ps)

PHONY += stop
Expand All @@ -39,7 +39,7 @@ stop: ## Stop the environment
$(call docker_compose,stop)

PHONY += up
up: pull ## Launch the environment
up: ## Launch the environment
$(call step,Start up the container(s)...\n)
$(call docker_compose,up -d --remove-orphans)

Expand Down
11 changes: 9 additions & 2 deletions tools/make/drupal.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ DRUPAL_DISABLE_MODULES ?= no
DRUPAL_ENABLE_MODULES ?= no
DRUPAL_PROFILE ?= minimal
DRUPAL_SYNC_FILES ?= yes
DRUPAL_SYNC_SOURCE ?= production
DRUPAL_SYNC_SOURCE ?= main
DRUSH_RSYNC_MODE ?= Pakzu
DRUSH_RSYNC_OPTS ?= -- --omit-dir-times --no-perms --no-group --no-owner --chmod=ugo=rwX
DRUSH_RSYNC_EXCLUDE ?= css:ctools:js:php:tmp:tmp_php
Expand Down Expand Up @@ -38,6 +38,7 @@ endif

PHONY += drupal-create-folders
drupal-create-folders:
@mkdir -p $(WEBROOT)/sites/default/files/private
@mkdir -p $(WEBROOT)/sites/default/files/translations

PHONY += drupal-update
Expand Down Expand Up @@ -157,7 +158,7 @@ drush-create-dump: ## Create database dump to dump.sql

PHONY += drush-download-dump
drush-download-dump: ## Download database dump to dump.sql
$(call drush,-Dssh.tty=0 @$(DRUPAL_SYNC_SOURCE) sql-dump --structure-tables-key=common > ${DOCKER_PROJECT_ROOT}/$(DUMP_SQL_FILENAME))
$(call drush,@$(DRUPAL_SYNC_SOURCE) sql-dump --structure-tables-key=common > ${DOCKER_PROJECT_ROOT}/$(DUMP_SQL_FILENAME))

PHONY += open-db-gui
open-db-gui: DB_CONTAINER := $(COMPOSE_PROJECT_NAME)-db
Expand All @@ -172,6 +173,12 @@ fix-drupal: ## Fix Drupal code style
$(call step,Fix Drupal code style with phpcbf...\n)
$(call cs,phpcbf,$(PATHS))

PHONY += fix-drupal-coder
fix-drupal-coder: VERSION := 8.3.16
fix-drupal-coder: ## Fix Drupal Coder loading
composer config repositories.drupal '{"type": "composer", "url": "https://packages.drupal.org/8"}'
composer config repositories.drupal/coder '{"type": "package", "package": {"name": "drupal/coder", "type": "phpcodesniffer-standard", "version": "$(VERSION)", "dist": {"type": "zip", "url": "https://ftp.drupal.org/files/projects/coder-$(VERSION).zip"}}}'

PHONY += lint-drupal
lint-drupal: PATHS := $(subst $(space),,$(LINT_PATHS_PHP))
lint-drupal: ## Lint Drupal code style
Expand Down
23 changes: 23 additions & 0 deletions tools/make/include.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ endif

include $(DRUIDFI_TOOLS_MAKE_DIR)qa.mk

#
# Apps
#

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
endif
Expand All @@ -18,6 +26,21 @@ ifeq ($(IS_WP),yes)
include $(DRUIDFI_TOOLS_MAKE_DIR)wordpress.mk
endif

#
# Hosting systems
#

LAGOON := $(shell test -f .lagoon.yml && echo yes || echo no)
WODBY := $(shell test -f wodby.yml && echo yes || echo no)

ifeq ($(LAGOON),yes)
SYSTEM := LAGOON
else ifeq ($(WODBY),yes)
SYSTEM := WODBY
else
SYSTEM := WHOKNOWS
endif

ifeq ($(SYSTEM),LAGOON)
include $(DRUIDFI_TOOLS_MAKE_DIR)lagoon.mk
endif
Expand Down
3 changes: 1 addition & 2 deletions tools/make/kubectl.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ KUBECTL_NAMESPACE ?= foobar-namespace
KUBECTL_SHELL ?= sh
KUBECTL_EXEC_FLAGS ?= -n $(KUBECTL_NAMESPACE) -c $(KUBECTL_CONTAINER)
KUBECTL_WORKDIR ?= /app
KUBECTL_POD_SELECTOR ?= --field-selector=status.phase==Running

PHONY += kubectl-sync-db
kubectl-sync-db: ## Sync database from Kubernetes
Expand Down Expand Up @@ -48,5 +47,5 @@ define kubectl_cp
endef

define kubectl_get_pod
$(shell $(KUBECTL_BIN) get pods -n $(KUBECTL_NAMESPACE) $(KUBECTL_POD_SELECTOR) -o jsonpath="{.items[0].metadata.name}")
$(shell $(KUBECTL_BIN) get pods -n $(KUBECTL_NAMESPACE) --template '{{range .items}}{{ if not .metadata.deletionTimestamp }}{{.metadata.name}}{{"\n"}}{{end}}{{end}}')
endef

0 comments on commit f2ebcd0

Please sign in to comment.