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.
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.
- Create Pull Request for your branch into the develop Branch
- Resolve any Merge Issues
- Squash and Merge with develop
- Test develop Locally
- Create a release branch from develop
- Deploy the release branch on Heroku
- Create Pull Request for the release branch into the master Branch
- Sqash and Merge with master
-
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.
-
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.
-
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.
-
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. -
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
-
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.
-
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.
Name | Default | Description |
---|---|---|
REACT_APP_BILLING_ENGINE_URL | Empty | Billing Engine API URL |
Name | Default | Description |
---|---|---|
REACT_APP_BILLING_ENGINE_FEATURE | false | Enables Billing Engine Interface |
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.