Plugin Integration Question

Post your questions regarding using the Vault and Fortress API in your programs.

Moderator: SourceGear

Post Reply
cborrowman
Posts: 2
Joined: Wed Sep 16, 2009 6:47 am

Plugin Integration Question

Post by cborrowman » Wed Sep 16, 2009 6:58 am

I am trying to integrate Vault 4.1.4 with TeamCity 4.5. I am ok with a minimal integration, just being able to detect source changes, launch a new build and be able to get latest from Vault. I've got the "get latest" working with the command line utility from inside TeamCity. I'm looking at using the Plugin sample here to perform the notify function against TeamCity, which would launch a new build: http://support.sourcegear.com/viewtopic.php?f=31&t=9628 and have it almost working, I think I just have a few references incorrect.

My question is, is this the best route to take to perform the notify? I can notify TeamCity by doing a GET against a specific URL so my plan is to do this from within the plugin event. I was just wondering if there might be something built in that might be able to make a HTTP GET request against a URL or possibly launch an executable or batch file. Thanks.

Colin

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Re: Plugin Integration Question

Post by jeremy_sg » Thu Sep 17, 2009 7:58 am

You would need to use the .Net utilities for performing an HTTP request or starting a process.

Sending an HTTP request:

http://www.csharp-station.com/HowTo/HttpWebFetch.aspx

Starting a process:

http://www.csharp-station.com/HowTo/ProcessStart.aspx

I hope that this helps!
Subscribe to the Fortress/Vault blog

cborrowman
Posts: 2
Joined: Wed Sep 16, 2009 6:47 am

Re: Plugin Integration Question

Post by cborrowman » Thu Sep 17, 2009 11:54 am

Thanks for the reply, sorry I wasn't clear in the request. I was wondering if there was anything already built in to the Vault service that could make a request to a URL or launch a process when a commit occurs. Sort of like a generic plug-in mechanism.

I know I could do just about anything in the plug-in code such as making a GET request or launching a proces, as you've shown. I was just wondering if I should continue trying to make the plug-in work or if there was another way. The difficulty I am hitting is the server with the Vault service doesn't have any development tools on it, so its a bit of a hit and miss process. Thanks.

Colin

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Re: Plugin Integration Question

Post by jeremy_sg » Thu Sep 17, 2009 12:41 pm

I see. The answer to your question is no. There's no built-in easy way for the server to do those things. Honestly, if I needed that sort of thing, I would install CruiseControl.Net, have it watch the Vault server, then set its build task to be the operation that I wanted to do. I understand, of course if that's not appealing to you.
Subscribe to the Fortress/Vault blog

Post Reply