Azure custom task visibleRule definition error
Asked Answered
A

1

0

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?

Appalling answered 12/11, 2023 at 9:37 Comment(3)
Don't think it supports ( ... )Therein
@Therein Then how can I have an equivalent condition to what I wrote in the question?Appalling
Not sure you can, you may have to change your approach.Therein
C
1

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"
Chow answered 13/11, 2023 at 8:27 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.