Deployment
Core GIT
Core environments
prod
- Production environmentdev
- Testing environment
Core git branches
prod
- The latest stable version deployed toprod
(production)dev
- Ready to test version deployed todev
(staging)main
- Master branch with the most up-to-date stable version (For archiving / backup purposes only)
General git Flows
Use feature/xxx
or bug/xxx
First Steps
To start working on new feature/bug
- Assign JIRA Ticket and set to “In Development"
- Create new
feature/xxx
branch from release - Work in the
feature/xxx
branch on all development, fixes or updates - Regularly merge
prod
intofeature/xxx
to keep it up to date, commands:git checkout feature/xxx
git fetch origin
git merge --no-ff origin/prod
Deploy feature for testing
When the feature is ready for testing, merge it into dev
branch.
Merge
prod
into thefeature/xxx
- to keep feature updated.Merge
feature/xxx
into thedev
Deploy
dev
branch todev
environment.Navigate to front admin and/or front web where “deploy.sh” file is:
cd <project_directory>/front-web
Deploy:
Front End:
./deploy.sh dev
Back End (web-api):
./deploy.sh app-name stage-name
For example:./deploy.sh feeds-infrastructure dev
Set the JIRA Ticket to "Ready for QA"
Release feature
If QA succeeds, merge the feature/xxx
branch into the prod
branch.
Merge
prod
into thefeature/xxx
- to keep feature updated.Merge
feature/xxx
into theprod
Deploy
prod
branch toprod
environment.Navigate to front admin and/or front web where “deploy.sh” file is:
cd <project_directory>/front-web
Deploy:
Front End:
./deploy.sh prod
Back End (web-api):
./deploy.sh app-name stage-name
For example:./deploy.sh feeds-infrastructure prod
Set JIRA Ticket to "Done"
Backup / Restore
Create Backup
The main
branch is used for backup.
It is recommended to regularly merge the stable prod
branch to main
.
git checkout main && git merge prod
Restore Backup
If prod suddenly fails, you can always rollback to main
:
git checkout main
Redeploy Front End:
./deploy.sh prod
Redeploy Back End:
./deploy.sh app-name stage-name
For example:
./deploy.sh feeds-infrastructure prod