I may be missing something simple, so let's figure out what I'm doing wrong.
Host filesystem:
Root
- app
-- project name
- CI
-- test-results
{other files and folders}
This example works and creates "sandbox_test.txt" in the Root folder on Host:
my_container = await (
my_container.with_exec(
[
"sh",
"-c",
(
"echo -n Hello World > /tmp/sandbox_test.txt"
),
])
.file("/tmp/sandbox_test.txt")
.export("sandbox_test.txt")
)
This example throws and error when trying to export a file to CI or CI/test-results:
dagger.QueryError: unexpected closing recv msg: rpc error: code = Unknown desc = failed to create synctarget dest dir /CI: mkdir /CI: permission denied
my_container = await (
my_container.with_exec(
[
"sh",
"-c",
(
"echo -n Hello World > /tmp/sandbox_test.txt"
),
])
.file("/tmp/sandbox_test.txt")
.export("/CI/sandbox_test.txt")
)
I want to aggregate all the files generated by my process in a single folder back on my host and not sure why I can't put them inside a folder.
What am I doing wrong?