Azure-pipelines-tasks: Support for running tasks conditionally

Created on 11 Nov 2015  路  9Comments  路  Source: microsoft/azure-pipelines-tasks

I was wondering if any support is planned for running tasks in a build conditionally. For instance, run a particular task only for the release configuration, or run a task only for a particular branch. Currently I'm putting this logic into the tasks themselves, but it would be great if this was supported by the task runner somehow making it a bit more flexible.

Most helpful comment

Any updates on this? This would be extremely helpful right now. I could cut down on what get's copied for uploading which would save me about a gig of data transfer.

All 9 comments

We do have it on our backlog to condition tasks on trigger type (CI, scheduled).

:+1:

@bryanmacfarlane Do you plan to only condition on type of trigger (ci, scheduled) or also on trigger details like branch who triggered the build (would be really useful).
Or more general to run tasks conditionally on any condition with support for variable expanding. This would allow to set in a first step some variables and use them later as condition.

That's why I mentioned it - feedback welcome but we want to keep it reasonable :) Variables was the other one but it might be limited to exists or equals

If we could specify something like $(BuildConfiguration) equals "Release" on a task that would be extremely helpful.

OK - adding to our backlog for our service. (not a task issue)

Any updates on this? This would be extremely helpful right now. I could cut down on what get's copied for uploading which would save me about a gig of data transfer.

@bryanmacfarlane -- Is there another issue created that replaced this?

This was implemented in agent and service so tracked there

That said it's in production now in preview. You have to opt into new designer (user) and then enable conditional tasks ( account level ). Opt in from context menu on profile

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ThomasBarnekow picture ThomasBarnekow  路  3Comments

MikahB picture MikahB  路  3Comments

MichaelWhiteCodingForFun picture MichaelWhiteCodingForFun  路  3Comments

jabbera picture jabbera  路  3Comments

pharring picture pharring  路  3Comments