I'm currently investigating alternatives to VSS for my company and have boiled down the choice to either Vault or Subversion.
I need to be able to trigger tasks on check-in/check-out of source code (of specific projects, not necessarily globally). Is this possible with Vault?
It must be possible to reject check-ins if they e.g. break the repository or violate code standards, as determined by the tools being run.
I'm also set on using NAnt for building. Does NAnt support Vault?
Thanks in advance for your help!
Yours,
Morten
NAnt, NUnit and Vault
Moderator: SourceGear
Not with the current version, although we've discussed adding the triggering of events in a future release.I need to be able to trigger tasks on check-in/check-out of source code (of specific projects, not necessarily globally). Is this possible with Vault?
We have discussed allowing the rejection of any transaction, but to be quite honest we haven't made a final decision on how this would be handled.It must be possible to reject check-ins if they e.g. break the repository or violate code standards, as determined by the tools being run.
Two Vault users, Wayne Allen and Brian Schkerke, have created a NAnt Vault task project.I'm also set on using NAnt for building. Does NAnt support Vault?
If you have a 2.0 Vault client http://www.sourcegear.com/vault/downloa ... _2_0_1.msi,
you can connect to the build_tool_integration repository at vaultpub.sourcegear.com. login as guest/guest.
HTH
Jeff Clausius
SourceGear
SourceGear
NAnt, NUnit, Vault, etc.
I'm very interested in this discussion of automated builds, unit tests, and rejecting transactions. I'm beginning to do a bit of experimenting along these lines myself, and am very interested to see what future versions of the Vault hold in store.
First, I should say that although the NAnt/Vault integration that Brian (et al) did looks great, I found NAnt to be a pain in the ass to work with, and gladly shelled out a few bucks for a commercial, GUI-based product, FinalBuilder, which also has Vault integration. The amount of time I saved paid for the license in the first week, but your mileage may vary.
Now: I am currently working (slowly) toward a 2-line philosophy, but I have yet to figure out if this is best implemented by labelling, branching, or some combination of the two.
I'd like to have a my developers check in code to a development line, and have the source built automatically each night. The (BVT) build process would build the code, run the unit tests, run FxCop, and report the results. If the code passes all the tests, doesn't break the build, and has no FxCop violations, I'd like to forward the code (somewhere undetermined) for a final code review. If this passes, I want the code checked in to the Production line.
Meanwhile, I'll have a separate build process happening nightly on the Production line, and somehow arrange for all hell to break loose if the unit tests fail or the build breaks, etc. Maybe a direct tie to the payroll system to automatically deduct wages would be appropriate, I don't know.
Now, from reading around, I can see that I am not the only one thinking along these lines-- most of the ideas here are found in the SCM Patterns book recommended by Eric, in the MSF documents, and many other places.
My question is: how to best configure Vault to support this style of development? As I said, we're playing around with the Label and Branch options, but have yet to come up with a set of best practices.
Personally, I tend to see the problem as one of a two-phase commit, but perhaps that is my database experience affecting my judgment.
How do others handle these topics?
First, I should say that although the NAnt/Vault integration that Brian (et al) did looks great, I found NAnt to be a pain in the ass to work with, and gladly shelled out a few bucks for a commercial, GUI-based product, FinalBuilder, which also has Vault integration. The amount of time I saved paid for the license in the first week, but your mileage may vary.
Now: I am currently working (slowly) toward a 2-line philosophy, but I have yet to figure out if this is best implemented by labelling, branching, or some combination of the two.
I'd like to have a my developers check in code to a development line, and have the source built automatically each night. The (BVT) build process would build the code, run the unit tests, run FxCop, and report the results. If the code passes all the tests, doesn't break the build, and has no FxCop violations, I'd like to forward the code (somewhere undetermined) for a final code review. If this passes, I want the code checked in to the Production line.
Meanwhile, I'll have a separate build process happening nightly on the Production line, and somehow arrange for all hell to break loose if the unit tests fail or the build breaks, etc. Maybe a direct tie to the payroll system to automatically deduct wages would be appropriate, I don't know.
Now, from reading around, I can see that I am not the only one thinking along these lines-- most of the ideas here are found in the SCM Patterns book recommended by Eric, in the MSF documents, and many other places.
My question is: how to best configure Vault to support this style of development? As I said, we're playing around with the Label and Branch options, but have yet to come up with a set of best practices.
Personally, I tend to see the problem as one of a two-phase commit, but perhaps that is my database experience affecting my judgment.
How do others handle these topics?
NAnt, NUnit and Vault
I was planning to use something like either CruiseControl (http://ccnet.thoughtworks.com/) or BuildBot (http://buildbot.sourceforge.net/ and webshot http://twistedmatrix.com/buildbot/) to monitor the repository.
However, these tools either require that Vault provides the hooks for triggering actions or "native" monitoring support from the 3rd party apps mentioned above. Without this I'm convinced that Subversion will be a better choice (since it has both), despite it's lack of a decent graphical client.
If hooks are "in planning" within what kind of time frame can I expect to see a release supporting it?
However, these tools either require that Vault provides the hooks for triggering actions or "native" monitoring support from the 3rd party apps mentioned above. Without this I'm convinced that Subversion will be a better choice (since it has both), despite it's lack of a decent graphical client.
If hooks are "in planning" within what kind of time frame can I expect to see a release supporting it?
NAnt and Vault 2.0
We have recently moved to Vault 2.0, and I have been meaning to script much of our release / build process. Having used Ant at a previous employer, I was excited to see that NAnt offered much of the same functionality. However, I am running into some serious problems getting NAnt to work with the tasks available in the Vault . Perhaps some of my problems stem from a lack of experience with NAnt, but I have "googled" for a solution (finding only references on how to obtain the tasks). I will outline my steps so far in the hopes that someone can shed light on how to make this code work and at least have an unofficial cookbook for setting up NAnt / Vault.
(1) Downloaded and installed the Vault 2.0.1 client from
http://www.sourcegear.com/vault/downloa ... _2_0_1.msi
(2) Retrieved the Vault / NAnt build tasks as explained here:
http://weblogs.asp.net/wallen/archive/2 ... 27130.aspx
(3) Copied the Vault tasks to ./src/Vault inside the NAnt build directory
(4) Edited the NAnt.build file in the root NAnt directory to copy the Vault .DLLs (VaultClientNetLib.dll, VaultClientOperationsLib.dll, VaultClientUILib.dll, and VaultLib.dll) from the Vault Application directory to "${build.dir}/bin"
(5) Added "Vault" to the comma delimited "tas.win32" property, so that it is included in the build target.
(6) Created a simple build document (copied and extended from the NAnt.Zip.build), removed the include reference to the "./CommonAssemblyInfo.cs", and added the Vault DLLs copied above to the "references" section.
With all this accomplished, I dropped back into the root NAnt directory and ran "nant" (implying the default target). The output was as follows:
[nant] C:\var\nant\src\Vault\Vault.build build
Buildfile: file:///C:/var/nant/src/Vault/Vault.build
Target(s) specified: build
build:
[csc] Compiling 17 files to C:\var\nant/build/net-1.1.win32/nant-0.84-debug/bin/VaultTasks.dll.
c:\var\nant\src\Vault\VaultBase.cs(50,1): error CS1587:
XML comment is not placed on a valid language element
c:\var\nant\src\Vault\VaultLabel.cs(2,1): error CS1587:
XML comment is not placed on a valid language element
BUILD FAILED
C:\var\nant\src\Vault\Vault.build(11,10):
External Program Failed:
C:\WINNT\Microsoft.NET\Framework\v1.1.4322\csc.exe (return code was 1)
Has anyone outlined a quick and dirty guide to using the NAnt tasks? Or, does anyone have a pre-compiled binary they could post? The lack of documentation is frustrating.
I would hate to have to go down the manual access path outlined at:
http://weblogs.asp.net/jcogley/archive/ ... 79169.aspx
(1) Downloaded and installed the Vault 2.0.1 client from
http://www.sourcegear.com/vault/downloa ... _2_0_1.msi
(2) Retrieved the Vault / NAnt build tasks as explained here:
http://weblogs.asp.net/wallen/archive/2 ... 27130.aspx
(3) Copied the Vault tasks to ./src/Vault inside the NAnt build directory
(4) Edited the NAnt.build file in the root NAnt directory to copy the Vault .DLLs (VaultClientNetLib.dll, VaultClientOperationsLib.dll, VaultClientUILib.dll, and VaultLib.dll) from the Vault Application directory to "${build.dir}/bin"
(5) Added "Vault" to the comma delimited "tas.win32" property, so that it is included in the build target.
(6) Created a simple build document (copied and extended from the NAnt.Zip.build), removed the include reference to the "./CommonAssemblyInfo.cs", and added the Vault DLLs copied above to the "references" section.
With all this accomplished, I dropped back into the root NAnt directory and ran "nant" (implying the default target). The output was as follows:
[nant] C:\var\nant\src\Vault\Vault.build build
Buildfile: file:///C:/var/nant/src/Vault/Vault.build
Target(s) specified: build
build:
[csc] Compiling 17 files to C:\var\nant/build/net-1.1.win32/nant-0.84-debug/bin/VaultTasks.dll.
c:\var\nant\src\Vault\VaultBase.cs(50,1): error CS1587:
XML comment is not placed on a valid language element
c:\var\nant\src\Vault\VaultLabel.cs(2,1): error CS1587:
XML comment is not placed on a valid language element
BUILD FAILED
C:\var\nant\src\Vault\Vault.build(11,10):
External Program Failed:
C:\WINNT\Microsoft.NET\Framework\v1.1.4322\csc.exe (return code was 1)
Has anyone outlined a quick and dirty guide to using the NAnt tasks? Or, does anyone have a pre-compiled binary they could post? The lack of documentation is frustrating.
I would hate to have to go down the manual access path outlined at:
http://weblogs.asp.net/jcogley/archive/ ... 79169.aspx