How to skip or complete tasks / steps conditionally using a TFS build?

I have a TFS build definition.

enter image description here

I want to perform two steps / task that are performed by two commands, conditionally. Maybe with a variable that I could set when I queued up for the assembly or something like that. Basically I want to start the build and skip some steps / tasks if I want. How can i achieve this? Except for creating a bat file that runs my app.exe and sending a boolean variable to a bat script that will execute or not use app.exe.

+5
source share
1 answer

Update 2017/04/19

You can specify the conditions for running the task in VSTS.

To use this feature, you must enable both the New Build Editor and the Task Condition Parameters for your account.


This is not yet possible. In UserVoice there was a < function request and got a response START :

Allow forced inclusion of vNext / preview tasks or disabled.

We started work on this feature, and it will be available on both the build and build teams.

The service group team (product group, Microsoft Visual Studio) responded ยท August 23, 2016

As a workaround, you can manually disable the build task (left-click on the build job and select Disable selected tasks ), as shown in the screenshot: enter image description here

+6
source

Source: https://habr.com/ru/post/1260443/


All Articles