Save params and publish them #2892
-
I have a workflow with a considerable number of input parameters. What I'd like to do is save them to a JSON/YAML file for posterity and have that file published to S3 along with the rest of the workflow's output files so the run can be reproduced in the future if necessary. I currently am using the Example: import groovy.json.JsonOutput
params.foo = 'bar'
params.bar = 'baz'
process saveParams {
output:
//path 'params.json'
exec:
json = JsonOutput.toJson(params)
paramsFile = new File('params.json')
paramsFile.write(JsonOutput.prettyPrint(json))
} If I uncomment the output, the pipeline fails saying Is there any way for me to do this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You can use the
|
Beta Was this translation helpful? Give feedback.
You can use the
script
section using interpolation expressions. For example: