Search code examples
svnazure-devopsazure-pipelinespost-commit-hookazure-devops-rest-api

Is there a way to queue a VSTS build with SVN post commit hook?


Is there a way to trigger/queue a build on VSTS using an SVN post-commit-hook? Our svn repository is behind a firewall so isn't visible to VSTS for the built in polling it offers. But I want to be able to queue builds after changes to trunk. Is this possible?


Solution

  • You can use the REST API of Visual Studio Team Services to queue a build. That should be doable from a hook or something polling the SubVersion server locally.

    POST https://{accountName}.visualstudio.com/{project}/_apis/build/builds
         ?ignoreWarnings={ignoreWarnings}&checkInTicket={checkInTicket}&api-version=4.1