What is your favorite web app deployment workflow

2019-03-08 16:21发布

We are currently using a somewhat complicated deployment setup that involves a remote SVN server, 3 SVN branches for DEV, STAGE, and PROD, promoting code between them through patches, etc. I wonder what do you use for deployment in a small dev team situation?

11条回答
劳资没心,怎么记你
2楼-- · 2019-03-08 16:46

When i worked in a small dev team (small meaning me, another programmer and the boss), it was quite the chaotic mess. However we found that Assigning a "gatekeeper" type of process worked for us.

The gatekeeper was the person who had done the most work on the app (in this case, i had 2 projects i developed from the ground up, he had like 4).

Basically, whenever he had to work on my projects, he'd notify me that he was doing work, i'd make sure the repository was up-to-date and buildable, then he would pull down, make his changes, then commit. He would inform me that it was done, i would pull down, build and deploy. If there were DB changes we had a DB Change folder with all the scripts that would correct the DB.

It's obviously got a lot of holes in it, but the process worked for us, and kept us from building over each other.

查看更多
走好不送
3楼-- · 2019-03-08 16:50

I personally work locally (development), adding/fixing features and when I think it's ready I commit to trunk (production). On production server I just do an svn update.

查看更多
The star\"
4楼-- · 2019-03-08 16:53

trunk for development, and a branch (production) for the production stuff.

On my local machine, I have a VirtualHost that points to the trunk branch, to test my changes.

Any commit to trunk triggers a commit hook that does an svn export and sync to the online server's dev URL - so if the site is stackoverflow.com then this hook automatically updates dev.stackoverflow.com

Then I use svnmerge to merge selected patches from trunk to production in my local checkouts. I have a VirtualHost again on my local machine pointing to the production branch.

When I commit the merged changes to the production branch, again an SVN export hook updates the production (live) export and the site is live!

查看更多
劳资没心,怎么记你
5楼-- · 2019-03-08 16:55

A simple trunk branch contains the most current code, then cut a branch whenever we go live. This seems to work pretty effectively. You can easily go to the previous branch whenever the current branch that you cut for the live system fails. Also, it is easy to fix bugs on the branch that is currently live, and since the branch effectively dies when you cut a new one, there is only ever 1 real branch you need to work on (and then merge fixes from there to the live branch).

查看更多
来,给爷笑一个
6楼-- · 2019-03-08 16:56

We use release branching - this seems to be more efficient for us than the feature branching we were doing.

Don't make different branches for the different environments.

查看更多
登录 后发表回答