background
In order to improve the efficiency of team collaboration, the team has formulated the Git branch management specification and realized automatic deployment with ali Cloud assembly line. After trial trial during this period, it is more suitable for the use scenario of the team. The following is the specification content record.
Branch type
-
Mater branch: The master branch is also the protection branch, which is used to deploy the production environment and the pre-release environment. It can only be combined by the Release branch and hotfix branch. To ensure the stability of the master branch, no one can directly submit code in this branch.
-
Develop branch: The develop branch is also a protection branch, keeping up with the latest development code.
-
Feature branch: A development branch for new features. It is created based on the Develop branch and merged into the Develop branch after feature development and named in the feature/module_user_date format
-
Release branch: The test branch is created based on the Develop branch. Bug fixes during the test are submitted in this branch. After the test is completed, the master branch is merged with the release/module_user_date name format
-
Hotfix branch: The emergency fix branch is created based on the master branch and used to fix emergent bugs and develop emergent requirements. After the hotfix branch is added to the master branch, the branch is named hotfix/module_user_date
Deployment way
-
Joint adjustment environment: Cloud effect pipeline click run to select remote branch deployment
-
Test environment: Cloud effect pipeline Click Run to select remote branch deployment
-
Pre-delivery environment: monitor the update of the master branch of the remote warehouse and automatically trigger the deployment
-
Production environment: monitor remote warehouse master branch update, and need cloud effect pipeline click to confirm deployment
-
Demo environment: monitor remote warehouse master branch update, and need cloud pipeline click to confirm deployment
The development process
Normal scheduling process
The development phase
Check the feature/module_user_date function branch from the Develop branch and merge the function branch into the Develop branch
To measure phase
Check the Release /module_user_date from the Develop branch. Test the branch. After submitting the code and updating the code, click Run on the cloud effect pipeline to select the branch to deploy the test environment
Pretest phase
Merge the release/module_user_date test merge into the Master branch automatically triggers deployment in the pre-delivery environment. Fix bugs. Check hotfix/module_user_date from the master branch Close back to the master branch after repair
Production phase
The version after acceptance is manually triggered by the cloud effect pipeline to deploy the production environment and demonstration environment. The master branch is merged into the development branch and the remote warehouse is deleted Feature /module_user_date, Release /module_user_date, and hotfix/module_user_date branches
END
Emergency requirements/emergency repair process
The development phase
Check out the hotfix/module_user_date emergency function branch from the master branch for development
To measure phase
Merge multiple hotfix/module_user_date branches into one hotfix/module_user_date branch. After the hotfix/module_user_date branch submits the code and updates the code, manually select the branch to deploy the test environment through the cloud effect pipeline
Pretest phase
Merge the hotfix/module_user_date test merge into the Master branch Automatically triggers deployment in the pre-delivery environment. Fix bugs. Check hotfix/module_user_date from the master branch Close back to the master branch after repair
Production phase
After acceptance, the production environment and demonstration environment deployment are manually triggered by the cloud effect pipeline. The Master branch is merged into the Development branch and the hotfix/module_user_date branch is deleted from the remote repository