Skip to content

Commit

Permalink
Merge pull request #3488 from CityOfBoston/master
Browse files Browse the repository at this point in the history
(production) Project Summaries fail to show
  • Loading branch information
davidrkupton committed May 24, 2024
2 parents bf4fbaf + 887573c commit 2fb677e
Show file tree
Hide file tree
Showing 19 changed files with 889 additions and 92 deletions.
3 changes: 3 additions & 0 deletions .github/config/deploy/deploy-from.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ scripts/deploy/cob_utilities.sh
scripts/composer
composer.lock
composer.json

.github/config/releaseNotesConfig.yml
.github/workflows/D10-NotifyRelease.yml
6 changes: 3 additions & 3 deletions .github/config/releaseNotesConfig.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
username: 'Digital Team Notices'
icon_url: https://boston.gov/digitalteamicon.png

pretext: A production deployment has been completed and release notes have been published.
pretext: A boston.gov deployment has been completed and release notes have been published.
title: <{{payload.release.html_url}}|Code Release>
title_link: {{payload.release.html_url}}

Expand All @@ -16,7 +16,7 @@ fallback: |-
blocks:
- type: "divider"
- type: "header"
text:
text:
type: "plain_text"
text: "Release Information"
- type: section
Expand All @@ -26,7 +26,7 @@ blocks:
- type: mrkdwn
text: "Repository Tag\n{{payload.release.tag_name}}"
- type: mrkdwn
text: "Release Date\n{{truncate payload.release.created_at 10}}"
text: "Release Date\n{{truncate payload.release.created_at 10}}"
- type: context
elements:
- type: image
Expand Down
69 changes: 69 additions & 0 deletions .github/config/slack/slack-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
username: GitHub-CI
icon_url: https://octodex.github.com/images/femalecodertocat.png

pretext: Triggered via {{eventName}} by {{actor}} {{default action "action"}} {{ref}} `{{diffRef}}`
title: GitHub Actions
title_link: https://support.github.com

fallback: |-
[GitHub] {{workflow}} #{{runNumber}} is {{jobStatus}}
blocks:
# author
- type: context
elements:
- type: image
image_url: '{{{sender.avatar_url}}}'
alt_text: '{{sender.login}}'
- type: mrkdwn
text: "*<{{sender.html_url}}|{{sender.login}}>*"

# text
- type: section
text:
type: mrkdwn
text: >-
Workflow {{payload.workflow.name}} {{payload.workflow_run.status}}
with {{payload.workflow_run.conclusion}} after
{{pluralize payload.workflow_run.run_attempt 'attempt'}}
accessory:
type: button
text:
type: plain_text
text: View
value: workflow_run_{{payload.workflow_run.workflow_id}}
url: '{{payload.workflow_run.html_url}}'
action_id: button-action

# fields
- type: section
fields:
- type: mrkdwn
text: "*Jobs*\n{{payload.workflow_run.jobs_url}}"
- type: mrkdwn
text: "*Logs*\n{{payload.workflow_run.logs_url}}"

# footer
- type: context
elements:
- type: image
image_url: '{{footer_icon}}'
alt_text: github
- type: mrkdwn
text: '{{{footer}}} | <!date^{{ts}}^{date_short_pretty} at {time}|{{ts}}>'

footer: >-
<{{repositoryUrl}}|{{repositoryName}}> {{workflow}} #{{runNumber}}
colors:
success: '#5DADE2'
failure: '#884EA0'
cancelled: '#A569BD'
default: '#7D3C98'

icons:
success: ':white_check_mark:'
failure: ':grimacing:'
cancelled: ':x:'
skipped: ':heavy_minus_sign:'
default: ':interrobang:'
127 changes: 127 additions & 0 deletions .github/config/slack/slack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
username: GitHub-CI
icon_url: https://octodex.github.com/images/femalecodertocat.png

pretext: Triggered via {{eventName}} by {{actor}} {{default action "action"}} {{ref}} `{{diffRef}}`
title: GitHub Actions
title_link: https://support.github.com

text: &text |
*<{{workflowRunUrl}}|Workflow _{{workflow}}_ job _{{jobName}}_ triggered by _{{eventName}}_ is _{{jobStatus}}_>* for <{{refUrl}}|`{{ref}}`>
{{#if description}}<{{diffUrl}}|`{{diffRef}}`> - {{{description}}}{{/if}}
{{#if payload.commits}}
*Commits*
{{#each payload.commits}}
<{{this.url}}|`{{truncate this.id 8}}`> - {{this.message}}
{{/each}}
{{/if}}

fallback: |-
[GitHub] {{workflow}} #{{runNumber}} {{jobName}} is {{jobStatus}}
fields:
- title: Job Steps
value: "{{#each jobSteps}}{{icon this.outcome}} {{@key}}\n{{/each}}"
short: false
- title: Job Matrix
value: "{{#each jobMatrix}}{{@key}}: {{this}}\n{{/each}}"
short: false
- title: Workflow
value: "<{{{workflowUrl}}}|{{workflow}}>"
short: true
- title: Git Ref
value: "{{ref}} ({{refType}})"
short: true
- title: Run ID
value: |-
<{{workflowRunUrl}}|{{runId}}>
short: true
- title: Run Number
value: "{{runNumber}}"
short: true
- title: Actor
value: "{{actor}}"
short: true
- title: Job Status
value: "{{jobStatus}}"
short: true

blocks:
# author
- type: context
elements:
- type: image
image_url: '{{{sender.avatar_url}}}'
alt_text: '{{sender.login}}'
- type: mrkdwn
text: "*<{{sender.html_url}}|{{sender.login}}>*"

# title
- type: section
text:
type: mrkdwn
text: |
*<{{title_link}}|{{title}}>*
# text
- type: section
text:
type: mrkdwn
text: *text
accessory:
type: button
text:
type: plain_text
text: View
value: workflow_run_{{runId}}
url: '{{workflowRunUrl}}'
action_id: button-action

# fields
- type: section
fields:
- type: mrkdwn
text: |-
*Job Steps*
{{#each jobSteps}}{{#ifneq this.outcome 'skipped'}}{{icon this.outcome}} {{@key}}
{{/ifneq}}{{/each}}
- type: section
fields:
- type: mrkdwn
text: "*Workflow*\n<{{{workflowUrl}}}|{{workflow}}>"
- type: mrkdwn
text: "*Git Ref*\n{{ref}} ({{refType}})"
- type: mrkdwn
text: |-
*Run ID*
<{{workflowRunUrl}}|{{runId}}>
- type: mrkdwn
text: "*Run Number*\n{{runNumber}}"
- type: mrkdwn
text: "*Actor*\n{{actor}}"
- type: mrkdwn
text: "*Job Status*\n{{jobStatus}}"

# footer
- type: context
elements:
- type: image
image_url: '{{footer_icon}}'
alt_text: github
- type: mrkdwn
text: '{{{footer}}} | <!date^{{ts}}^{date_short_pretty} at {time}|{{ts}}>'

footer: >-
<{{repositoryUrl}}|{{repositoryName}}> {{workflow}} #{{runNumber}}
colors:
success: '#5DADE2'
failure: '#884EA0'
cancelled: '#A569BD'
default: '#7D3C98'

icons:
success: ':white_check_mark:'
failure: ':grimacing:'
cancelled: ':x:'
skipped: ':heavy_minus_sign:'
default: ':interrobang:'
21 changes: 21 additions & 0 deletions .github/sanitize/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# BOSTON.GOV - Sanitize Read-me
## Purpose
We wish to maintain `open-source` availability of the boston.gov website, allowing Boston residents and like-minded municipalities can view, commenting on and download our Drupal source code.

These files are used as part of an `rsync` performed when synchronizing the private working repo with the public "open-source" repo.

## Methodology
While committed to the principles of the open-source community, we cannot publish secret or confidential information. This information typically can be classified environment set-ups, or integrations with third parties.

We do not publish copies of our database which contains our site content, and possibly data we have an obligation to protect -for example for data privacy reasons.

The santitize process occurs in a GithubAction found in D10-Publish.yml

## Public/Private Repo Rationale
We maintain a private working repo:
- So that any confidential/sensitive settings which are accidentially committed do not make their way into a public repo.
- To keep the public repo somewhat managed and "clean".
- To keep the public repo as un-complicated as possible.
- To keep the public repo in line with the production code committed and deployed to Acquia.
- To keep the commit messages and language professional and consistent (templated) between deploys.
- So that release notes and other communications can be formatted suitable for general consumption.
64 changes: 64 additions & 0 deletions .github/sanitize/publish-excludes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
############################################################
# Target files known to have sensitive information in them.
# This section can be added as new risks are identified.
############################################################
**/*/bos_*.settings.yml
**/*/node_*.settings.yml
docroot/modules/custom/**/*settings.yml
config/default/google_tag.settings.yml
config/default/jsonapi.settings.yml
config/default/jsonapi_extras.settings.yml
config/default/login_security.settings.yml
config/default/r4032login.settings.yml
config/default/salesforce.settings.yml
config/default/seckit.settings.yml
config/default/sophron.settings.yml
docroot/modules/custom/slackposter

############################################################
# Files which shouldn't be included, but probably don't need
# reviewing often.
############################################################

# Remove all the custom settings files
docroot/sites/default/settings
docroot/core
docroot/libraries
docroot/sites/all

# Remove any files
docroot/sites/default/files/private
docroot/sites/default/files/pdf_templates
docroot/sites/default/files/manifest.txt

# Remove any Core and Contributed modules
docroot/modules/contributed
docroot/themes/contributed

# Remove all folders not in the root
drush
patches
scripts
tests

# Exclude OS config files
.htaccess
web.config

# exclude all the non-default config folders
config/acquia_dev
config/acquia_prod
config/acquia_stage
config/local
config/never_import
config/travis

# Remove the Github actions folders
.github

# Junk files in the root
.gitignore
.lando.yml
.lando.yml.linux
RELEASE.md
**/.gitignore
13 changes: 13 additions & 0 deletions .github/sanitize/publish-from.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
############################################################
# These two folders must be retained.
############################################################
config
docroot
docroot/modules/custom
############################################################
# Production environments need composer files.
############################################################
composer.json
composer.lock
LICENSE.md
README.md
Loading

0 comments on commit 2fb677e

Please sign in to comment.