Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev to main #324

Merged
merged 82 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
40a65d7
Try to make dist css writable.
juho-lehmonen Oct 24, 2023
55c0eab
Make dist files writable.
juho-lehmonen Oct 24, 2023
db7ea78
UHF-8284: Update settings and platform tools.
juho-lehmonen Oct 11, 2023
efed58e
UHF-8284: Run integration and aggregation commands on staging for tes…
juho-lehmonen Oct 11, 2023
0f874d3
UHF-8284: Delete code from paatokset_ahjo and paatokset_news_importer…
juho-lehmonen Oct 12, 2023
655e621
UHF-8284: Disable news importer module.
juho-lehmonen Oct 12, 2023
5e09cc1
UHF-8284: Delete config related to imported articles.
juho-lehmonen Oct 12, 2023
1f44427
UHF-8284: Reinstall packages after PHP 8.2 change.
juho-lehmonen Oct 12, 2023
4b558a3
UHF-8284: Add placeholder module so hdbt_hyphenopoly can be uninstalled.
juho-lehmonen Oct 12, 2023
2f878c8
UHF-8284: Update packages to V3.
juho-lehmonen Oct 12, 2023
c76deb7
UHF-8284: Fix social media sharing block embed.
juho-lehmonen Oct 12, 2023
1796af9
UHF-8284: Initial config export.
juho-lehmonen Oct 12, 2023
1c022f1
UHF-8284: Add search hero option.
juho-lehmonen Oct 12, 2023
1a0523e
UHF-8284: PHPCS fixes.
juho-lehmonen Oct 12, 2023
28d56e4
UHF-8284: Theme and configuration updates.
juho-lehmonen Oct 17, 2023
4e74244
UHF-8284: Footer navigation block configs.
juho-lehmonen Oct 18, 2023
7c7a5af
UHF-8284: Fix breadcrumb settings.
juho-lehmonen Oct 18, 2023
e59a825
UHF-8284: Add custom templates back in.
juho-lehmonen Oct 18, 2023
fdba773
UHF-8284: Add missing paragraph types back in.
juho-lehmonen Oct 23, 2023
bcca531
UHF-8284: Fix accordion compatibility by adding legacy handorgel vers…
juho-lehmonen Oct 23, 2023
2fa868c
UHF-8284: Second round of adding custom styles back.
juho-lehmonen Oct 23, 2023
90f3560
UHF-8284: Add rest of custom styles back.
juho-lehmonen Oct 23, 2023
45a5eef
UHF-8284: Compile theme.
juho-lehmonen Oct 23, 2023
acea9ad
UHF-8284: Config exports after running v3 updates on existing db.
juho-lehmonen Oct 24, 2023
28e8338
UHF-8284: Re-export changes again.
juho-lehmonen Oct 24, 2023
a66131b
UHF-8284: Consider local domain as internal.
juho-lehmonen Oct 24, 2023
4116f9b
UHF-8284: Revert some allowed_html changes.
juho-lehmonen Oct 24, 2023
301c068
UHF-8284: Add legacy color variables for search app.
juho-lehmonen Oct 24, 2023
1e98734
UHF-8284: More config changes after reinstall and updates.
juho-lehmonen Oct 26, 2023
71f28ab
UHF-8284: Hide breadcrumb from frontpage.
juho-lehmonen Oct 27, 2023
1018dbb
UHF-8284: Policymaker page fixes.
juho-lehmonen Oct 27, 2023
f360cd0
UHF-8284: Fix social media sharing block, article heading and trustee…
juho-lehmonen Oct 27, 2023
f2fba89
UHF-8284: Fix policymaker images.
juho-lehmonen Oct 27, 2023
c2a776f
UHF-8284: Fix custom accordions.
juho-lehmonen Oct 27, 2023
f04306c
UHF-8284: Compile theme.
juho-lehmonen Oct 27, 2023
c1721dd
UHF-8284: Fix mobile navigation.
juho-lehmonen Oct 27, 2023
8868e76
UHF-8284: Update modules and lock file.
juho-lehmonen Nov 1, 2023
6732dc5
UHF-8284: Config export after platform_config updates.
juho-lehmonen Nov 1, 2023
5aa4016
UHF-8284: Add sensible original values for default texts.
juho-lehmonen Nov 2, 2023
4bac96e
UHF-8284: Fix policymaker images and announcements.
juho-lehmonen Nov 2, 2023
10e40f3
UHF-8284: Compile theme.
juho-lehmonen Nov 2, 2023
455f6f2
UHF-8284: Install v3 helfi_news_list module.
juho-lehmonen Nov 2, 2023
63b5234
UHF-8284: Add hook_helfi_paragraph_types
hyrsky Nov 1, 2023
b0686ee
Merge pull request #323 from City-of-Helsinki/develop
juho-lehmonen Nov 2, 2023
2ea6afd
UHF-8284: Update search app.
juho-lehmonen Nov 7, 2023
1f0b8ef
Merge pull request #319 from City-of-Helsinki/UHF-8284-platform-v3-up…
juho-lehmonen Nov 7, 2023
d8144a6
UHF-0: Change develop to dev branch, update release process.
juho-lehmonen Nov 8, 2023
ee1d848
UHF-0: Remove filelog settings file.
juho-lehmonen Nov 8, 2023
ffd721f
UHF-0: Import system.action.tpr_service_update_action.yml from kasko
hyrsky Nov 8, 2023
f350224
UHF-0: Add filelog settings file back.
juho-lehmonen Nov 8, 2023
e043e43
UHF-9024: refactor to use dependency injection
hyrsky Nov 7, 2023
769fd40
UHF-9024: Add stricter error checking
hyrsky Nov 8, 2023
e7cca06
Merge pull request #326 from City-of-Helsinki/UHF-0-site-install-fix
juho-lehmonen Nov 8, 2023
35e0c4a
Merge pull request #325 from City-of-Helsinki/UHF-0-change-develop-to…
juho-lehmonen Nov 8, 2023
2dd0d18
UHF-9024: Fetch documents in current language
hyrsky Nov 8, 2023
82d8e3f
Merge pull request #328 from City-of-Helsinki/UHF-9024-meetings-files…
hyrsky Nov 9, 2023
1dce09e
UHF-0: Remove hero arrow from search bar hero.
juho-lehmonen Nov 9, 2023
ab3bf09
UHF-0: Fix minutes and agenda heading.
juho-lehmonen Nov 9, 2023
3514ac2
UHF-0: Fix legacy accordion margins.
juho-lehmonen Nov 10, 2023
28ffa92
UHF-0: Fix font sizes and line heights.
juho-lehmonen Nov 10, 2023
841efdf
UHF-0: Fix page divider to be more in line with Päätökset styles.
juho-lehmonen Nov 10, 2023
0ed1e30
UHF-0: Compile styles.
juho-lehmonen Nov 10, 2023
24d8a45
Merge pull request #330 from City-of-Helsinki/UHF-0-more-v3-fixes
juho-lehmonen Nov 15, 2023
cdf2b7b
Add content scheduler to cron.
juho-lehmonen Nov 16, 2023
cb8cbe1
Update configuration
actions-bot Nov 16, 2023
730e259
Merge pull request #327 from City-of-Helsinki/update-configuration
hyrsky Nov 16, 2023
4231c93
Fix scheduler execution.
juho-lehmonen Nov 16, 2023
b3f8061
UHF-0: Update article translations, add permissions to edit truestee …
juho-lehmonen Nov 17, 2023
70ba716
UHF-0: Fix trustee image and title styles.
juho-lehmonen Nov 17, 2023
41e56b5
UHF-0: Edit article description translation.
juho-lehmonen Nov 17, 2023
1bfa26a
UHF-0: Compile styles.
juho-lehmonen Nov 17, 2023
0eaf9ec
UHF-0: Fix agenda item fallback handling.
juho-lehmonen Nov 22, 2023
c921a70
UHF-0: UHF-9048: Fix duplicate decisions in english language versions.
juho-lehmonen Nov 22, 2023
314cc39
UHF-0: Fix visual bugs with tables.
juho-lehmonen Nov 23, 2023
bbd2e0b
UHF-0: Compile styles.
juho-lehmonen Nov 23, 2023
ce4118a
UHF-8391: Fix icons
hyrsky Nov 23, 2023
686dd82
UHF-8391: Remove deprecated hds-button__label from buttons
hyrsky Nov 23, 2023
1872000
UHF-8391: Fix dictionary banner icons.
juho-lehmonen Nov 23, 2023
8455ee1
UHF-0: Fix import and padding issues.
juho-lehmonen Nov 23, 2023
c74d049
UHF-0: Compile styles.
juho-lehmonen Nov 23, 2023
d931783
UHF-0: Do not display empty voting result descriptions.
juho-lehmonen Nov 23, 2023
f11d31f
Merge pull request #336 from City-of-Helsinki/UHF-0-even-more-v3-fixes
juho-lehmonen Nov 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 9 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,24 @@ PROJECT_NAME=paatokset
# OpenShift project name
OC_PROJECT_NAME=hki-kanslia-paatokset-test

# Stage file proxy origin url and folder
STAGE_FILE_PROXY_ORIGIN=https://paatokset.hel.fi
STAGE_FILE_PROXY_ORIGIN_DIR=sites/default/files

# Local hostname
DRUPAL_HOSTNAME=helsinki-paatokset.docker.so

# Docker image
DRUPAL_IMAGE=ghcr.io/city-of-helsinki/drupal-web:8.1
DRUPAL_IMAGE=ghcr.io/city-of-helsinki/drupal-web:8.2

# Composer profiles, include Elasticsearch
COMPOSE_PROFILES=search

# Default source @alias where to sync database and files from
DRUPAL_SYNC_SOURCE=main

# Public webroot
DRUPAL_WEBROOT=public

# No prod environment yet, so don't sync files
# Do not sync files
DRUPAL_SYNC_FILES=no
15 changes: 13 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [PP-000](https://helsinkisolutionoffice.atlassian.net/browse/PP-000)
# [UHF-0000](https://helsinkisolutionoffice.atlassian.net/browse/UHF-0000)
<!-- What problem does this solve? -->

## What was done
Expand All @@ -9,7 +9,7 @@
## How to install

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

Expand All @@ -18,3 +18,14 @@

* [ ] Check that this feature works
* [ ] Check that code follows our standards

## Designers review
<!-- 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)

## Other PRs
<!-- For example an related PR in another repository -->

* Link to other PR
9 changes: 2 additions & 7 deletions .github/workflows/artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,11 @@ on:
schedule:
- cron: '0 0 * * 0'
name: Build artifacts
env:
DRUPAL_BUILD_FROM_SCRATCH: true
SIMPLETEST_DB: "mysql://drupal:drupal@db:3306/drupal"
SIMPLETEST_BASE_URL: "http://127.0.0.1:8080"
XDEBUG_MODE: off
jobs:
build:
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.2-alpine

services:
db:
Expand All @@ -33,7 +28,7 @@ jobs:
fetch-depth: 1

- name: Build project
run: composer install
run: composer install --no-interaction

- name: Setup drupal and save database dump
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/auto-release-pr.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
branches:
- develop
- dev
name: Automatic release PR
jobs:
release-pr:
Expand All @@ -14,8 +14,8 @@ jobs:
run: |
gh pr create \
--base main \
--head develop \
--title "Develop to main" \
--body "Develop to main" || true
--head dev \
--title "Dev to main" \
--body "Dev to main" || true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22 changes: 9 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ on:
branches: ['main', 'dev']
name: CI
env:
SIMPLETEST_DB: "mysql://drupal:drupal@db:3306/drupal"
SIMPLETEST_BASE_URL: "http://127.0.0.1:8080"
SYMFONY_DEPRECATIONS_HELPER: disabled
XDEBUG_MODE: off
SIMPLETEST_BASE_URL: http://app:8888
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.2-alpine
options: --hostname app

services:
db:
Expand All @@ -31,10 +30,10 @@ jobs:
fetch-depth: 1

- name: Build project
run: composer install
run: composer install --no-interaction

- name: Scan security updates
run: drush pm:security
run: composer audit

- name: Check that subtheme is not built with dev mode
run: if grep -q 'sourceMappingURL=' -R public/themes/custom/hdbt_subtheme/dist/css; then exit 1; fi
Expand All @@ -52,20 +51,17 @@ jobs:
- name: Install Drupal
run: |
mysql --user=drupal --password=drupal --database=drupal --host=db --port=3306 -A < latest.sql
drush cr && drush cim -y
drush deploy

- name: Start services
run: |
drush runserver $SIMPLETEST_BASE_URL > /dev/null 2>&1 &
chromedriver --port=4444 > /dev/null 2>&1 &
# Chromium browser is required to run 'functional-javascript' and
# 'existing-site-javascript' tests.
chromium-browser --headless --disable-gpu --no-sandbox --remote-debugging-port=9222 &
drush runserver $SIMPLETEST_BASE_URL --dns > /dev/null 2>&1 &

# Wait for drush server to start.
for i in {1..5}; do RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" "$SIMPLETEST_BASE_URL" || true); if [ "$RESPONSE_CODE" -gt "301" ] || [ "$RESPONSE_CODE" -lt "200" ]; then sleep 2; fi; done

- name: Run PHPUnit tests
run: |
composer test-php public/modules/custom
[ -d "tests/" ] && composer test-php tests/ || echo "No DTT tests found. Ignoring..."
if [ -d "tests/" ]; then composer test-php tests/; else echo "No DTT tests found. Ignoring..."; fi

12 changes: 4 additions & 8 deletions .github/workflows/update-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@ on:
repository_dispatch:
types: [config_change]
name: Update config
env:
SIMPLETEST_BASE_URL: "http://127.0.0.1:8080"
SIMPLETEST_DB: "mysql://drupal:drupal@db:3306/drupal"
XDEBUG_MODE: off
jobs:
update-config:
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.2-alpine

services:
db:
Expand All @@ -37,10 +33,10 @@ jobs:

- name: Build project
run: |
composer install
composer install --no-interaction
$(drush sql:connect) < latest.sql
drush cr && drush cim -y
composer update drupal/helfi_* drupal/hdbt* -W
drush cim -y && drush updb -y && drush cr
composer update drupal/helfi_* drupal/hdbt* -W --no-interaction
drush cr && drush updb -y && drush cex -y
# Update platform
drush helfi:tools:update-platform
Expand Down
18 changes: 5 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,26 @@
drush/sites/
drush/Commands/*
node_modules
public/public:/
public/core
public/libraries
public/modules/contrib
public/modules/custom/paatokset_search/assets
public/themes/contrib
public/sites/default/files
vendor

# Ignore files that are only for the current local environment
public/sites/default/local.settings.php
public/sites/default/local.services.yml
.env.local
helfi-test-automation-python/
public/sites/simpletest/

# Ignore the folder created by PhpStorm
.idea/*
public/sites/default/local.settings.php

# Ignore test related files
.phpunit.*
helfi-test-automation-python/
public/sites/simpletest/

# Ignore local database dumps
*.sql
*.env.local

# Ignore OSX generated files
._*
.DS_Store

!*.gitkeep
!*.keepme
.phpunit.*
1 change: 1 addition & 0 deletions .platform/schema
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Drupal 9 Website for the Helsinki Päätökset project.

Env | Branch | Drush alias | URL | Notes
--- | ------ | ----------- | --- | -----
development | * | - | http://helsinki-paatokset.docker.so/ | Local development environment
dev | * | - | http://helsinki-paatokset.docker.so/ | Local development environment
production | tag based | - | https://paatokset.hel.fi | Production environment

## Requirements
Expand Down Expand Up @@ -146,11 +146,11 @@ Additional information can be added in a multiline message, where the first line
### Gitflow workflow
The Gitflow workflow is followed, with the following conventions:

**Main branch**: `develop`. All feature branches are created from `develop` and merged back with pull requests. All new code must be added with pull requests, not committed directly.
**Main branch**: `dev`. All feature branches are created from `dev` and merged back with pull requests. All new code must be added with pull requests, not committed directly.

**Feature branches**: For example, `PP-123-add-search-functionality`, Always created from and merged back to `develop` with pull requests after code review and testing. Should contain the Jira ticket ID or `PP-0` if a ticket doesn't exist.
**Feature branches**: For example, `PP-123-add-search-functionality`, Always created from and merged back to `dev` with pull requests after code review and testing. Should contain the Jira ticket ID or `PP-0` if a ticket doesn't exist.

**Release tags**: Code for future releases. For example: `release/1.1.0`. These tags should be created as Github releases so we can get full release not. Deploying releases happens manually in Azure.
**Release tags**: Code for future releases. For example: `2023-11-08.1`. These tags should be created as Github releases so we can get full release not. Deploying releases happens manually in Azure.

### Pull requests
The pull request should contain:
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ trigger:
batch: true
branches:
include:
- develop
- dev
paths:
exclude:
- README.md
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pr:
branches:
include:
- main
- develop
- dev

# By default, use self-hosted agents
pool: Default
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
trigger:
branches:
include:
- develop
- dev
paths:
exclude:
- README.md
Expand Down
26 changes: 15 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
"drupal/big_pipe_sessionless": "^2.0",
"drupal/core": "^9.5",
"drupal/core-composer-scaffold": "^9.1",
"drupal/hdbt": "4.3.4",
"drupal/hdbt_admin": "^1.8.6",
"drupal/hdbt": "^5.0",
"drupal/hdbt_admin": "^2.0",
"drupal/helfi_api_base": "^2.5.3",
"drupal/helfi_drupal_tools": "dev-main",
"drupal/helfi_platform_config": "2.18.7",
"drupal/helfi_platform_config": "^3.0",
"drupal/helfi_tpr": "^2.0.5",
"drupal/helfi_tunnistamo": "^2.0",
"drupal/json_field": "^1.0@RC",
Expand All @@ -25,23 +25,24 @@
"drupal/purge": "^3.0",
"drupal/search_api": "^1.20",
"drupal/varnish_purge": "^2.1",
"drush/drush": "^10.4",
"drush/drush": "^11",
"elasticsearch/elasticsearch": "^7.15",
"josdejong/jsoneditor": "^5.29",
"league/csv": "^9.8",
"paatokset/paatokset_search": "1.0.27"
"paatokset/paatokset_search": "1.0.29"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"dmore/chrome-mink-driver": "^2.8",
"drupal/coder": "^8.3",
"drupal/core-dev": "^9.3",
"drupal/migrate_tools": "^5.2",
"mglaman/phpstan-drupal": "^1.0",
"jangregor/phpstan-prophecy": "^1.0",
"mglaman/phpstan-drupal": "^1.2",
"phpspec/prophecy-phpunit": "^2",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-deprecation-rules": "^1.1",
"phpunit/phpunit": "^9.6",
"weitzman/drupal-test-traits": "^2.0"
},
Expand All @@ -57,6 +58,9 @@
"composer/installers": true,
"drupal/core-composer-scaffold": true,
"phpstan/extension-installer": true
},
"audit": {
"abandoned": "report"
}
},
"extra": {
Expand Down Expand Up @@ -135,9 +139,9 @@
"type": "package",
"package": {
"name": "paatokset/paatokset_search",
"version": "1.0.27",
"version": "1.0.29",
"dist": {
"url": "https://github.com/City-of-Helsinki/paatokset-search/releases/download/1.0.27/paatokset_search.zip",
"url": "https://github.com/City-of-Helsinki/paatokset-search/releases/download/1.0.29/paatokset_search.zip",
"type": "zip"
}
}
Expand Down
Loading