Mayflower release managers with the necessary repo permissions can follow these steps to deploy code to production (i.e. do a release).
Note: the following steps assume that your local machine and repository is already set up and functioning according to our Getting Started docs.
- If there is new code to be delivered, notify the team at least two hours ahead of time that a release is coming. Follow the Communicate Releases instructions for Upcoming Deployments.
- Pull and checkout the massgov/mayflower
dev
branch:git fetch upstream && git checkout dev
. - Create a release branch
git checkout -b release-#.#.#
where#.#.#
is the next version (i.e.5.0.0
). Read more about Mayflower and semantic versioning to ensure that your are creating the right type of version.. - Document the new release based on the "Upcoming" queue at the top of release-notes.md, and then commit.
- Bump the version in
@pages/readme2.json
by updating the version and date text inerrorPage.type
, and then commit. - Push release branch to
massgov/mayflower
(i.e.git push upstream release-#.#.#
). - Deploy release branch to your personal fork's GH-Pages by running
./scripts/deploy-gh-pages.sh -b <your-release-branch-name> -t <your-github-username>
from the repo root. - Verify release notes against the site rendered on your GH-Pages:
<your-github-username>.github.io/mayflower
. - Smoke test most Mayflower featureset. (@todo define Mayflower featureset)
- Open a Github Pull Request to merge (no squash!) the release branch into the
master
branch.- Add the relevant release notes to the PR notes.
- Create a production release off the
master
branch in GitHub, remember to add the release notes! - Pull down and checkout the your release tag by running
git pull --tags && git checkout <your-release-tag>
(Note: you should see a message from git that you are in a detached head state and that is okay.) - Deploy release tag to Prod by running
./scripts/deploy-gh-pages.sh -b <your-release-tag> -t massgov -c mayflower.digital.mass.gov
from the repo root, where:-b
is the build source (required): your git branch or tag name.-t
is the target remote repo owner (required):massgov
for prod.-c
is the custom cname (domain) for Prod (required for prod deployment):mayflower.digital.mass.gov
- When prompted, confirm your prod deployment by typing:
y
- Smoke test Prod
- Make sure the home page reflects the date and version
- Ensure Mayflower featureset (@todo define) is functional
- Open a GitHub Pull Request to merge
master
intodevelop
(this should only bring an updatedrelease-notes.md
,@pages/readme2.json
). If possible, have a peer do the merge after a quick review. If no peers are available, proceed with your merge into develop, but ask for a review the following day. If it doesn't pass review, you may have to rollback the delivery. - In JIRA Go to the DP project.
- Click on the Releases icon on the left side (it looks like a boat/ship).
- Add a new release version with today's date.
- Go to each shipped JIRA issue and update the Fix Version/s field.
- Go to the list of issues contained within the release version and copy the URL (link to this issue from release notes).
- Follow the Communicate Releases instructions for Deployment Completed to email Release Notes to the team.
- Celebrate!!
In the event that a release needs to be rolled back from production, follow these steps:
- Pull down and checkout the prior release tag and check it out by running
git pull --tags && git checkout <prior-release-tag>
(Note: you should see a message from git that you are in a detached head state and that is okay.) - Deploy release tag to Prod by running
./scripts/deploy-gh-pages.sh -b <prior-release-tag> -t massgov -c mayflower.digital.mass.gov
from the repo root- When prompted, confirm your prod deployment by typing:
y
- When prompted, confirm your prod deployment by typing:
- Validate rollback by browsing to Prod and verifying that the home page reflects the prior version