does the `include` statement of the build exec act...
# 🤖|ask-kapa
s
@microscopic-river-74022 does the
include
statement of the build exec action copy the specified files to the staging area?
m
Please stand by @salmon-scientist-57815 as I search the knowledge base. I normally take about 15 seconds or so. :wave:
---------------------- Based on the knowledge sources provided, I can answer your question about the
include
statement in the build exec action of Garden. The
include
statement in a build exec action does not directly copy files to the staging area. Instead, it specifies which files should be considered part of the build context and affects the computed version of the action. According to the Reference > Action-types > Build > exec Build () documentation: "Specify a list of POSIX-style paths or globs that should be included as the build context for the Build, and will affect the computed version of the action." The
include
statement helps define the build context, which determines what files are available during the build process. However, it's important to note that by default, builds are staged in a separate directory. As mentioned in the Edge-release > Reference > Commands > garden get config () documentation: "By default, builds are staged in
.garden/build/<build name>
and that directory is used as the build context. This is done to avoid builds contaminating the source tree, which can end up confusing version computation, or a build including files that are not intended to be part of it." So, while the
include
statement doesn't directly copy files, it does influence what files are considered part of the build context, which in turn affects what ends up in the staging area during the build process. If you need to explicitly copy files from other builds, you would use the
copyFrom
field in the build configuration, as described in the same document. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
message has been deleted