Closed
Description
Currently we can write
set:
name: Javi
or
set:
name: ${.input.name}
However $ is a reserved keyword in JQ and {} are used in json, think of this expression written in json
"set": {"name": "${$loopVariable}"}
(I wrote it wrong three times :))
I think we should consider following options
- Everything is an expression
This implies user has to escape literals.
set:
name: '"Javi"'
set:
name: .input.name
- Change the expression prefix.
Use something different than ${}
for example, use ``
set:
name: Javi
set:
name: `.input.name`
We can use a different character, for example, #
, but with this one we need to add white spaces around the expression
set:
name: # .input.name #
- Use a new keyword.
So after the property name, you expect either constant
or expr
and use as default expr
(that default might be overriden by user in the header of the workflow definition)
- Default to
expr
:
set:
name:
constant: Javi
set:
name: .input.name
- Default to
constant
:
set:
name: Javi
set:
name:
expr: .input.name
Metadata
Metadata
Assignees
Type
Projects
Status
Done