Is there a way in TFS 2015 to have two builds such that the second build gets triggered whenever the first one finishes (successfully)? There are solutions for the old XAML based build system, but nothing for the new script-based system, which is what I'm using.
相关问题
- Getting error: File extension specified '.webt
- Using TFS command line tf.exe how can I copy a rep
- TFS Power tools Migrate doesn't actually migra
- What is the difference between tfpt scorch and tfp
- TFS 2017 Agent: and error occured while sending th
相关文章
- Is it possible to do a “destroy history” in TFS?
- How do I make a TeamCity build appear in the TFS B
- TFS vs. JIRA/Bamboo/SVN [closed]
- Why doesn't my .tfignore file ignore my packag
- Is it possible to create a docker container from T
- How to Move TFS 2010 Build Definition between Proj
- How to fix TF246017 The Team foundation server cou
- How to open TFS Power Tools - Alerts Explorer
This question pops up every now and then. The official docs literally say "not yet" (see the last Q&A entry). There's also an ancient suggestion on UserVoice, which is in the Planned state since March this year. That's quite promising and lets me hope this will be implemented in vNext build system the first thing.
I achieved the "chaining" of builds by creating a custom BuildTask which basically just makes the appropriate calls to the TFS REST Api. It allows me then to define a build definition (by name) that I want to trigger and on top add some conditions (for example check if there is a build of this definition already queued or check if the last build of a certain definition was successful).
If there is any interest, I uploaded the source code to github.
Using tfx you can upload the task to your TFS see details here
In short just grab the files from github, install tfx via node and run
After this you can select the Trigger new Build Task and configure it:
Hope this may help some people that try to achieve the same thing.
Edit
I packaged the task and published it on the Marketplace, so it makes it easy to use the task in your environment:
Trigger Build Task
This answer only applies if:
If this is the case, then you can "chain-build" by cheating (it works for me):
To get you started, see a sample script below. This particular script only works with submodules that are "nested" inside each other - matreshka-style - in the file system. Otherwise, there will need to be a custom script for each submodule.
Please note that it includes a few work-arounds for some problems I've encountered with getting it to do what I needed it to do (i.e. clone/init submodules on my machine locally before pushing the changes to the server, then doing the tidying-up of the files).
Let me know if more comments are required.