Skip to content

Commit

Permalink
docs: add extract field to execRecipe docs (#553)
Browse files Browse the repository at this point in the history
## Description:
Part of #503

## Is this change user facing?
YES

## References (if applicable):
<!-- Add relevant Github Issues, Discord threads, or other helpful
information. -->
  • Loading branch information
leeederek committed Apr 24, 2023
1 parent 02fceb0 commit 0ce461c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/docs/starlark-reference/exec-recipe.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ exec_recipe = ExecRecipe(
# Each item corresponds to one shell argument, so ["echo", "Hello world"] behaves as if you ran "echo 'Hello World'" in the shell.
# MANDATORY
command = ["echo", "Hello, World"],

# The extract dictionary can be used for filtering specific parts of a response
# assigning that output to a key-value pair, where the key is the reference
# variable and the value is the specific output.
#
# Specifcally: the key is the way you refer to the extraction later on and
# the value is a 'jq' string that contains logic to extract parts from response
# body that you get from the exec_recipe used
#
# To lean more about jq, please visit https://devdocs.io/jq/
# OPTIONAL (DEFAULT:{})
extract = {
"extractfield" : ".name.id",
},
)
```

Expand Down

0 comments on commit 0ce461c

Please sign in to comment.