Technical team code Management and deployment

Source: Internet
Author: User

Mainstream companies use SVN and git as code versioning, and of course not excluding direct copy or FTP. The company has experienced the evolution of SVN to Git, and has also been deeply aware of different versioning services, making the technical team's collaboration more streamlined.

A brief introduction to the background, there is a project V5, from version V1 has evolved to now V5, visible history, want to switch from SVN to git, where the code management and on-line deployment migration, will be a long period of time instability, especially some development students on the new version management and deployment understanding is not thorough, It is easy to cause accidents.

The main development process in SVN
    • Develop classmate update skeleton code, submit code

    • Deploying a test environment

    • Check each version of the file to be launched, whether the submission of other students, if there is, first roll back to submit, or with the version number on the line, such as:

Common/request/base.phpcommon/config/db.php-r 182993909

Now the huge V5 code base is still the whole company students to master Update code, the development team is growing, this primitive way of development, so that all the students in a master branch of the cost of collaboration is increasing.

Where is the cost of the big?

Teamwork first is to make it easier for members to get updates from each other, so that each module can be completed together, and finally the test is tested. Members will add code to the version management, and the project is time-SPAN, if the short time of the project and the code of large projects mixed, small projects to go online need to peel off large projects, stripping whether the error first not to say, this time has affected another project. If you encounter a bug on the line, you need an emergency fix, you need to check out the online version, and finally merge with the other members, the workload is additional.

In addition, in the deployment of the heavy version check, will seriously delay the time of the line, code and acceptance took 5 minutes, on-line inspection and processing entrainment Other submissions took 5 minutes. This time cost is in front of an accident online, that directly affects your KPI.

Switch to GIT branch development

This is not the development process that we want. Migration to Git branch development is a matter of sooner or later, the first benefit is that the development of different projects is isolated from each other, the test regression can flexibly choose Feature Branch acceptance, and then merge to the trunk.

Branch and Tag

Branch: Master and Development. Where master corresponds to the current release branch, only the commit that comes from Master Cherrypick can be added to this branch. Development is the branch that is currently being developed, and all pull request should be sent to this branch. Some teams use Master as the backbone, and another online branch as a publishing branch with a different name.

tag: tag corresponding to each release version. Tag follow the name of Tag_[milestone]_ date, such as tag_m6_2015-08-12, if there is bugfix, then add lowercase letters, such as tag_m6_2015-08-12 after the tag_m6_2015-08-12a, and then the tag_m6_2015-08-12b.

Normal development process
    1. Development from master cut feature Branch

    2. After the self-test passes, submit the pull request to development (if it is a large project milestone, you can pull the request to the Milestone branch first, and notify the QA Deployment Feature branch regression

    3. Codereview Standard OK,QA Acceptance after the merge to development, if the Codereview or QA found a problem, in the feature branch correction and then deploy to the test environment, until there is no problem

    4. Merge acceptance through the Feature-fix to development

    5. Deploying Development Branch to test environment

    6. Test acceptance Pass, Merge Development branch to master, hit tag

    7. Launch simulation environment on-line, simulation environment acceptance

    8. Acceptance through, launch production environment on-line

    9. Leader audit on-line tasks, initiate students to deploy, production environment acceptance

Hotfix Process
    1. Development from Master cut hotfix Branch

    2. Merge ensures that all pull request to be released to master

    3. The back is consistent with the normal development process.

    4. Merge Master Branch to development

Major projects and hotfix development and on-line flowchart

650) this.width=650; "src=" Http://7xlpe9.com1.z0.glb.clouddn.com/git-deploy.png "style=" border:0px;vertical-align : middle;width:700px;margin:0px auto; "/>

If not the development cycle has two or three weeks of the project, the iteration speed, a day to go online several small functions, you can in the development of Feature branch, skip the Milestone branch directly merge to Development Branch, let QA acceptance hit tag. In addition, not every bug has a special release bugfix version of the necessary, for non-urgent bugs, can be in master fix after the release of the next version.

Currently trial tile force on-line system: Https://github.com/meolu/walle-web, the deployment of testing, simulation, production environment greatly reduce the cost of script on-line, development, test students can initiate deployment. Deployment Process Support

    • User identity Registration, login

    • Developer launches online Mission request

    • Managers review on-line tasks

    • Support multi-Project deployment

    • Quick rollback

    • Pre-deployment preparation tasks (pre-check)

    • Code check out post-processing tasks (such as vendor, environment configuration)

    • Synchronization to the target machine post-closing tasks (such as restarting)

    • Execute SQL Build (don't worry about forgetting the test environment for SQL synchronization)

    • On-line batch file fingerprint check

At present, the tree's home page, blog, Walden,, Wally himself has been assigned to Vali Li deployment on-line, welcome star, Fork trial, have any questions please feedback:)


This article is from the "Flower Tree" blog, please be sure to keep this source http://huamanshu.blog.51cto.com/2547676/1698089

Technical team code Management and deployment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.