commit
3f445f2421
@ -369,7 +369,7 @@ func (p *Pipeline) mount(ctx context.Context, dest string, mnt *compiler.Value)
|
|||||||
llb.CacheMountShared,
|
llb.CacheMountShared,
|
||||||
),
|
),
|
||||||
), nil
|
), nil
|
||||||
case "tmp":
|
case "tmpfs":
|
||||||
return llb.AddMount(
|
return llb.AddMount(
|
||||||
dest,
|
dest,
|
||||||
llb.Scratch(),
|
llb.Scratch(),
|
||||||
|
@ -39,7 +39,7 @@ package dagger
|
|||||||
env?: [string]: string
|
env?: [string]: string
|
||||||
always?: true | *false
|
always?: true | *false
|
||||||
dir: string | *"/"
|
dir: string | *"/"
|
||||||
mount: [string]: "tmp" | "cache" | {from: _, path: string | *"/"}
|
mount: [string]: "tmpfs" | "cache" | {from: _, path: string | *"/"}
|
||||||
}
|
}
|
||||||
|
|
||||||
#FetchContainer: {
|
#FetchContainer: {
|
||||||
|
@ -11,10 +11,19 @@ test: {
|
|||||||
{
|
{
|
||||||
do: "exec"
|
do: "exec"
|
||||||
args: ["sh", "-c", """
|
args: ["sh", "-c", """
|
||||||
echo "NOT SURE WHAT TO TEST YET" > /out
|
echo ok > /out
|
||||||
|
echo ok > /tmpdir/out
|
||||||
"""]
|
"""]
|
||||||
dir: "/"
|
dir: "/"
|
||||||
mount: something: "tmpfs"
|
mount: "/tmpdir": "tmpfs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
do: "exec"
|
||||||
|
args: ["sh", "-c", """
|
||||||
|
[ -f /out ] || exit 1
|
||||||
|
# content of /cache/tmp must not exist in this layer
|
||||||
|
[ ! -f /tmpdir/out ] || exit 1
|
||||||
|
"""]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
do: "export"
|
do: "export"
|
||||||
|
@ -207,13 +207,13 @@ test::local(){
|
|||||||
|
|
||||||
|
|
||||||
test::mount(){
|
test::mount(){
|
||||||
disable test::one "Mount: tmpfs (FIXME https://github.com/blocklayerhq/dagger/issues/46)" --exit=0 \
|
test::one "Mount: tmpfs" --exit=0 \
|
||||||
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/mounts/valid/tmpfs
|
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/mounts/valid/tmpfs
|
||||||
|
|
||||||
test::one "Mount: cache (FIXME https://github.com/blocklayerhq/dagger/issues/46)" --exit=0 \
|
test::one "Mount: cache" --exit=0 \
|
||||||
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/mounts/valid/cache
|
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/mounts/valid/cache
|
||||||
|
|
||||||
test::one "Mount: component (FIXME https://github.com/blocklayerhq/dagger/issues/46)" --exit=0 --stdout='{"test":"hello world"}' \
|
test::one "Mount: component" --exit=0 --stdout='{"test":"hello world"}' \
|
||||||
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/mounts/valid/component
|
"$dagger" "${DAGGER_BINARY_ARGS[@]}" compute "$d"/mounts/valid/component
|
||||||
|
|
||||||
disable test::one "Mount: script (FIXME https://github.com/blocklayerhq/dagger/issues/46)" --exit=0 \
|
disable test::one "Mount: script (FIXME https://github.com/blocklayerhq/dagger/issues/46)" --exit=0 \
|
||||||
|
Reference in New Issue
Block a user