Azure custom task visibleRule definition error

239 views Asked by At

When trying to update a custom task's version I get this error:

Task definition visible rule 'serviceType = A || serviceType = B || ((serviceType = C || serviceType = D) && deploymentMode = Docker)' is invalid. It should be of format "A <validconditionhere> B"

What is the correct syntax for the visible rule to make the equivalent condition above?

1

There are 1 answers

0
Dou Xu-MSFT On BEST ANSWER

From looking at task samples,I am afraid that you can not use ( ...).It looks like expression conditions are somewhat limited.

I suggest to try the following based on these samples to avoid using () and see if this work for you.

"visibleRule": "serviceType = A || serviceType = B || serviceType = C && deploymentMode = Docker || serviceType = D && deploymentMode = Docker"