Skip to content

Commit

Permalink
Create sandbox environment
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardDavies authored and BTS eGov committed Nov 13, 2024
1 parent f911a44 commit 3a21483
Show file tree
Hide file tree
Showing 4 changed files with 221 additions and 0 deletions.
40 changes: 40 additions & 0 deletions sandbox.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Sandbox Environment

## Description

The `sandbox` branch creates a long-living multidev that provides a permanently available sandbox environment that mirrors production where editors can safely practice and use the CMS without fear of messing up the live site.

This environment can be used for guided training classes, self learning, or experimentation, etc.

## Environment Updates

### Code Syncing

This environment should be a replica of the live site so it needs to be updated as part of the deployment process in order to stay in sync with the live site.

Run these commands to keep this branch up to date:

```
git checkout sandbox
git rebase origin/master
git push -f
```

If the master branch is already ahead of the Live site, you'll need to find the commit ID belonging to the Live site deployment. This can be found in the Code section of the Pantheon dashboard. (Ignore the first "CircleCI deployment" commit&mdash;it's the second commit ID you want.) Use this rebase command instead of the above one: `git rebase <commit-ID>`

### Content Syncing

The content also needs to be periodically updated by cloning the database from Live by following these steps. (Please note that this will destroy any existing "test content" previously created on the site.)

1. Run `lando terminus env:clone-content employees.live sandbox --db-only`
2. Run `lando terminus drush employees.sandbox deploy`
3. Create and publish an informational `Sandbox Site` alert with the following text:

```This sandbox site is a copy of employees.portland.gov and is intended to provide a safe environment for editor training classes, self learning, or experimentation, etc. Changes made here will not affect the live site and cannot be imported into the live site.```

## Sandbox Branch Code Changes

This branch should only have a few code changes from the `master` branch:
1. `sandbox.md` (This file)
2. `web/modules/custom/portland_openid_connect/src/Routing/RouteSubscriber.php` (Enabling Office 365 login for this site)
3. `web/sites/default/settings.php` (Add sandbox domain and environment indicator settings)
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
uuid: 992146f2-77c4-42ac-bd5f-ba03ab480bed
langcode: en
status: true
dependencies:
config:
- user.role.content_lead
module:
- user
id: user_add_role_action.content_lead
label: 'Add the Content Lead role to the selected user(s)'
type: user
plugin: user_add_role_action
configuration:
rid: content_lead
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
uuid: f6d11d86-4a19-4270-a8cd-bd4041afb561
langcode: en
status: true
dependencies:
config:
- user.role.content_lead
module:
- user
id: user_remove_role_action.content_lead
label: 'Remove the Content Lead role from the selected user(s)'
type: user
plugin: user_remove_role_action
configuration:
rid: content_lead
153 changes: 153 additions & 0 deletions web/sites/default/config/user.role.content_lead.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
uuid: baf86895-37e5-4133-80ea-b6555e694f61
langcode: en
status: true
dependencies:
config:
- filter.format.basic_html
- media.type.document
- media.type.image
- media.type.remote_document
- media.type.remote_video
- node.type.alert
- node.type.contract
- node.type.event
- node.type.news
- node.type.notification
- node.type.page
- node.type.resource
- taxonomy.vocabulary.tags
- workflows.workflow.editorial
module:
- content_moderation
- field_permissions
- filter
- group
- media
- moderation_sidebar
- node
- path
- pathauto
- quick_node_clone
- redirect
- scheduler
- system
- taxonomy
- toolbar_menu
id: content_lead
label: 'Content Lead'
weight: -4
is_admin: null
permissions:
- 'access content overview'
- 'access group overview'
- 'access media overview'
- 'administer menu'
- 'administer redirects'
- 'clone alert content'
- 'clone contract content'
- 'clone event content'
- 'clone news content'
- 'clone notification content'
- 'clone page content'
- 'clone resource content'
- 'create alert content'
- 'create contract content'
- 'create document media'
- 'create event content'
- 'create field_feature'
- 'create field_feature_until'
- 'create field_homepage'
- 'create field_popularity'
- 'create image media'
- 'create media'
- 'create news content'
- 'create notification content'
- 'create page content'
- 'create private group'
- 'create remote_document media'
- 'create remote_video media'
- 'create resource content'
- 'create terms in tags'
- 'create url aliases'
- 'delete any alert content'
- 'delete any contract content'
- 'delete any event content'
- 'delete any news content'
- 'delete any notification content'
- 'delete any page content'
- 'delete any resource content'
- 'delete media'
- 'delete own alert content'
- 'delete own contract content'
- 'delete own document media'
- 'delete own event content'
- 'delete own image media'
- 'delete own news content'
- 'delete own notification content'
- 'delete own page content'
- 'delete own remote_document media'
- 'delete own remote_video media'
- 'edit any alert content'
- 'edit any contract content'
- 'edit any document media'
- 'edit any event content'
- 'edit any image media'
- 'edit any news content'
- 'edit any notification content'
- 'edit any page content'
- 'edit any remote_document media'
- 'edit any remote_video media'
- 'edit field_feature'
- 'edit field_feature_until'
- 'edit field_homepage'
- 'edit field_popularity'
- 'edit own alert content'
- 'edit own contract content'
- 'edit own document media'
- 'edit own event content'
- 'edit own field_feature'
- 'edit own field_feature_until'
- 'edit own field_homepage'
- 'edit own field_popularity'
- 'edit own image media'
- 'edit own news content'
- 'edit own notification content'
- 'edit own page content'
- 'edit own remote_document media'
- 'edit own remote_video media'
- 'edit own resource content'
- 'notify of path changes'
- 'revert alert revisions'
- 'revert contract revisions'
- 'revert event revisions'
- 'revert news revisions'
- 'revert notification revisions'
- 'revert page revisions'
- 'revert resource revisions'
- 'schedule publishing of media'
- 'schedule publishing of nodes'
- 'update any media'
- 'update media'
- 'use editorial transition create_new_draft'
- 'use editorial transition mark_for_review'
- 'use editorial transition publish'
- 'use editorial transition unpublish'
- 'use moderation sidebar'
- 'use text format basic_html'
- 'view alert revisions'
- 'view all media revisions'
- 'view any unpublished content'
- 'view editor in toolbar'
- 'view field_feature'
- 'view field_feature_until'
- 'view field_homepage'
- 'view field_popularity'
- 'view latest version'
- 'view notification revisions'
- 'view own field_feature'
- 'view own field_feature_until'
- 'view own field_homepage'
- 'view own field_popularity'
- 'view own unpublished content'
- 'view own unpublished media'
- 'view the administration theme'

0 comments on commit 3a21483

Please sign in to comment.