Here is what I am trying to do: I have my code sitting on Bitbucket (it is a ASP.net web application). I want to put together a build machine that has a web-based dashboard. I go to the dashboard and I say: Ok show me all the branches and stuff on my Bitbucket project. Now please get the latest code from this branch for me and build it. Then please deploy it to this location for me or maybe this other location. I want this dashboard give me a history of all this builds and deployments too. I am very new to this concept I have been reading about CC.net and MSBuild and other stuff but I can not find the right answer. Please put me in the right direction.
1 Answers
The point of a build server is that it automatically runs a build each time you commit something to your repository.
In order for the build server to know exactly what to do, you normally put a build script (with MSBuild or NAnt) into your solution which does everything you want - building your solution, maybe create a setup package and so on.
The build server basically knows where the repository is and where in the repository your build script is.
You need to configure this once in the build server, and then it will always run after you commit (but you can also start a build manually, if you want).
If you want a solution with web-based dashboard, try TeamCity.
It's a commercial product, but it's free for up to 20 users.
You can do everything in the web interface - configuration, running the builds AND browsing the build history.
EDIT:
Houda, concerning your question about deployment:
I don't think that TeamCity has a "deployment mode" in that sense. What you could do is include the deployment stuff in your build script that is run by TeamCity.
So, after the build itself is finished, copy the generated assemblies and files on your web server(s).
If you do it this way, you HAVE to make sure in the build script that the deployment will only happen if the build didn't fail (and if you have unit tests, if the unit tests didn't fail as well).
This is very important for a live application, because if you don't take care of this well enough, your app will go immediately offline every time someone commits "bad" code to your repository (and it will stay offline until the next "good" commit)!!
EDIT 2:
See Lasse V. Karlsen's comment below: it's more comfortable with the new TeamCity version 6.

- 35,843
- 15
- 128
- 182
-
+1 for TeamCity. Apart from the "show me all the branches and stuff on my Bitbucket project", TeamCity will do everything here. – Lasse V. Karlsen Feb 22 '11 at 10:23
-
Well, you can at least see the last five (I think it was five?) days with your changes. But I think the OP actually doesn't need "show me all branches", because he wrote something about selecting a branch and telling the server "now build this". But the point is that the build server can simply build **everything** on every commit, so IMO no need to select a branch to build. – Christian Specht Feb 22 '11 at 11:34
-
How do I do the deployment with TeamCity? – Houda Feb 24 '11 at 01:20
-
1TeamCity 6 has support for multiple steps to be run for each build configuration. The first step might be to build and run unit-tests, the second might be to copy the files to the deployment location, whatever that might be. If you can run a deployment action from the command line, you can do it from TeamCity. – Lasse V. Karlsen Mar 12 '11 at 21:05
-
Great, I didn't know this (still using TeamCity 5.0.2, no time to take a look at newer versions yet) – Christian Specht Mar 12 '11 at 21:19
-
Later versions of TeamCity have greatly improved Git support, so it will now show you the branching/etc as originally requested by the OP ~3 years ago! – keithl8041 Mar 04 '14 at 16:43