Skip to content

Commit

Permalink
Merge pull request #292 from City-of-Helsinki/UHF-9626_infra
Browse files Browse the repository at this point in the history
UHF-9626 infra
  • Loading branch information
rpnykanen authored Apr 22, 2024
2 parents f175bac + 756de7e commit b70c072
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 228 deletions.
11 changes: 8 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@
* [ ] Check that this feature works
* [ ] Check that code follows our standards

## Designers review
## Continuous documentation
<!-- One of the checkboxes below needs to be checked like this: `[x]` (or click when not in edit mode) -->

* [ ] This PR does not need designers review
* [ ] This PR has been visually reviewed by a designer (Name of the designer)
* [ ] This feature has been documented/the documentation has been updated
* [ ] This change doesn't require updates to the documentation

## Translations
<!-- The checkbox below needs to be checked like this: `[x]` (or click when not in edit mode). Not needed if the translations were not affected. -->

* [ ] Translations have been added to .po -files and included in this PR

## Other PRs
<!-- For example an related PR in another repository -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/city-of-helsinki/drupal-php-docker:8.2-alpine
image: ghcr.io/city-of-helsinki/drupal-php-docker:8.3-alpine

services:
db:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/auto-release-pr.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ jobs:
release-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: actions/checkout@v4
- name: Create pull request
run: |
gh pr create \
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
tests:
runs-on: ubuntu-latest
container:
image: ghcr.io/city-of-helsinki/drupal-php-docker:8.1-alpine
image: ghcr.io/city-of-helsinki/drupal-php-docker:8.3-alpine
options: --hostname app

services:
Expand All @@ -23,7 +23,6 @@ jobs:
MYSQL_ROOT_PASSWORD: drupal
ports:
- 3306:3306

steps:
- uses: actions/checkout@v4

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ jobs:
update-config:
runs-on: ubuntu-latest
container:
image: ghcr.io/city-of-helsinki/drupal-php-docker:8.2-alpine

image: ghcr.io/city-of-helsinki/drupal-php-docker:8.3-alpine
services:
db:
image: mysql:8
Expand All @@ -31,6 +30,12 @@ jobs:
run: |
gh run download -n latest.sql
- name: Prepare setup
run: |
# We install Drupal from existing dump, so locale_install() hook
# is never fired. Make sure the translations folder exists.
mkdir -p public/sites/default/files/translations -p
- name: Build project
run: |
composer install --no-interaction
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
trigger:
branches:
include:
- develop
- dev
paths:
exclude:
- README.md
Expand Down
2 changes: 0 additions & 2 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.7'

services:
app:
container_name: "${COMPOSE_PROJECT_NAME}-app"
Expand Down
1 change: 0 additions & 1 deletion conf/cmi/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ module:
entity_reference_revisions: 0
environment_indicator: 0
environment_indicator_ui: 0
features: 0
field: 0
field_group: 0
field_ui: 0
Expand Down
100 changes: 0 additions & 100 deletions conf/cmi/features.bundle.default.yml

This file was deleted.

100 changes: 0 additions & 100 deletions conf/cmi/features.bundle.helfi.yml

This file was deleted.

5 changes: 0 additions & 5 deletions conf/cmi/features.settings.yml

This file was deleted.

2 changes: 1 addition & 1 deletion docker/openshift/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG DRUPAL_DOCKER_TAG=8.2
ARG DRUPAL_DOCKER_TAG=8.3
FROM ghcr.io/city-of-helsinki/drupal-docker-base:${DRUPAL_DOCKER_TAG}

COPY / /var/www/html/
Expand Down
17 changes: 17 additions & 0 deletions public/sites/default/all.settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,20 @@
$config['simple_oauth.settings']['private_key'] = '/app/conf/local-keys/private.key';
}

$additionalEnvVars = [
'PROJECT_NAME',
'REDIS_HOST',
'REDIS_PORT',
'SENTRY_DSN',
'SENTRY_ENVIRONMENT',
// Project specific variables.
'DRUPAL_PREVIEW_SECRET',
'ELASTIC_URL',
'ELASTIC_USER',
'ELASTIC_PASSWORD',
'INFOFINLAND_UI_PREVIEW_URL',
'INFOFINLAND_UI_URL'
];
foreach ($additionalEnvVars as $var) {
$preflight_checks['environmentVariables'][] = $var;
}
11 changes: 4 additions & 7 deletions tools/make/ansible.mk
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
ANSIBLE_INVENTORY_PATH ?= ansible/inventory
ANSIBLE_ROLES_PATH ?= ansible/roles
ANSIBLE_CHECK_ROLE ?= geerlingguy.docker
ANSIBLE_PLAYBOOK ?= ansible-playbook
ANSIBLE_PROVISION ?= ansible/provision.yml
ANSIBLE_REQUIREMENTS ?= ansible/requirements.yml
ANSIBLE_FLAGS ?=

PHONY += provision
provision: INVENTORY ?= production
provision: $(ANSIBLE_ROLES_PATH)/$(ANSIBLE_CHECK_ROLE) ## Make provisioning
$(call step,Ansible: Make dry run on provisioning...\n)
@$(ANSIBLE_PLAYBOOK) -i $(ANSIBLE_INVENTORY_PATH)/$(INVENTORY) $(ANSIBLE_PROVISION)
@$(ANSIBLE_PLAYBOOK) $(ANSIBLE_PROVISION) $(ANSIBLE_FLAGS)

PHONY += provision-%
provision-%: INVENTORY ?= production
provision-%: $(ANSIBLE_ROLES_PATH)/$(ANSIBLE_CHECK_ROLE) ## Make provisioning by tag
$(call step,Ansible: Make provisioning by tag "$*"...\n)
@$(ANSIBLE_PLAYBOOK) -i $(ANSIBLE_INVENTORY_PATH)/$(INVENTORY) $(ANSIBLE_PROVISION) --tags="$*"
@$(ANSIBLE_PLAYBOOK) $(ANSIBLE_PROVISION) --tags="$*" $(ANSIBLE_FLAGS)

PHONY += provision-dry-run
provision-dry-run: INVENTORY ?= production
provision-dry-run: $(ANSIBLE_ROLES_PATH)/$(ANSIBLE_CHECK_ROLE) ## Make dry run on provisioning
$(call step,Ansible: Make dry run on provisioning...\n)
@$(ANSIBLE_PLAYBOOK) -i $(ANSIBLE_INVENTORY_PATH)/$(INVENTORY) $(ANSIBLE_PROVISION) --check
@$(ANSIBLE_PLAYBOOK) $(ANSIBLE_PROVISION) $(ANSIBLE_FLAGS) --check

PHONY += ansible-install-roles
ansible-install-roles: ## Install Ansible roles
Expand Down
1 change: 1 addition & 0 deletions tools/make/project/install.mk
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ drush-helfi-enable-modules: ## Enable modules and base configurations.
PHONY += drush-locale-update
drush-locale-update: ## Update translations.
$(call step,Update translations...)
@mkdir -p public/sites/default/files/translations
$(call drush,state:set locale.translation_last_checked 0)
$(call drush,locale:check)
$(call drush,locale:update)
Expand Down

0 comments on commit b70c072

Please sign in to comment.