How do you control whether to re-build an image af...
# 🤖|ask-kapa
m
Please stand by @plain-pizza-51556 as I search the knowledge base. I normally take about 20 seconds or so. :wave:
---------------------- Garden has smart caching abilities that ensure the same image never needs to be built twice or the same test run twice, unless the code or its dependencies have changed. This is one of the most important features of Garden and it can speed up your pipelines significantly. However, if you want to force a rebuild of all builds, you can use the
--force
or
-f
option with the
garden build
command. Here's how you can do it:
Copy code
bash
garden build --force  # or -f for short
If you want to build a specific build, you can specify the name of the build like this:
Copy code
bash
garden build my-build
In addition, you can control the caching of the result of a Run by setting the
cacheResult
option in the YAML schema. If you set
cacheResult
to
false
, the Run's result won't be cached and the Run will be executed any time your project or one of the Run's dependants is deployed. Otherwise, the Run is only re-run when its version changes, or when you run
garden run
.
Copy code
yaml
cacheResult: false
For more details, please refer to the Garden documentation (). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
message has been deleted