Skip to content

Branching and Deployment

Neil M edited this page Aug 4, 2022 · 25 revisions

This repository is for the Repair Directory public facing client. There is a separate repository here for the server and admin section. These are typically deployed in parallel.

We are using a simplified branching structure (not Git Flow) because development typically only involves 1-2 people.

master is always kept in a state that is ready for merging to production and pushing live.

Development

Features and non-urgent bugs

Features and bug fixes are worked on on branches, and submitted via pull requests.

Internal

If you have write access to the repo.

  • Developer creates a branch off of the develop branch (or for Reuse Directory, develop-reuse and merge from develop to pick up any changes).
  • Naming
    • begins with the name of the story in Jira, e.g REP-1234, following by an underscore, following by short text reasonably indicative of which issue it relates to, in plain English.
    • e.g. REP-1346_safari-timepicker
  • Can push the branch to restarters.dev, and check out to that branch for someone to feature test
  • Regularly (e.g. daily) merge develop in to the feature branch
  • Once first round of dev is complete, a pull request is created against develop from the feature branch
    • Code review discussion takes place on the PR.
    • Review requested from relevant other dev
  • When code review complete, merged in to the develop branch

External

Urgent bugs

We do hotfix branches direct into master for this. When done, merge into develop too.

Releases/Deployment

git checkout develop
git pull
git checkout master
git pull
git merge develop
git push origin master
git checkout production
git pull
git merge master
git push origin production

Pushing to production

On the live server:

cd /var/repo/repair-directory-nuxt.git
git pull
npm run build
pm2 reload all

Smoke tests

Check that these pages load:

On https://therestartproject.org/repairdirectory:

  • Check the number of displayed businesses matches the number of businesses that are 'Published' in the back-end
  • Check you can do a location/category search
  • Clicking a business opens that businesses card
  • Clicking the business website opens the business in a new tab
  • Sharing and navigating to the shared link for a search loads the correct site and prefilters to those results
  • Sharing and navigating to the business link loads the correct site and and shows the business in question

Back-end relates smoke tests are here, but probably don't need running through if changes have only been made to the front-end.

Tidying up

Make sure develop has latest changes from master for our new sprint:

git checkout develop
git merge master