[I] ➜ testjsonnet drone jsonnet --stdout --stream
2020/11/25 00:30:17 RUNTIME ERROR: Field does not exist: parseJson
.drone.jsonnet:13:22-35 function <splitter_env>
.drone.jsonnet:136:16-34 object <anonymous>
<std>:1245:30-34 thunk from <thunk from <function <anonymous>>>
<std>:1239:24-25 thunk from <thunk <t> from <function <anonymous>>>
<std>:1239:15-26 thunk <t> from <function <anonymous>>
<std>:1240:8-9 function <anonymous>
<std>:1245:20-35 thunk from <function <anonymous>>
<std>:1231:10-11 function <isContent>
<std>:1245:10-36 function <anonymous>
builtin function <flatMap>
.drone.jsonnet:(133:36)-(140:3) function <service>
.drone.jsonnet:355:5-88 thunk from <object <anonymous>>
During manifestation
[I] ➜ testjsonnet drone --version
drone version 1.2.4
the when stanza can be added to steps, however, in the above example you are adding the when stanza to the pipeline, which is why it is being ignored. Perhaps you intended to add the trigger stanza to the pipeline instead?
yes that was the problem indeed thanks a lot. But the parseJson problem still happening tho. drone cli panics when I add it even tho it’s on the jsonnet std
the command line tools uses an older version of jsonnet-go which is probably why the function does not exist, since it was not yet part of the standard library at that time. If you are interested in upgrading the jsonnet module used by the command line tools, please consider sending a pull request to github.com/drone/drone-cli.