开发者

How do you keep track of what you have released in production?

Tipically a deploy in production does not involve just a mere source code update (build) but requires a lot of other important tasks like, for example:

  1. Db scripts
  2. Configuration files (differents from test\production)
  3. Batch to schedule
  4. Executables to move to the correct path
  5. Etc. etc.

In our company we just send an email to a "Release email address" describing the tasks in order, which changeset need to be published (TFS), which SP need to be updated, db scripts and so on.

I believe there's not a magic tool that does these tasks开发者_如何学Python automagically in order, rollback included; but probably there's something better than email that helps to keep track of releases in production.

Do you have any tools to suggest or practices to share?


When multiple tasks are required to support a full project deployment (and that's frequently the case, in my experience), I'd suggest using a build/deployment tool. I've used Ant in the past with great success, but know others who swear by Capistrano, Maven and others.

Using Ant, I wrote a script that would:

  1. Pull the specific revision I wanted from my VCS
  2. Create a tarball of the target directory on the remote machine (in case a rollback was required)
  3. Create a MySQL dump file of the database (also for rollback purposes)
  4. Delete the remote directory and SSH the new content just pulled from the VCS
  5. Perform various other logistical operations (setting file perms, ownership, etc.)
  6. Create a release branch on the VCS itself
  7. Create a tag with the appropriate version information so I always had a snapshot of the code base at that moment of deployment.

Hope that helps some. I've written a few blog posts about this that may (or may not) be useful. They're dated now, but the general information should still be solid enough.

  • Introductory thoughts
  • Details of how I use Ant for deploying--including scripts


You might be interested in the Team Foundation Build Recipes Website, that showcases some build scripts developed using SDC Tasks Library and the MSBuildTasks library


How about something like SVN? You can put all of your code in a repository, then when you are ready to release from production bring your stuff over from test. Then you'll have very specific revisions with information on what happened. SVN keeps track of all of it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜