-1

I am trying to set up a build definition in TFS 2013 which is triggered via CI watching a branches folder. It needs to determine which branches were involved in the checkin which triggered, then compile each and place in the drop folder.

UserStoryBranchesFolder

  • US1(branch)
  • US2(branch)
  • US3(branch)

CI observes UserStoryBranchesFolder and is triggered by a checkin on US1,US2,or US3 (this is working).

Now it needs to determine which branch is associated with the checkin, TFS supports multiple branches in a checkin so this could be 1,2 or 3 effected branches. (not working)

What hasn't worked:

TFS 2013 utilizes the new workflow XAML so I don't think < projectsToBuild> tags are supported, maybe they are and I don't know how.

Wildcard configurations, attempted SourceSettings -> SourceControlFolder = UserStoryBranches/*/mySolution.sln

With the USBranches being dynamically created I attempted to add a DummySolution.sln inside UserStoryBranchesFolder and pointed SourceControlFolder at that, which matches and works correctly, but I don't know how to make that build process template search through the directory, make decisions, and then build.

If I can get programmatic access: what is the most recently modified time of all branches, build all branches with that as their timestamp.

End Goal(open to alternative solutions): I would like to cut user story branches at the start of each sprint and have them deploy to a single IIS site as 1 app per branch without changing anything in TFS or in RM(release management). I am good once the builds are in the drop folder, if there is an alternative way to accomplishing this I am very open.

Shane
  • 129
  • 1
  • 8

2 Answers2

0

I never got to use User stories,so forgive my lack of knowledge ther . however Are you able to achieve a build of the user stories by publishing ? If so , a publish creates a publish profile . Once checked in it can be used by the build definition as a guide for the build process . You can also use csproj and not only sln as build item.can you create a head solution which contains all of the user stories and build that ?

I did not understand what exactly you dont seem to get working where is that tag (i do not have a pc in front of me) please post some screenshots

  • What I am attempting requires multiple .sln's, not csproj. So a changeset comes in and is associated with a branch, that branch will have a .sln inside of it and I need to build that specific .sln. So the ci watches /branches and there may be 3 branches inside /branches each with an independent version of mySolution.sln . So the navigation is /branches/us1/mySolution.sln vs /branches/us2/mySolution.sln, when the changeset comes in, it will be for us1 or us2 or maybe both. I need tfs to replace the * with the branch name in /branches/*/mySolution.sln – Shane Jan 25 '16 at 20:49
0

Keeping it simple , 1.do you want the user stories to be merged into one website in iis ? 2.is the latest build the one you want deployed ? 3.why do you care about the changeset ? In CI each check in triggers the build with the latest version.

  • The branches are dynamically created, so the ci is watching a folder which contains several branches, not one ci per branch. Unless there is a way to clone build templates on branch creation(no manual config)? If there are ten branches and a change set comes in that effected two of them, compile those two solutions. – Shane Jan 27 '16 at 04:04
  • I would not create a branch for each us, but a folder for each in a single branch and make tfs listen to that parent branch and build it all upon checkin . It might be possible to use web deploy feature of the publish profile to create iis website upon build . – boaz levinson Jan 28 '16 at 19:24