Skip to content

Commit

Permalink
Merge pull request #3535 from CityOfBoston/master
Browse files Browse the repository at this point in the history
(production) Media Management, Accessibility (Emergency Alerts), Maintenance
  • Loading branch information
davidrkupton authored Jul 25, 2024
2 parents 85bf7ce + a519837 commit 62a643a
Show file tree
Hide file tree
Showing 16 changed files with 1,671 additions and 876 deletions.
2 changes: 2 additions & 0 deletions .github/sanitize/publish-excludes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,7 @@ config/travis
.gitignore
.lando.yml
.lando.yml.linux
README.md
LICENSE.md
RELEASE.md
**/.gitignore
16 changes: 12 additions & 4 deletions .github/sanitize/publish-from.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
############################################################
# These two folders must be retained.
# These are the main folders which must be copied.
############################################################
config
docroot
docroot/modules/custom
############################################################
# Production environments need composer files.
# Also, copy some github actions
############################################################
.github/config/releaseNotesConfig.yml
.github/workflows/D10-NotifyRelease.yml
############################################################
# Also, production environments still need composer files.
############################################################
composer.json
composer.lock
LICENSE.md
README.md
############################################################
# Also, public repo should have appropriate license and readme.
############################################################
LICENSE.PUBLIC.md
README.PUBLIC.md
2 changes: 1 addition & 1 deletion .github/workflows/D10-GeneratePrivateRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
types:
- completed
workflows: [Publish to Public Repo]
branches: [production]
branches: [master]

env:
GH_TOKEN: ${{ secrets.PUBLISH_GITHUB_TOKEN }}
Expand Down
60 changes: 25 additions & 35 deletions .github/workflows/D10-GeneratePublicRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@ on:
types:
- completed
workflows: [Publish to Public Repo]
branches: [production]
branches: [master]
env:
GITHUB_TOKEN: ${{ secrets.PUBLISH_GITHUB_TOKEN }}
DEV_EMAIL: "digital-dev@boston.gov"
USER: "City of Boston Deploy Pipeline"
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DOIT_WEBHOOK_URL }} # for slack
TITLE: ${{ vars.THIS_TITLE }}
TAG: ${{ vars.THIS_TAG }}
RELEASE_NOTES: "[PM to complete]"
RELEASE_NUMBER: ${{ vars.THIS_RELEASE }}
WORKING_FILE: "CHANGELOG.md"
REPOSITORY: CityOfBoston/boston.gov
DRAFT: true # true = ReleaseNote is draft - false is published

jobs:
MakeRelease:
Expand All @@ -42,50 +46,36 @@ jobs:
shell: bash
steps:

# Checkout THE public repo, set remote correctly.
- name: Checkout Public repository
id: Checkout-Public-Repo
env:
GH_TOKEN: ${{ secrets.PUBLISH_GITHUB_TOKEN }}
run: |
URL=${{ secrets.PUBLIC_REPO_TARGET }}
echo "gh repo clone $URL public -- --depth 10 --branch ${{ secrets.PUBLIC_REPO_TARGET_BRANCH }}"
gh repo clone $URL public -- --depth=10 --branch=${{ secrets.PUBLIC_REPO_TARGET_BRANCH }}
cd public
git fetch origin ${{ secrets.PUBLIC_REPO_TARGET_BRANCH }}
git reset --hard FETCH_HEAD
#
# Create the GitHub PUBLIC repo Release Note.
- name: Generate Release Notes
if: ${{ vars.DRY_RUN == 0 }}
env:
GH_TOKEN: ${{ secrets.PUBLISH_GITHUB_TOKEN }}
TITLE: ${{ vars.THIS_TITLE }}
TICKETS: ${{ vars.THIS_BODY }}
TAG: ${{ vars.THIS_TAG }}
RELEASE_NOTES: "[PM to complete]"
RELEASE_NUMBER: ${{ vars.THIS_RELEASE }}
WORKING_FILE: "CHANGELOG.md"
DRAFT: 1 # 1 = ReleaseNote is draft - else is published
run: |
cd public
printf "## ${{ env.TITLE }}
### Release By
${{ github.author }}
### Release Notes
${{ env.RELEASE_NOTES }}" > ${{ env.WORKING_FILE }}
options="--latest --generate-notes"
options="$options --notes-start-tag ${{ vars.LAST_TAG }}"
options="$options --notes-file ${{ env.WORKING_FILE }}"
options="$options --title ${{ env.RELEASE_NUMBER }}"
[ ${{ env.DRAFT }} == 1 ] && options="--draft $options"
[ ${{ vars.DRY_RUN }} == 0 ] && gh release create ${{ env.TAG }} $options
[[ ${{ vars.DRY_RUN }} == 1 ]] && cat ${{ env.WORKING_FILE }} || echo "Release Note Saved"
#
# Commit the release notes
- name: Commit Release Notes
if: ${{ vars.DRY_RUN == 0 }}
uses: softprops/action-gh-release@v2
with:
body_path: ${{ env.WORKING_FILE }}
draft: ${{ env.DRAFT }}
name: ${{ env.RELEASE_NUMBER }}
tag_name: ${{ env.TAG }}
repository: ${{ env.REPOSITORY }}
generate_release_notes: true

#
# Send FAIL message to slack.
- name: Post to Slack - failure
uses: act10ns/slack@v2.0.0
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DOIT_WEBHOOK_URL }}
if: ${{ failure() }}
with:
status: ${{ job.status }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/D10-NotifyRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ on:
jobs:
release:
runs-on: ubuntu-latest
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
steps:
- name: Checkout
uses: actions/checkout@v3.5.2
uses: actions/checkout@v4
- name: Release Notes
uses: act10ns/slack@v2.0.0
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
status: ${{ job.status }}
channel: ${{ vars.SLACK_RELEASE_CHANNEL }}
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/D10-Publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ jobs:
err=""
cd private
rsync -rlDWz --max-size=10m --files-from=${publish_from_file} --exclude-from=${publish_excludes_file} --delete-after . ../publish && echo "Copied updated codebase" || err="Error copying updated codebase"
mv -f ../publish/README.PUBLIC.md ../publish/README.md || echo "WARNING: could not create README.md"
mv -f ../publish/LICENSE.PUBLIC.md ../publish/LICENSE.md || echo "WARNING: could not create LICENSE.md"
[[ "$( git status --porcelain --untracked-files=no --ignored=no )" == "" ]] && echo "changes=0" >> "$GITHUB_OUTPUT" || echo "changes=1" >> "$GITHUB_OUTPUT"
if [[ "$err" != "" ]]; then
echo "::error file=D10-Publish.yml,title=Error,line=139::$err"
Expand Down Expand Up @@ -186,11 +188,14 @@ jobs:
if [[ $(echo "$res" | grep "nothing to commit") == "" ]]; then
git tag -a "${{ env.THIS_TAG }}" -m "${{ env.THIS_RELEASE }}"
echo "changes=1" >> "$GITHUB_OUTPUT"
echo "git push --set-upstream origin ${{ secrets.PUBLIC_REPO_TARGET_BRANCH }}:${{ secrets.PUBLIC_REPO_TARGET_BRANCH }} ${pushopts}"
git push --set-upstream origin ${{ secrets.PUBLIC_REPO_TARGET_BRANCH }}:${{ secrets.PUBLIC_REPO_TARGET_BRANCH }} ${pushopts} || err="$err: Problem pushing changes to Public Repo"
git tag -a "${{ env.THIS_TAG }}" -m "${{ env.THIS_RELEASE }}"
echo "git push origin ${{ env.THIS_TAG }}"
git push origin ${{ env.THIS_TAG }}
if [[ ${{ vars.DRY_RUN }} == 0 ]]; then
echo "::notice file=D10-Publish.yml,title=Success::Public repository was updated."
else
Expand Down
35 changes: 35 additions & 0 deletions LICENSE.PUBLIC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# License

This project is in the public domain within the United States.

Additionally, we waive copyright and related rights in the work worldwide through the CC0 1.0 Universal public domain dedication.

## Exclusions from public domain

- [CKEditor] is licensed under the GPL
- This project uses various third-party JavaScript tools, which for convenience are versioned in this repository. Any files in the following directories are subject to their own licenses:

* `docroot/sites/all/themes/custom/boston/src/vendor-js`
* `docroot/sites/all/themes/custom/boston_hub/src/vendor-js`
* `docroot/sites/all/themes/custom/boston_public/src/vendor-js`
* `docroot/sites/all/themes/custom/boston_admin/src/vendor-js`

[Drupal]: https://drupal.org
[CKEditor]: http://ckeditor.com


## CC0 1.0 Universal Summary

This is a human-readable summary of the [Legal Code (read the full text)](https://creativecommons.org/publicdomain/zero/1.0/legalcode).

### No Copyright

The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.

You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

### Other Information

In no way are the patent or trademark rights of any person or organization affected by CC0, nor are the rights that other persons may have in the work or in how the work is used, such as publicity or privacy rights.

Unless expressly stated otherwise, the person who associated a work with this deed makes no warranties about the work, and disclaims liability for all uses of the work, to the fullest extent permitted by applicable law. When using or citing the work, you should not imply endorsement by the author or the affirmer.
23 changes: 23 additions & 0 deletions README.PUBLIC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[![Build Status](https://travis-ci.org/CityOfBoston/boston.gov-d8.png)](https://travis-ci.org/CityOfBoston/boston.gov-d8) [![Open Source Love](https://badges.frapsoft.com/os/v2/open-source.png?v=103)](https://github.com/ellerbrock/open-source-badges/)

# City of Boston Drupal Website
This repository maintains an up-to-date copy of the custom code used by City of Boston
to extend its Drupal website.

## Drupal Dependency
**This codebase currently requires Drupal 10**

Please check the release history or contact the [Digital Team](mailto:digital@boston.gov)
if you wish to access legacy versions of code - we may be able to supply some modules
compatible with earlier Drupal versions.

---
## Public domain ##
[![License: CC0-1.0](https://img.shields.io/badge/License-CC0%201.0-lightgrey.svg)](http://creativecommons.org/publicdomain/zero/1.0/)

This project is in the worldwide [public domain](https://github.com/CityOfBoston/boston.gov-d8/blob/master/LICENSE.md). As stated in [LICENSE](https://github.com/CityOfBoston/boston.gov-d8/blob/master/LICENSE.md):

> This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the [CC0 1.0 Universal public domain dedication](https://creativecommons.org/publicdomain/zero/1.0/).
>
> All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.
19 changes: 8 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,10 @@
"3449033. Enable Google Enterprise Cloud. DIG-4455 - DU June 2024": "https://www.drupal.org/files/issues/2024-06-03/recaptcha-enterprise-3449033-2.patch"
},
"drupal/core": {
"CoB patch - Fix original node is null on migration.": "patches/cob_migration_missing_original_001.patch",
"Optional end-date in date_range field type": "https://www.drupal.org/files/issues/2020-08-09/2794481-109.patch",
"Title is a render array - Fixes media library ajax popup.": "https://www.drupal.org/files/issues/2019-10-21/2663316-76.drupal.Broken-title-in-modal-dialog-when-title-is-a-render-array.patch",
"Simple decimals fail to pass validation (https://www.drupal.org/project/drupal/issues/2230909) - DU 03-11-2020 & 01-25-2024": "https://www.drupal.org/files/issues/2023-12-21/2230909-309.patch",
"TODO CHECK - ALLOW TO FAIL: Multi-language paragraphs du - 05/2022 https://www.drupal.org/project/drupal/issues/3025039": "https://www.drupal.org/files/issues/2022-05-10/3025039-68.patch"
"Optional end-date in date_range field type - https://www.drupal.org/project/drupal/issues/2794481": "https://www.drupal.org/files/issues/2024-06-26/2794481-262.patch",
"Simple decimals fail to pass validation (https://www.drupal.org/project/drupal/issues/2230909) - DU": "https://www.drupal.org/files/issues/2024-06-04/2230909-325.patch",
"Patch on patch (https://www.drupal.org/project/drupal/issues/2230909) - DU": "patches/core_2230909_updatehook.patch",
"TODO CHECK - ALLOW TO FAIL: Multi-language paragraphs du - 05/2022 https://www.drupal.org/project/drupal/issues/3025039": "https://www.drupal.org/files/issues/2024-05-01/3025039-94.patch"
},
"gasparesganga/php-shapefile": {
"Patch for PHP8 compatibility for Drupal 10": "patches/php-shapefile-php8-compat.patch"
Expand All @@ -308,11 +307,7 @@
"CoB patch - Reverts extension change for drupal < 8.7": "patches/fixes_unsupported_ConfigurableInterface_extension_001.patch"
},
"drupal/viewfield": {
"https://www.drupal.org/project/viewfield/issues/2860523": "https://www.drupal.org/files/issues/2018-06-08/d7_upgrade_path-2860523-6.patch",
"Fix Undefined array key 'items_to_display' - DU Jan 2024": "https://www.drupal.org/files/issues/2023-08-21/viewfield-undefined-array-key-3267240-6.patch"
},
"drupal/entity_clone": {
"resolves memory issue when cloning - du July/2023": "https://www.drupal.org/files/issues/2023-06-23/entity_clone-avoid_unnecessary_recursion_3010626-16.patch"
"https://www.drupal.org/project/viewfield/issues/2860523": "https://www.drupal.org/files/issues/2018-06-08/d7_upgrade_path-2860523-6.patch"
},
"drupal/media_entity_browser": {
"CoB patch - Skip confirmation step": "./patches/media_entity_browser__skip_confirmation.patch"
Expand Down Expand Up @@ -345,7 +340,9 @@
"2878684 - Use String.match to correlate regions when switching Layouts in Panels IPE": "https://www.drupal.org/files/issues/panels-ipe-2878684-3.patch"
},
"drupal/lightning_workflow": {
"COB Patch: Deprecated drupal_get_path for seven theme - DIG-3336: DU Oct 2023": "patches/lightning_scheduler.patch"
"COB Patch: Deprecated drupal_get_path for seven theme - DIG-3336: DU Oct 2023": "patches/lightning_scheduler.patch",
"Circular reference detected for service cache.backend.database: DU July 2024": "https://www.drupal.org/files/issues/2024-07-01/fix-circular-reference-3457016-11.patch",
"taxonomy_term__scheduled_transition_date does not exist https://www.drupal.org/project/lightning_workflow/issues/3459341 DU": "https://www.drupal.org/files/issues/2024-07-05/add-base-fields-to-new-content-types-supported-by-content-moderation-3459341-2.patch"
},
"drupal/lightning_core": {
"Fatal error in lightning_workflow when move to core v10.2+ (https://www.drupal.org/project/lightning_core/issues/3408813)": "https://www.drupal.org/files/issues/2023-12-18/3408813_fatal_type_declaration_0.patch"
Expand Down
Loading

0 comments on commit 62a643a

Please sign in to comment.