Skip to content

Commit fd0d67f

Browse files
committed
Updates both the DSL reference and schema to include script arguments
Signed-off-by: Charles d'Avernas <[email protected]>
1 parent 151392d commit fd0d67f

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

dsl-reference.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,8 @@ Enables the execution of custom scripts or code within a workflow, empowering wo
786786
| language | `string` | `yes` | The language of the script to run |
787787
| code | `string` | `no` | The script's code.<br>*Required if `source` has not been set.* |
788788
| source | [externalResource](#external-resource) | `no` | The script's resource.<br>*Required if `code` has not been set.* |
789-
| environment | `map` | `no` | A key/value mapping of the environment variables, if any, to use when running the configured process |
789+
| arguments | `map` | `no` | A list of the arguments of the script to run |
790+
| environment | `map` | `no` | A key/value mapping of the environment variables, if any, to use when running the configured script process |
790791

791792
###### Examples
792793

@@ -801,8 +802,10 @@ do:
801802
run:
802803
script:
803804
language: js
805+
arguments:
806+
greetings: Hello, world!
804807
code: >
805-
Some cool multiline script
808+
console.log(greetings)
806809
```
807810

808811
##### Shell Process

schema/workflow.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,11 +508,16 @@ $defs:
508508
language:
509509
type: string
510510
description: The language of the script to run.
511+
arguments:
512+
title: ScriptArguments
513+
type: object
514+
additionalProperties: true
515+
description: A key/value mapping of the arguments, if any, to use when running the configured script.
511516
environment:
512517
title: ScriptEnvironment
513518
type: object
514519
additionalProperties: true
515-
description: A key/value mapping of the environment variables, if any, to use when running the configured process.
520+
description: A key/value mapping of the environment variables, if any, to use when running the configured script process.
516521
oneOf:
517522
- title: ScriptInline
518523
properties:

0 commit comments

Comments
 (0)