Documentation and Deliverables
Written by Jeff Gregory, edited by Charles Graham
GitHub repos should have 3 branches, each with their own workflows:
- cwbi-dev
- cwbi-test
- cwbi-prod
The default branch that you merge any and all initial changes into will be cwbi-dev
The other two branches are there for when you are ready to update those environments with your changes.
You would merge, cwbi-dev → cwbi-test → cwbi-prod ensure all 3 branches have any changes.
Any references to your T7 CDA should be changed to the national CDA for use on A2W.
i.e. Change the internal URL (https://wm.sam.ds.usace.army.mil:8243/sam-data) to the public URL (https://cwms-data.usace.army.mil/cwms-data) needed to publish on A2W
Use environment variables to reference your CDA instance, you can read more on environments here.
Recommended you use environment variables for OFFICE and CDA_API_ROOT.
This way you change one URL for the entire application and do not need to keep track of everywhere it is referenced.
For each of the environments you will be able to visit them here:
Dev - https://water.dev.cwbi.us/office/sam
Test - https://water-test.cwbi.us/office/sam/
Prod – https://water.usace.army.mil/office/sam - Requires a configuration change by CRREL to go live.
How we typically make updates:
- Make sure to pull any changes from the cwbi-dev branch
- You will need to “fetch” cwbi-dev with the following commands if you don’t have it already
git fetch origin cwbi-dev cwbi-devgit checkout cwbi-dev(this is just to check out the branch)- Create a new branch naming it to represent what changes you will be making
- Typically, a new “feature” will have a branch naming convention “feature/this-is-the-new-feature”
- Example command:
git checkout -b feature/update-wq-table-component - Other naming options are (some may just be locally on your computer):
issue[number]/what-the-issue-is(e.g., issue38/routes-not-setup-correctly); relates to an issue in the repohotfix/what-the-hotfix-istest/just-to-see-what-happens
- Commit and push changes
- Try to add good commit messages
- Merge the new branch into cwbi-dev (default branch)
- Consider deleting feature branches after merging
- Wait for workflow to complete and review changes on water.dev.cwbi.us
- Merge into cwbi-test from cwbi-dev when changes are good and all working
- Wait for workflow to complete and review changes on water-test.cwbi.us
- Merge into cwbi-prod from cwbi-test when changes are good and all working
- Wait for workflow to complete and review changes on water.usace.army.mil
- Page will not render unless an “allow” configuration is setup for your office
- Once you have your site enabled on the public A2W site, you must request explicitly to have the link on A2W changed from your existing WM site to the new A2W site.
Make this request with your official USACE GitHub account via the issue page here: A2W Issues
In your GitHub action, after you merge the pull request. You can see the action live push the files via S3 to CWBI.
You can review your workflows in the actions tab of GitHub here: (change 3 letter to your district)
Select the workflow name at the top left to match the environment you are deploying to.
https://github.com/USACE/swt-wm-web/actions