Add output files#1528
Conversation
shykes
left a comment
There was a problem hiding this comment.
Looks good overall:
- See my comment below about optional field
- Could you write a small docs article about using this feature? It can be very basic. NOTE: this can be in a follow-up PR.
Signed-off-by: Helder Correia <[email protected]>
Certainly. If you don't want to hold off on this feature until it's ready, I'll push another PR with it. |
|
✔️ Deploy Preview for devel-docs-dagger-io ready! 🔨 Explore the source changes: 813a476 🔍 Inspect the deploy log: https://app.netlify.com/sites/devel-docs-dagger-io/deploys/61f85a8dde8db4000713162f 😎 Browse the preview: https://deploy-preview-1528--devel-docs-dagger-io.netlify.app |
I'm in favor of merging this so it's included in |
Closes #1317
Signed-off-by: Helder Correia
Why
If you want to save a string into the local disk (e.g., writing a
docker-compose.yamlfile from CUE), currently you need to create a#FSviaengine.#WriteFileand reference it inoutputs: directories. This can be made simpler.What
Added
outputs: filesto the plan to make it easier to write a string to a file, without having to go throughengine.#WriteFile.How
Here’s an example on writing a docker compose file from CUE:
You can change file permissions as well (default is 0644):