Reputation: 719
we are running TFS 2015 Update 3 on premise.
We have a build definition that picks up the latest successful drop from the Gated checkin build to run tests. For theses tests we also need the source code of the same checkin. If we queue a new build it will get the latest sources, but its possible that these sources are of a different changeset than the last successful drop. Mainly because it can take about 2 minutes before the sources are pulled, if by then a new gated checkin has been completed, the task after the get will get a newer version of the drop than the sources that have been pulled.
Is there a way we can have the build run a script first, say the script that looks for the latest successful build. Then use the changeset number from that build to do the Get Sources of that specific changeset?
Upvotes: 0
Views: 158
Reputation: 30432
We can not prevent the Get source step getting the latest sources, we can only add a Command Line/Batch script or PowerShell step to run script to get the specific changeset version sources. Then copy the specific source to build.
In you scenario, I think it doesn't make sense, as mentioned above, we cannot make sure the changeset number with the latest successful build is the exact changeset your want to get.
Seems the only way is build manually, specific the changeset to build.
Upvotes: 0