Skip to content

Commit

Permalink
Update documentation for scriptArguments param (#5128)
Browse files Browse the repository at this point in the history
* Update documentation for scriptArguments param

* Update resources/metadata/shellExecute.yaml

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>

* Update doc with new examples

* Fix typo

---------

Co-authored-by: Ivan Nikiforov <ivan.nikiforov@sap.com>
Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 16, 2024
1 parent e1563e0 commit 34a60da
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/shellExecute_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions resources/metadata/shellExecute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,18 @@ spec:
- PARAMETERS
- STAGES
- STEPS
description: scriptArguments that are needed to be passed to scripts. the scriptArguments list is a flat list and has a positional relationship to the `sources` param.
For e.g. The scriptArguments string at position 1 will be considered as the argument(s) for script at position 1 in `sources` list. For multiple arguments for a script please add them as a comma seperated string.
description: "scriptArguments that need to be passed to the scripts."
longDescription: |-
The scriptArguments list is a flat list and has a positional relationship to the `sources` parameter.
For example, the `scriptArguments` string at position 0 will be considered as the argument(s) for script at position 0 in `sources` list.
`--sources ".pipeline/firstScript.sh" --sources ".pipeline/secondScript.sh" --scriptArguments "$(first_script_arg)" --scriptArguments "$(second_script_arg)"`
For multiple arguments for a particular script, please add them as a comma-separated string enclosed in additional quotes, e.g.:
`--sources ".pipeline/yourScript.sh" --scriptArguments "\"$(first_arg),$(second_arg)\""`
For multiple scripts with multiple arguments per each script your command would look like:
`--sources ".pipeline/firstScript.sh" --sources ".pipeline/secondScript.sh" --scriptArguments "\"$(first_script_arg1),$(first_script_arg2)\"" --scriptArguments "\"$(second_script_arg1),$(second_script_arg2)\""`
mandatory: false
containers:
- name: shell
Expand Down

0 comments on commit 34a60da

Please sign in to comment.