Skip to content

Commit

Permalink
Merge branch 'release/0.53.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Skrypnyk committed Aug 30, 2022
2 parents 99d0e97 + 60e9fa0 commit 3b6b0f5
Show file tree
Hide file tree
Showing 564 changed files with 12,335 additions and 7,902 deletions.
11 changes: 11 additions & 0 deletions .ahoy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,21 @@ commands:
usage: Run BDD tests.
cmd: ahoy cli "DREVOPS_TEST_TYPE=bdd DREVOPS_TEST_ARTIFACT_DIR=${DREVOPS_TEST_ARTIFACT_DIR} DREVOPS_TEST_REPORTS_DIR=${DREVOPS_TEST_REPORTS_DIR} DREVOPS_TEST_BEHAT_PROFILE=${DREVOPS_TEST_BEHAT_PROFILE:-} DREVOPS_TEST_BEHAT_FORMAT=${DREVOPS_TEST_BEHAT_FORMAT:-} DREVOPS_TEST_BEHAT_PARALLEL_INDEX=${DREVOPS_TEST_BEHAT_PARALLEL_INDEX:-} BEHAT_SCREENSHOT_PURGE=${BEHAT_SCREENSHOT_PURGE-} ./scripts/drevops/test.sh $@"

test-bats:
usage: Run Bats tests (host only).
cmd: bats --tap tests/bats/


debug:
usage: Enable PHP Xdebug.
cmd: ahoy cli php -v | grep -q Xdebug || XDEBUG_ENABLE=true ahoy up cli php nginx && ahoy cli php -v | grep -q Xdebug && echo "Enabled debug confguration. Use 'ahoy up' to disable."

export-config:
usage: Export theme config.
cmd: |
ahoy cli "./scripts/update-theme-config.sh"
ahoy drush cde cs_core
deploy:
usage: Run remote deployment procedures.
cmd: |
Expand Down
25 changes: 23 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ DREVOPS_LINT_PHPLINT_TARGETS="docroot/modules/custom, docroot/themes/contrib/civ
# PHPCS comma-separated list of targets.
DREVOPS_LINT_PHPCS_TARGETS="docroot/modules/custom, docroot/themes/contrib/civictheme, docroot/sites/default/settings.php, tests"

# PHPMD comma-separated list of targets.
DREVOPS_LINT_PHPMD_TARGETS="docroot/themes/contrib/civictheme"
# PHPMD report format.
DREVOPS_LINT_PHPMD_FORMAT=text
# PHPMD rules.
DREVOPS_LINT_PHPMD_RULESETS="codesize, unusedcode"

# Allow BE code linting failures.
DREVOPS_LINT_BE_ALLOW_FAILURE=0

Expand Down Expand Up @@ -147,8 +154,22 @@ DREVOPS_DB_FILE=db.sql
# Database dump file sourced from Lagoon.

# Lagoon project name. May be different from DREVOPS_PROJECT.
LAGOON_PROJECT=civic

LAGOON_PROJECT=civictheme-source

DREVOPS_DEPLOY_LAGOON_INSTANCE=salsa-hosting
DREVOPS_DEPLOY_LAGOON_INSTANCE_GRAPHQL=https://api.salsa.hosting/graphql
DREVOPS_DEPLOY_LAGOON_INSTANCE_HOSTNAME=ssh.salsa.hosting
DREVOPS_DEPLOY_LAGOON_INSTANCE_PORT=22
DREVOPS_DEPLOY_LAGOON_LAGOONCLI_VERSION=v0.12.3

DREVOPS_TASK_LAGOON_INSTANCE=salsa-hosting
DREVOPS_TASK_LAGOON_INSTANCE_GRAPHQL=https://api.salsa.hosting/graphql
DREVOPS_TASK_LAGOON_INSTANCE_HOSTNAME=ssh.salsa.hosting
DREVOPS_TASK_LAGOON_INSTANCE_PORT=22
DREVOPS_TASK_LAGOON_LAGOONCLI_VERSION=v0.12.3

DREVOPS_DB_DOWNLOAD_LAGOON_SSH_HOST=ssh.salsa.hosting
DREVOPS_DB_DOWNLOAD_LAGOON_SSH_PORT=22

# Use Lagoon Drush aliases to get access to environments from the CLI container.
# DREVOPS_LAGOON_ENABLE_DRUSH_ALIASES=1
Expand Down
48 changes: 13 additions & 35 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,17 @@
<!--
Please follow these rules:
1. SUBJECT: use format [PRJ-123] Verb in past tense with dot at the end.
- This subject will be used as a commit message after PR is merged.
- Verbs are usually one of these: Updated, Refactored, Removed, Changed, Added.
- If there is no ticket - do not put [NOTICKET].
https://salsadigital.atlassian.net/browse/CIVIC-<NUMBER>

2. BODY: fill-in the template below.
## Checklist before requesting a review

3. CONFLICTS: Make sure that there are no conflicts in your PR. Resolve them before submitting PR for review.
- [ ] I have formatted the subject to include ticket number as `[CIVIC-123] Verb in past tense with dot at the end.`
- [ ] I have added a link to the JIRA ticket
- [ ] I have provided information in `Changed` section about WHY something was done if this was not a normal implementation
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] I have run new and existing relevant tests locally with my changes, and they passed
- [ ] I have provided screenshots, where applicable

4. COMMENTS: Scan through your PR yourself and comment on the lines that does not look clear enough. This will save SIGNIFICANT time for reviewer to approve the PR.
## Changed
1.

5. LABEL: Assign 'Needs review' label as soon as you ready to have this reviewed.
6. ASSIGNEE: Assign at least 2 reviewers.
7. SLACK: Post a link to this PR to #developers channel.
No need to remove these lines - they are comments.
-->

**Issue URL:**

### Changed
<!--
Provide a list of what was added/changed/removed etc.
Start with a verb so that it is clear what has happened:Added/ Updated/Removed/Refactored etc.
Also, explain WHY something was done if this was not a normal implementation.
-->
1.

### Screenshots

<!--
Provide as many screenshots as required to make reviewers understand what was changed.
-->
## Screenshots
16 changes: 16 additions & 0 deletions .github/workflows/auto-label-conflict.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Auto-label a PR with a conflict"
on:
push:
pull_request_target:
types: [synchronize]

jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Check if PRs have conflicts
uses: eps1lon/actions-label-merge-conflict@releases/2.x
with:
dirtyLabel: "CONFLICT"
removeOnDirtyLabel: "Needs review"
repoToken: "${{ secrets.GITHUB_TOKEN }}"
2 changes: 1 addition & 1 deletion .github/workflows/dispatch-webhook-lagoon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
--header "X-GitHub-Delivery: ${RUNNER_TRACKING_ID:7}" \
--header "X-GitHub-Event: pull_request" \
--data-binary @- \
https://hooks.lagoon.amazeeio.cloud/
https://webhookhandler.salsa.hosting/
16 changes: 16 additions & 0 deletions .lagoon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ tasks:
service: cli
shell: bash

- run:
name: Replace app entrypoint to prevent probes from bootstrapping
command: |
mv /app/docroot/index.php /tmp/index.php
echo "<? exit('ok');" >> /app/docroot/index.php
service: nginx-php
container: php

- run:
name: Set GitHub deployment status
command: |
Expand Down Expand Up @@ -74,6 +82,14 @@ tasks:
service: cli
shell: bash

- run:
name: Restore app entrypoint
command: |
rm /app/docroot/index.php
mv /tmp/index.php /app/docroot/index.php
service: nginx-php
container: php

- run:
name: Send deployment notifications
command: |
Expand Down
11 changes: 6 additions & 5 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,23 @@ For development:
cd docroot/themes/custom/civictheme_demo
npm run build

## Theme configuration export
## Configuration export

Use shortcut command every time there is a configuration change to validate that
all new, updated or deleted configuration was captured

ahoy local export-config
ahoy export-config

Configuration is captured into CivicTheme Drupal theme's `config/install` and
`config/optional` using Config Devel module.
Configuration is captured using Config Devel module for:
- development modules into `cs_core` module's `config/install` and `config/optional` directories.
- theme into CivicTheme Drupal theme's `config/install` and `config/optional` directories.

To add new configuration to the export, add configuration name to `civictheme.info.yml`.

Tip: You can get the configuration name by exporting configuration with `drush cex -y`
to `config/default` and using file names without `.yml` extension. Do not forget
to remove all exported configuration files from `config/default` or the next site
install will fail.
install will fail. But this all is already handled in `ahoy export-config`.

Note that configuration for blocks in `civictheme` will be copied to `civictheme_demo` on
installation of `civictheme_demo`. We do not capture configuration for `civictheme_demo`.
Expand Down
17 changes: 14 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@
"drupal/core-project-message": "^9",
"drupal/core-recommended": "^9",
"drupal/default_content": "^2.0@alpha",
"drupal/generated_content": "^1.1",
"drupal/generated_content": "^1.2",
"drupal/permissions_filter": "^1.1",
"drupal/redirect": "^1.6",
"drupal/stage_file_proxy": "^1.1",
"drupal/testmode": "^2.1",
"drush/drush": "^10",
"govcms/govcms": "^2",
"govcms/govcms": "^2.18",
"oomphinc/composer-installers-extender": "^2.0",
"vlucas/phpdotenv": "^5.1",
"webflo/drupal-finder": "^1.2"
Expand All @@ -28,12 +29,15 @@
"drevops/behat-format-progress-fail": "^1",
"drevops/behat-screenshot": "^1",
"drevops/behat-steps": "^1",
"drupal/coder": "8.3.15",
"drupal/core-dev": "^9",
"drupal/drupal-extension": "^4",
"php-parallel-lint/php-parallel-lint": "^1.2",
"phpcompatibility/php-compatibility": "^9.0",
"phpmd/phpmd": "^2.12",
"phpspec/prophecy-phpunit": "^2",
"pyrech/composer-changelogs": "^1.7"
"pyrech/composer-changelogs": "^1.7",
"slevomat/coding-standard": "7.2.1"
},
"autoload": {
"classmap": [
Expand Down Expand Up @@ -111,6 +115,13 @@
"patchLevel": {
"drupal/core": "-p2"
},
"patches": {
"drupal/core": {
"Correct vertical tab does not focus on form validation - https://www.drupal.org/project/drupal/issues/2911932#comment-14514089": "https://www.drupal.org/files/issues/2022-05-13/2911932-22.patch",
"drupal_phpunit_find_extension_directories() uses infinite recursion ⇒ more directories = slower tests - https://www.drupal.org/project/drupal/issues/3249443#comment-14299938": "https://www.drupal.org/files/issues/2021-11-23/3249443-37.patch",
"Builds failing on missing layout column plugin": "https://www.drupal.org/files/issues/2021-04-12/D9-3204271-2-missing-layout-exception.patch"
}
},
"drupal-scaffold": {
"locations": {
"web-root": "./docroot"
Expand Down
Loading

0 comments on commit 3b6b0f5

Please sign in to comment.