digdag plugin for operating params.
- Plugin type: operator
_export:
plugin:
repositories:
- https://jitpack.io
dependencies:
- pro.civitaspo:digdag-operator-param:0.0.2
+show1:
echo>: "hoge: ${typeof(hoge) == 'undefined' ? 'None' : hoge}, a.b: ${typeof(a) == 'undefined' ? 'None' : typeof(a.b) == 'undefined' ? 'None' : a.b}"
+store:
param_store>:
hoge: fuga
a:
b: c
+show2:
echo>: "hoge: ${typeof(hoge) == 'undefined' ? 'None' : hoge}, a.b: ${typeof(a) == 'undefined' ? 'None' : typeof(a.b) == 'undefined' ? 'None' : a.b}"
+reset:
+hoge:
param_reset>: hoge
+a.b:
param_reset>: a.b
+show3:
echo>: "hoge: ${typeof(hoge) == 'undefined' ? 'None' : hoge}, a.b: ${typeof(a) == 'undefined' ? 'None' : typeof(a.b) == 'undefined' ? 'None' : a.b}"
+eval:
_export:
a: aaa
b: bbb
c: ccc
d: ${a}-${b}-${c}
+a:
_export:
e: ${d}
f:
g: ${d}
h:
- ${d}
+b:
echo>: ${d}
+c:
echo>: ${e}
+d:
echo>: ${f.g}
+e:
param_eval>: f.g
+f:
echo>: ${f.g}
+g:
+h:
for_each>: {i: "${f.h}"}
_do:
echo>: ${i}
+i:
echo>: ${f.h}
+j:
param_eval>: f.h
+k:
+l:
for_each>: {i: "${f.h}"}
_do:
echo>: ${i}
+m:
echo>: ${f.h}
- param_store>: Params to store. (string to object map, required)
- param_reset>: Param name to reset. (string, required)
- param_eval>: Param name to eval. (string, required)
NOTE:
- This operator is a workaround for the issue: Exported vars are not evaluated recursively in the context of nested params
- Use single quote
'
instead of double quote"
for injecting javascript code to avoideSyntaxError: <function>: Missing close quote
error: Fails param_eval>: when using custom variables in nested variables
./gradlew publish
Artifacts are build on local repos: ./build/repo
.
./example/run.sh
This project's dependencies are managed by the gradle dependency locking feature.
# Update the dependencies
./gradlew dependencies --write-locks
# Update the paticular dependency
./gradlew dependencies --update-locks org.junit.jupiter:junit-jupiter-api
./gradlew test
@civitaspo