I would like to copy items from a exec build actio...
# 🤖|ask-kapa
s
@microscopic-river-74022 I would like to copy items from a exec build action when running a deploy exec function. How would I do that?
m
Please stand by @salmon-scientist-57815 as I search the knowledge base. I normally take about 15 seconds or so. :wave:
---------------------- To copy items from an exec build action when running a deploy exec function in Garden, you can use the
copyFrom
configuration in your deploy action. Here's how you can do it: 1. First, create an exec build action that contains the items you want to copy. 2. In your deploy action configuration, use the
copyFrom
field to specify what you want to copy from the build action. Here's an example structure:
Copy code
yaml
kind: Deploy
type: exec
name: your-deploy-action
copyFrom:
  - build: your-exec-build-action
    sourcePath: "path/to/source"
    targetPath: "path/to/target"
In this configuration: -
build
specifies the name of the exec build action you want to copy from. -
sourcePath
is the path to the file or directory you want to copy, relative to the build action's root. -
targetPath
is where you want to copy the files to in your deploy action. This approach is based on the
copyFrom
functionality described in the exec Build reference (). While this reference is for build actions, the same principle applies to deploy actions. It's important to note that the exact configuration might vary depending on your specific setup and Garden version. If you need more detailed information or if this doesn't fully address your use case, you may need to consult the Garden documentation for your specific action types and Garden version. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
message has been deleted
2 Views