3

I have visual studio solution with 2 web projects. The source is in VSTS and the apps are hosted in Azure. I have build and release management setup to automatically deploy to Azure.

So every time I check in something, 2 releases are triggered, one for each web project. Is there any way I can separate the two? The web project should only trigger for a check in on that folder and the api trigger for a check in on that folder?

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120
BeesNees
  • 191
  • 2
  • 3
  • 13
  • What does your folder structure look like? What do your CI triggers look like? – Daniel Mann Mar 19 '17 at 06:04
  • I have both web projects under the solution folder. CI triggers is on the main solution folder. It generates 2 zip files one for each web project. But that means for a single change both web projects are deployed. What I want is to have 2 build and release definitions and only deploy when a check in happens on that project. – BeesNees Mar 20 '17 at 07:13

1 Answers1

2

You just need to change Path filters for specific path of each web project path. More information, you can refer to Build definition triggers.

starian chen-MSFT
  • 33,174
  • 2
  • 29
  • 53
  • What I tried was to create a build definition per project. In each project's repository tab I cloak the folder for the other project. But I was getting no output. I guess what you are saying is to instead add an exclude path in the triggers tab? – BeesNees Mar 22 '17 at 13:45
  • @BeesNees Yes I mean triggers tab. Regarding no output issue, you can add MSBuild arguments: /p:OutputPath=”bin\$(BuildConfiguration); More information, you can check this thread: http://stackoverflow.com/questions/42897988/build-separately-a-web-app-backend-in-a-xamarin-solution-using-vsts – starian chen-MSFT Mar 23 '17 at 01:28
  • I will try adding the additional trigger. The no output issue is only when I cloak the 2nd project. Otherwise I get the zip file output. – BeesNees Mar 23 '17 at 06:08
  • @BeesNees The trigger is used for CI build (changes trigger build), you still need to have two build definitions and change trigger for each web project. You can cloak a project or just map the target project to build agent. Regarding release, change artifact to link to corresponding build definition. – starian chen-MSFT Mar 23 '17 at 06:42