Development workflow for small team

倖福魔咒の 提交于 2020-01-05 04:11:31

问题


So, I'm working in a small event/entertainment company and have recently taken over responsibility for the development team (PHP applications, most of the time). The current workflow looks kind of like this:

  • For every project there is a development and a production server. There are no local development environments , meaning every developer has got SSH access and does the changes directly on the dev server.
  • There is no source control or whatsoever.
  • Most of the time, each member of the team works on a project on his own. Multiple developers working on the same project is rare.
  • Updating the production server means transfering the source from the dev to the production server using SFTP.

I find this rather horrible, so I came up with this idea:

  • There will be one central development server hosting all available projects, this server will be using Mercurial for source control.
  • The developers have to set up a local dev environment and use a local repository for each project. Changes can be pulled/pushed from/to the central repository on the dev server.
  • If a new version of a project has to be rolled out, the developer can just clone the repository to the production server.

Is there anything completely wrong with this kind of workflow? I've used Mercurial for my own projects, but I've never used it in a team before and I'm new to all this team-managing-stuff too. I'd appreciate some suggestions.

Thanks, Chris


回答1:


It makes a lot of sense to have your developers work locally. The biggest advantage of PHP is the short feedback cycle, and if they have to push potentially broken stuff onto a shared development box, then that breaks the short feedback cycle. You may be able to use something like Vagrant to make environment setup easier for the developers on their development machines.

As far as the rest of it: I would split your development/test server off from your central repository. The reason being as you work on your project it's likely that you guys will begin to use branches for different release versions. It's likely that there will be a "Stable"/Currently released branch of your project and a "Feature" branch (New stuff you're working on). Releasing directly to the development server doesn't really make sense for even a basic branched workflow like I'm suggesting.

The other big issue I see here is all of your developers can do releases to the production server. Typically, even in smaller organizations there's a designated person and designated criteria prior to releasing to the production server. I would recommend you do this. Also prior to releasing you guys should ALWAYS tag the version you're releasing. That should be part of your release workflow.

The other thing you're not mentioning is issue tracking. As far as I'm concerned JIRA is the gold standard for issue tracking software. We like to use JIRA and Fisheye to manage our code and coordinate commits with specific issues.




回答2:


Here's the workflow that I've been working with for a couple of years...

Multiple Production Servers, 1 x Project (Test) Server, Git (Bitbucket), Jenkins, JIRA (Issue Tracking), HipChat (Team Chat) 1 x Master Git Branch, 1 x Project Git Branch

  • New Ticket Raised (on JRIA)
  • Checkout a new local branch from the master branch
  • Do the work
  • Submit the branch for a pull request (post a link to the pull request in a team chat so other devs are aware if the PR) & make any changes required
  • Once approved, merged my local branch into the project branch
  • Use Jenkins to clone the project git repo, run tests & deploy to the project server
  • Application Tester tests all the things
  • Ticket is passed
  • Merged my local branch into the master branch and push
  • Again, use Jenkins to clone the master branch and run tests
  • Manually ask Jenkins to dpeloy the master branch to the production server

I mentioned Jenkins above, this maybe abit too far ahead for a dev team looking to implement a new process, for now I'd suggest something more basic, such as FTPloy, there's a pretty good guide to setting it up here: https://daveismyname.com/website-deployment-with-bitbucket-and-ftploy-bp



来源:https://stackoverflow.com/questions/36577262/development-workflow-for-small-team

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!