Jenkins with Visual Studio Team Services

Last Update: 4/28/2017

If you use Jenkins to build your apps, you can store your code in Visual Studio Team Services and continue to use Jenkins for your continuous integration builds. You can trigger a Jenkins build when you push code to your team project's Git repository or when you check code in to Team Foundation version control.

Configure Jenkins

  1. If you haven't already, set up a Jenkins server.

  2. If you're setting up Jenkins on-premises, enable HTTPS.

Set up a Jenkins build

  1. In Jenkins, create a new item.

    New item link in Jenkins

  2. Create the type of build that's appropriate for your project.

    Build name and type in Jenkins

  3. Set the URL for your Git repository in Visual Studio Team Services. The URL is in the form https://{Team Services account}{team project}.

    Source code management settings with Git selected

Trigger Jenkins from Visual Studio Team Services

  1. If you haven't already, enable alternate credentials in your Visual Studio Team Services profile. Be sure to set a secondary user name because you won't be able to use your email account to connect Visual Studio Team Services to Jenkins.

    Profile, credentials tab, alternative credentials enabled with a secondary user name

  2. Go to your team project's administration page.

    Team project administraton icon

  3. On the Service Hooks tab, create a subscription.

    Service hooks page, add

  4. Add Jenkins.

    Select target service dialog box, Jenkins selected

  5. Pick the event from Visual Studio Team Services that you want to trigger a Jenkins build.

    Configure event dialog box

  6. Configure the action to take in Jenkins.

    New service hook subscription dialog box

Now, when that event occurs in Visual Studio Team Services, your Jenkins build will be triggered.


Visual Studio Team Services doesn't charge for the framework for integrating with external services. Check out the specific service's site for pricing related to their services.

Q & A

Q: Can I build part of my app in Visual Studio Team Services and part in Jenkins?

A: Yes. You can trigger a Jenkins build when your Visual Studio Team Services build is completed so that you use both systems to build your app.

Q: Can I programmatically create subscriptions?

A: Yes, use REST APIs.