Skip to content

Commit

Permalink
Updates both the DSL reference and schema to include script arguments
Browse files Browse the repository at this point in the history
Signed-off-by: Charles d'Avernas <charles.davernas@neuroglia.io>
  • Loading branch information
cdavernas committed Aug 7, 2024
1 parent 151392d commit fd0d67f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
7 changes: 5 additions & 2 deletions dsl-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,8 @@ Enables the execution of custom scripts or code within a workflow, empowering wo
| language | `string` | `yes` | The language of the script to run |
| code | `string` | `no` | The script's code.<br>*Required if `source` has not been set.* |
| source | [externalResource](#external-resource) | `no` | The script's resource.<br>*Required if `code` has not been set.* |
| environment | `map` | `no` | A key/value mapping of the environment variables, if any, to use when running the configured process |
| arguments | `map` | `no` | A list of the arguments of the script to run |
| environment | `map` | `no` | A key/value mapping of the environment variables, if any, to use when running the configured script process |

###### Examples

Expand All @@ -801,8 +802,10 @@ do:
run:
script:
language: js
arguments:
greetings: Hello, world!
code: >
Some cool multiline script
console.log(greetings)
```

##### Shell Process
Expand Down
7 changes: 6 additions & 1 deletion schema/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -508,11 +508,16 @@ $defs:
language:
type: string
description: The language of the script to run.
arguments:
title: ScriptArguments
type: object
additionalProperties: true
description: A key/value mapping of the arguments, if any, to use when running the configured script.
environment:
title: ScriptEnvironment
type: object
additionalProperties: true
description: A key/value mapping of the environment variables, if any, to use when running the configured process.
description: A key/value mapping of the environment variables, if any, to use when running the configured script process.
oneOf:
- title: ScriptInline
properties:
Expand Down

0 comments on commit fd0d67f

Please sign in to comment.