1.44.3-beta-st.7 • Published 2 years ago

sc-sierra v1.44.3-beta-st.7

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Sierra - Second Closet

This repo contains the code for Second Closet's internal Sierra web-application. This software in it's entirety is produced and owned by Second Closet.

Deploy Instructions

Quick Guide

This is a quick rundown of the correct process for deploying new features to the live site.

Note: This process will be extended in the near future to include Release Branches, which will enable us to more clearly roll back to stable versions of the site when necessary.

  1. Create Pull Request for your branch into the develop Branch
  2. Resolve any Merge Issues
  3. Squash and Merge with develop
  4. Test develop Locally
  5. Create a release branch from develop
  6. Deploy the release branch on Heroku
  7. Create Pull Request for the release branch into the master Branch
  8. Sqash and Merge with master

Detailed Guide

  1. Create Pull Request for your branch into the develop Branch

    Once you're done with your branch (and it is stable), navigate to the Branches tab in Github and click New Pull Request for your branch. Make sure that the PR is from your branch into the develop branch.

  2. Resolve any Merge Issues

    If there are any merge conflicts, click through to resolve them. Be careful in your resolutions, as changing the code here may have unexpected consequences. Once resolved, scroll to the top of the page and click on Accept Changes.

  3. Squash and Merge with develop

    If the new feature can be launched on its own (that is, it will not be bundled with other PRs), then click on Squash & Merge. This will merge your branch with develop.

  4. Test develop Locally

    Note: For this step you will need to have serve installed locally. You can do this using npm as follows:

    npm install serve -g  

    In your local environment, switch to the develop branch. Fetch and then Merge, (or alternately, Pull) the updates from the git repo so that your local copy of develop contains the new feature that was introduced by your branch.

    Run the branch locally using the terminal command:

    npm start

    Test out your feature in the browser, and make sure that there are no new Warnings or Errors being thrown. Also test out the site's more general functions: navigation, the shop process, authentication, and make sure that they still work without issue.

    Next, create a local build of _develop using the terminal command:

    npm run build

    This should take a few minutes. When the build is complete, you can serve it locally by using serve:

    serve -s build

    This will start a local instance of develop, but instead of compiling the code in real-time like with npm start, this runs the build version and will include the generated static files.

  5. Create a release branch from develop

    Once develop has been tested thoroughly and you are satisfied that it is stable, create a release branch by branching out from develop.

    The release branch should be named with the following structure:

    release-x.x.x

    Each x is a part of the version number. For example, version 2.6.33 would have the following release branch name:

    release-2.6.33

  6. Deploy the release branch on Heroku

    Note: Only proceed to this step if your tests in the previous steps have not shown any errors

    Navigate to the Heroku console in your browser, and into the secondcloset app. Click on the Deploy tab, and navigate down to the bottom of the page.

    Under the title Manual Deploy, use the drop-down list to select the appropriate release branch, and then click on Deploy Branch. This should take a few minutes to build.

  7. Create Pull Request for the release branch into the master Branch, and Merge

    Note: This should be done after the new develop has been running for at least a day with no new issues.

    Create a Pull Request on Github from the relevant release branch to master. Once you have resolved any merge conflicts (though there should be none at this stage), Squash and Merge with master.

Environment Variables

NameDefaultDescription
REACT_APP_BILLING_ENGINE_URLEmptyBilling Engine API URL

Feature Flags

NameDefaultDescription
REACT_APP_BILLING_ENGINE_FEATUREfalseEnables Billing Engine Interface

Additional Notes

This project was bootstrapped with Create React App.

For additional referene on markup style, see this Markdown-Cheatsheet

There's a very useful writeup on authentication wrapper components for use with react-router and Redux.

Documentation on react-router itself can be found here.

A full description of Redux, as well as how to integrate it with react-router and with asynchronous functions can be found here.