The system release is generally divided into two stages: preparation stage and execution stage
Preparation phase: clean up database scripts, clean up source code (branch, tag) and make production packages, all of which can be done before release execution
Execution phase: update database, execute application release script
Preparation Phase
1. Organize the database update script
2. Prepare the application release source code
a. Separate a branch from trunk
执行命令: mvn release:branch -DbranchName=1.1.x -DupdateBranchVersions=true -DupdateWorkingCopyVersions=false 建立branch
Among them, 1.1.x is the version number of the branch, and the snapshot version number of this version needs to be entered during the running process , such as: 1.1.x-SNAPSHOT
b. Hit a tag from the branch
Execute the command: mvn release:prepare -Darguments='-Dmaven.test.skip=true'
The intermediate system will prompt you to enter the version to be released and the version number of the SNAPSHOT of the next release version
c. Clear temporary files
Execute the command: mvn release:clean
This is to clear the temporary files left over from the previous command
3. Prepare the application release package
Note: The package released in the production environment is compiled on the UAT server
uat ip: xxxxxx Login user: root
Log in to the uat environment, update the svn tag source code, and package
i. Execute the command: cd /Data/source/productionRelease/source
ii. Execute the command: svn sw xxxx/htky-xxx xxx is the version number to be released
iii. Execute the command: svn status to confirm that there are no file conflicts
iv. Execute the command: cd /Data/source/productionRelease/script
v. Execute the command: ./build_app1.sh This step creates a production package for app1, copies the package to the production environment app1, and runs scheduled tasks on this node
vi. After step v is completed, execute the command: ./build_app2.sh This step creates a production package for app2, and copies the package to the production environment app2, and does not run scheduled tasks on this node
release stage
1. Update the database
2. Release the production application
landing on the fortress machine,
APP1:(ip:)
i. Execute the command: cd /Data/script
ii. Execute the command: ./deploy.sh
APP2:(ip:)
i. Execute the command: cd /Data/script
ii. Execute the command: ./deploy.sh
APP3:(ip:)
i. Execute the command: cd /Data/script
ii. Execute the command: ./deploy.sh
APP4 ((ip :)
i. Execute the command: cd /Data/script
ii. Execute the command: ./deploy.sh
APP5:(ip:)
i. Execute the command: cd /Data/script
ii. Execute the command: ./deploy.sh