-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
-
False
-
-
False
-
-
Custom Params cannot be used in on-cel expressions with errors that appear to be bugs
Given a Repository CR with a custom param like below:
spec:
params:
- name: test_params
value: "true"
The following on-cel-expressions do not work:
Using event_type == "push" && {{test_params == true}} results in the following error:
CEL expression evaluation error: expression "event_type == \"push\" && true == true" check failed: ERROR: <input>:1:1: undeclared reference to 'event_type' (in container '') | event_type == "push" && true == true | ^
Removing the curly braces from the custom-param results in a different error:
CEL expression evaluation error: expression "event_type == \"push\" && test_params == true" check failed: ERROR: <input>:1:1: undeclared reference to 'event_type' (in container '') | event_type == "push" && test_params == true | ^ ERROR: <input>:1:25: undeclared reference to 'test_params' (in container '') | event_type == "push" && test_params == true | ........................^
However if I remove the reference to event_type, using just the on-cel expression {{test_params == true}} then the pipelinerun is matched as expected...
Workaround
Prerequisites (if any, like setup, operators/versions):
Steps to Reproduce
# <steps>
Actual results:
Expected results:
Reproducibility (Always/Intermittent/Only Once):
Acceptance criteria:
Definition of Done:
Build Details:
Additional info (Such as Logs, Screenshots, etc):