Task condition doesn't accept an expression
See original GitHub issueThis is valid Pipelines YAML:
steps:
- task: UsePythonVersion@0
condition: eq(variables.pypy, false)
But 143.0 gives red squigglies on the eq()
part. One of the confusing features of Pipelines YAML is that condition
fields can accept expressions that aren’t wrapped in $[]
or ${{}}
.
Since we don’t have syntax highlighting for expressions yet, the best we can do is accept a string for now.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Azure DevOps Pipeline Task Condition expands runtime ...
I have a group variable SHOULD_CONTINUE_NEXT_TASK which defines a runtime expression (see below). The variable is then used in a task as custom ......
Read more >Expressions - Azure Pipelines | Microsoft Learn
Expressions are used to define conditions for a step, job, or stage steps: - task: ... condition: <expression>.
Read more >SSIS Expression Tasks vs Evaluating variables as expressions
This article explores the similarities and differences between SSIS Expression Task and Evaluate variable as Expression in SQL Server ...
Read more >Workflows Overview | Twilio
"expression" - a SQL-like conditional used for additional control to route Tasks. ... or the Task doesn't match a subsequent filter, then the...
Read more >3 Operators, Functions, Expressions, Conditions
Oracle does not accept all forms of expressions in all parts of all SQL commands. You must use appropriate expression notation whenever expr...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think I’ve run into this as well but not 100% sure so let me know if you want me to log a seperate issue.
I installed the extension and it told me my yaml was invalid because of an unexpected property
jobs
at the root levelIf I remove the
trigger
andpr
sections then the error changes to an incorrect type for the conditionSo if I put the
trigger
andpr
sections back in but change the condition totrue
then it validates the yaml OK.Thanks @sk82jack - that looks like another example of this issue.