Test Custom Upstream Changes Before Release
Create a test version of your Custom Upstream to review changes.
Maintainers of Custom Upstreams bear the responsibility of pulling in core updates from Pantheon. Regardless of update type, always test changes before you distribute them to your sites. We recommend using the workflow example below to test and update core.
Use the Pantheon Workflow
Create content on your test site and use the standard Pantheon workflow to push up to your Test and Live environments, and fully test core updates. Checkout our guide for an example of generating content from the command line.
Sample a Few Sites
We suggest picking a few sample sites with varying functionality and design to test updates on a Multidev environment or agencies that manage large portfolios. Release the update when things look good on these sites.
Before You Begin
Follow the procedure to create a custom upstream and confirm that you have:
A repository for your Custom Upstream hosted with your preferred provider (GitLab, Bitbucket, etc.)
A local clone of that repository, which tracks Pantheon's upstream as a remote
Pantheon's core code merged into your Custom Upstream repository
Your Custom Upstream repository connected to Pantheon
Create a Test Site on Pantheon
This test site will be used later for evaluating Custom Upstream changes.
Go to your Personal Workspace > click Create New Site.
Name your site.
Select your organization from the dropdown menu.
Click Create Site.
Select the desired repository from the Custom Upstream options.
Click Visit your Pantheon Dashboard.
Click Visit Development Site and complete the installation process for the selected framework.
Custom Upstreams cannot contain the tags pantheon_test_n
or pantheon_live_n
. Pantheon site level repositories use these tags to deploy code to Test and Live environments.
Test and Release Pantheon Core Updates
Navigate to the local clone of your Custom Upstream repository > add Pantheon's Upstream as a remote if you haven't done so already:
git remote add pantheon-wordpress https://github.com/pantheon-systems/WordPress.git
git remote add pantheon-drops-7 https://github.com/pantheon-systems/drops-7.git
git remote add pantheon-drupal-10 https://github.com/pantheon-upstreams/drupal-composer-managed.git
Add the test site you created above as a remote to your Custom Upstream by grabbing the test site's repository URL on Pantheon using Terminus. Replace
<site>
with your site name:terminus connection:info <site>.dev --field=git_url
Replace
<git_url>
in the following command to add your new test site as a remote:git remote add pantheon-test <git_url>
Checkout a new branch:
git checkout -b "core-update"
It's important to use feature branches when applying and testing updates. Updates applied on the master branch and pushed to the remote repository on GitHub or Bitbucket become available to individual sites downstream. Using a feature branch gives you a chance to reveal issues before distributing updates.
Pull down Pantheon's core updates from the appropriate upstream:
git fetch pantheon-wordpress git merge pantheon-wordpress/master
git fetch pantheon-drops-7 git merge pantheon-drops-7/master
git fetch pantheon-drupal-10 git merge pantheon-drupal-10/master
Push to your new test site on Pantheon:
git push pantheon-test core-update
Return to the Site Dashboard for your test site > navigate to the Multidev overview tab > click Git Branches.
Click the Create Environment button next to the
core-update
branch.Use the new Multidev environment to evaluate your
core-update
branch > merge the branch into master > push to your remote repository on GitHub or Bitbucket when you're ready to release:git checkout master git merge --no-ff core-update git push origin master
The example command above assumes you are using the default remote destination (
origin
) for your Custom Upstream repository that's hosted with your preferred provider.
Updates will become available to sites downstream as one-click updates within an hour of being pushed to the remote repository on sites running the Custom Upstream within your Organization. You can apply the updates on each site individually within the Site Dashboard, or you can apply updates in bulk using Terminus and the Mass Update plugin. Review the WordPress and Drupal Core Updates documentation for more details.