-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from City-of-Helsinki/dev
Release 2022-11-17.1
- Loading branch information
Showing
11 changed files
with
188 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,5 @@ features: | |
logo: | ||
use_default: 1 | ||
favicon: | ||
use_default: 1 | ||
use_default: 0 | ||
path: '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,8 +46,6 @@ display: | |
group_items: | ||
1: | ||
title: Julkaistu | ||
2: | ||
title: Julkaisematon | ||
name: | ||
expose: | ||
label: Nimi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,8 +45,6 @@ display: | |
group_items: | ||
1: | ||
title: Publicerad | ||
2: | ||
title: 'Ej publicerad' | ||
name: | ||
expose: | ||
label: Namn | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |