AJN
AJN

Reputation: 347

Triggering a build from another build(conditional) in TFS 2015

I have created two build definition for two different builds in TFS 2015.

Ex - Build1 and Build2

Both the are getting executed without an error. What I want to perform is, I want to provide an argument in build one

ex=Build2=True or False.

If the argument Build2=True after build definition Build1 successfully executed the build definition Build2 should get triggered.

And if Build2=False the build process should finish after execution of Build1.

I am able to do this in Jenkins by adding the Build2 to pipeline in postbuild tasks, since I am new in TFS 2015 so can anybody help me to accomplish this in TFS 2015

Upvotes: 3

Views: 4963

Answers (3)

chazing
chazing

Reputation: 1

Another option is to create Task Group for each build.

you can read about Task Groups here

and create one build that use some task group in his steps.

Upvotes: -1

huserben
huserben

Reputation: 1096

I created a Build Task that should allow to support your described scenario. It uses the TFS REST API to queue new builds and supports conditions, for example a check if the last build of a specified build definition was successful or not.

You can download it from the Marketplace

Upvotes: 3

Cece Dong - MSFT
Cece Dong - MSFT

Reputation: 31075

As @Yan Sklyarenko mentioned, this feature is not supported right now, please vote the User Voice at website below:

https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/2165043-provide-build-configuration-dependencies-in-tfs-bu

Upvotes: 4

Related Questions