Skip to content

Commit

Permalink
Merge pull request #94 from City-of-Helsinki/dev
Browse files Browse the repository at this point in the history
Release 2022-11-17.1
  • Loading branch information
khalima authored Nov 17, 2022
2 parents 6210be3 + e7c3444 commit af97093
Show file tree
Hide file tree
Showing 11 changed files with 188 additions and 83 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## How to install

* Make sure your instance is up and running on correct branch.
* `git pull origin UHF-0000_insert_correct_branch`
* `git checkout UHF-0000_insert_correct_branch`
* `make fresh`
* Run `make drush-cr`

Expand Down
139 changes: 68 additions & 71 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion conf/cmi/eu_cookie_compliance.settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ enable_save_preferences_button: true
domain_all_sites: true
settings_tab_enabled: false
containing_element: body
cookie_policy_version: 1.0.0
cookie_policy_version: 1.1.0
cookie_value_disagreed: '0'
cookie_value_agreed_show_thank_you: '1'
cookie_value_agreed: '2'
Expand Down
3 changes: 2 additions & 1 deletion conf/cmi/hdbt.settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ features:
logo:
use_default: 1
favicon:
use_default: 1
use_default: 0
path: ''
2 changes: 0 additions & 2 deletions conf/cmi/language/fi/views.view.media_library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ display:
group_items:
1:
title: Julkaistu
2:
title: Julkaisematon
name:
expose:
label: Nimi
Expand Down
2 changes: 0 additions & 2 deletions conf/cmi/language/sv/views.view.media_library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ display:
group_items:
1:
title: Publicerad
2:
title: 'Ej publicerad'
name:
expose:
label: Namn
Expand Down
23 changes: 22 additions & 1 deletion conf/cmi/views.view.media_library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ display:
exclude: false
alter:
alter_text: true
text: '<a href="/media/{{ mid }}/edit" class="media-library-item__edit icon-link" title="{% trans %}Edit {{ name }}. Opens in a new tab.{% endtrans %}" target="_new">{% trans %}Edit {{ name }}{% endtrans %}</a>'
text: "<a href=\"{{ path('entity.media.edit_form', {'media': mid }) }}\" class=\"media-library-item__edit icon-link\" title=\"{% trans %}Edit {{ name }}. Opens in a new tab.{% endtrans %}\" target=\"_new\">{% trans %}Edit {{ name }}{% endtrans %}</a>\r\n"
make_link: false
path: ''
absolute: false
Expand Down Expand Up @@ -1275,6 +1275,27 @@ display:
rendering_language: '***LANGUAGE_language_interface***'
display_extenders: { }
path: admin/content/media-widget
pager:
type: full
options:
offset: 0
items_per_page: 24
total_pages: null
id: 0
tags:
next: ››
previous: ‹‹
first: '« First'
last: 'Last »'
expose:
items_per_page: false
items_per_page_label: 'Items per page'
items_per_page_options: '6, 12, 24, 48'
items_per_page_options_all: false
items_per_page_options_all_label: '- All -'
offset: false
offset_label: Offset
quantity: 9
cache_metadata:
max-age: -1
contexts:
Expand Down
8 changes: 4 additions & 4 deletions docker/openshift/crons/base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ echo "Starting cron: $(date)"
# @endcode

# Uncomment this to enable TPR migration cron
#exec "/crons/migrate-tpr.sh" &
exec "/crons/migrate-tpr.sh" &
# Uncomment this to enable Varnish purge cron
#exec "/crons/purge-queue.sh" &
exec "/crons/purge-queue.sh" &
# Uncomment this to enable automatic translation updates.
# exec "/crons/update-translations.sh" &
exec "/crons/update-translations.sh" &
# Uncomment this to enable content scheduler
# exec "/crons/content-scheduler.sh" &
exec "/crons/content-scheduler.sh" &

while true
do
Expand Down
2 changes: 2 additions & 0 deletions public/sites/default/azure.settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@

// Keep old assets for three months (default is one month).
$config['system.performance']['stale_file_threshold'] = 7776000;

$settings['is_azure'] = TRUE;
2 changes: 2 additions & 0 deletions public/sites/default/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@
$settings['container_yamls'][] = 'modules/contrib/redis/redis.services.yml';
}

$settings['is_azure'] = FALSE;

// Environment specific overrides.
if (file_exists(__DIR__ . '/all.settings.php')) {
include __DIR__ . '/all.settings.php';
Expand Down
86 changes: 86 additions & 0 deletions tools/make/project/robo.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
STONEHENGE_PATH ?= ${HOME}/stonehenge
PROJECT_DIR ?= ${GITHUB_WORKSPACE}
SITE_PREFIX ?= /

SETUP_ROBO_TARGETS :=
CI_POST_INSTALL_TARGETS :=

ifeq ($(CI),true)
SETUP_ROBO_TARGETS += install-stonehenge start-stonehenge set-permissions
CI_POST_INSTALL_TARGETS += fix-files-permission
endif

SETUP_ROBO_TARGETS += up composer-install $(CI_POST_INSTALL_TARGETS) update-automation

ifeq ($(DRUPAL_BUILD_FROM_SCRATCH),true)
SETUP_ROBO_TARGETS += install-drupal post-install-tasks
else
SETUP_ROBO_TARGETS += install-drupal-from-dump post-install-tasks
endif

install-stonehenge: $(STONEHENGE_PATH)/.git

$(STONEHENGE_PATH)/.git:
git clone -b 3.x https://github.com/druidfi/stonehenge.git $(STONEHENGE_PATH)

PHONY += start-stonehenge
start-stonehenge:
cd $(STONEHENGE_PATH) && COMPOSE_FILE=docker-compose.yml make up

$(PROJECT_DIR)/helfi-test-automation-python/.git:
git clone https://github.com/City-of-Helsinki/helfi-test-automation-python.git $(PROJECT_DIR)/helfi-test-automation-python

PHONY += update-automation
update-automation: $(PROJECT_DIR)/helfi-test-automation-python/.git
git pull

PHONY += install-drupal
install-drupal:
$(call docker_run_ci,app,drush si minimal -y)
$(call docker_run_ci,app,drush cr)
$(call docker_run_ci,app,drush si minimal --existing-config -y)
$(call docker_run_ci,app,drush deploy)

PHONY += install-drupal-from-dump
install-drupal-from-dump:
$(call docker_run_ci,app,drush sql-drop -y)
$(call docker_run_ci,app,mysql --user=drupal --password=drupal --database=drupal --host=db --port=3306 -A < latest.sql)
$(call docker_run_ci,app,drush deploy)

PHONY += post-install-tasks
post-install-tasks:
$(call docker_run_ci,app,drush upwd helfi-admin Test_Automation)
$(call docker_run_ci,app,drush en helfi_example_content syslog -y)
$(call docker_run_ci,app,drush helfi:migrate-fixture tpr_unit --publish)
$(call docker_run_ci,app,drush helfi:migrate-fixture tpr_service --publish)
$(call docker_run_ci,app,drush helfi:migrate-fixture tpr_errand_service --publish)
$(call docker_run_ci,app,drush helfi:migrate-fixture tpr_service_channel --publish)
$(call docker_run_ci,app,drush pmu editoria11y -y)

PHONY += save-dump
save-dump:
$(call docker_run_ci,app,drush sql-dump --result-file=/app/latest.sql)

PHONY += robo-shell
robo-shell:
@docker compose $(DOCKER_COMPOSE_FILES) exec robo sh

PHONY += set-permissions
set-permissions:
chmod 777 /home/runner/.cache/composer -R
chmod 777 -R $(PROJECT_DIR)

PHONY += fix-files-permission
fix-files-permission:
mkdir $(PROJECT_DIR)public/sites/default/files -p && chmod 777 -R $(PROJECT_DIR)public/sites/default/files

define docker_run_ci
docker compose exec -T $(1) sh -c "$(2)"
endef

PHONY += setup-robo
setup-robo: $(SETUP_ROBO_TARGETS)

PHONY += run-robo-tests
run-robo-tests:
$(call docker_run_ci,robo,cd /app/helfi-test-automation-python && chmod +x run_all_tests.sh && PREFIX=$(SITE_PREFIX) BASE_URL=$(DRUPAL_HOSTNAME) ./run_all_tests.sh)

0 comments on commit af97093

Please sign in to comment.