diff --git a/docs/docs/api-reference/starlark-reference/plan.md b/docs/docs/api-reference/starlark-reference/plan.md index 99b570c1ec..c41ec9e5d9 100644 --- a/docs/docs/api-reference/starlark-reference/plan.md +++ b/docs/docs/api-reference/starlark-reference/plan.md @@ -455,6 +455,8 @@ The `run_python` instruction executes a one-time execution task. It runs the Pyt The `files` dictionary argument accepts a key value pair, where `key` is the path where the contents of the artifact will be mounted to and `value` is a [file artifact][files-artifacts-reference] name. +The `store` atrribute expects a list of paths or [`StoreSpec`][store-spec-reference] objects. + The instruction returns a `struct` with [future references][future-references-reference] to the output and exit code of the Python script, alongside with future-reference to the file artifact names that were generated. * `result.output` is a future reference to the output of the command * `result.code` is a future reference to the exit code @@ -530,6 +532,8 @@ The `run_sh` instruction executes a one-time execution task. It runs the bash co The `files` dictionary argument accepts a key value pair, where `key` is the path where the contents of the artifact will be mounted to and `value` is a [file artifact][files-artifacts-reference] name. +The `store` atrribute expects a list of paths or [`StoreSpec`][store-spec-reference] objects. + The instruction returns a `struct` with [future references][future-references-reference] to the output and exit code of the command, alongside with future-reference to the file artifact names that were generated. * `result.output` is a future reference to the output of the command * `result.code` is a future reference to the exit code @@ -725,3 +729,4 @@ plan.print(recipe_result["code"]) [starlark-types-get-http-recipe]: ./get-http-request-recipe.md [service-starlark-reference]: ./service.md [starlark-types-port-spec]: ./port-spec.md +[store-spec-reference]: ./store-spec.md diff --git a/docs/docs/api-reference/starlark-reference/store-spec.md b/docs/docs/api-reference/starlark-reference/store-spec.md new file mode 100644 index 0000000000..8967f6ad63 --- /dev/null +++ b/docs/docs/api-reference/starlark-reference/store-spec.md @@ -0,0 +1,25 @@ +--- +title: StoreSpec +sidebar_label: StoreSpec +--- + +The `StoreSpec` is used to configure how to store a file on the a [`run_sh`][run-sh-reference] and a [`run_python`][run-python-reference] container as a files artifact + +```python +config = StoreSpec( + # The path on the task container that needs to be stored in a files artifact + # MANDATORY + src = "/foo/bar", + + # The name of the files artifact; needs to be unique in the enclave + # This is optional; if not provided Kurtosis will create a nature themed name + name = "divine-pool" +) +``` + +Note the `StoreSpec` object is provided as a list to `run_sh` and `run_python` instructions to the `store` attribtute. Within +one list both the `src` needs to be unique; while the `name` needs to be `unique` for the entire enclave. + + +[run-python-reference]: ./plan.md#run_python +[run-sh-reference]: ./plan.md#run_sh