engine: Support plan outputs
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
@@ -69,3 +69,11 @@ setup() {
|
||||
assert_failure
|
||||
assert_output --partial 'failed: exec: "rtyet": executable file not found'
|
||||
}
|
||||
|
||||
@test "plan/outputs" {
|
||||
cd "$TESTDIR"/plan/outputs
|
||||
|
||||
rm -f "./out/test"
|
||||
"$DAGGER" --europa up ./outputs.cue
|
||||
assert [ -f "./out/test" ]
|
||||
}
|
||||
|
1
tests/plan/outputs/.gitignore
vendored
Normal file
1
tests/plan/outputs/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
out
|
21
tests/plan/outputs/outputs.cue
Normal file
21
tests/plan/outputs/outputs.cue
Normal file
@@ -0,0 +1,21 @@
|
||||
package main
|
||||
|
||||
import "alpha.dagger.io/europa/dagger/engine"
|
||||
|
||||
engine.#Plan & {
|
||||
actions: {
|
||||
scratch: engine.#Scratch
|
||||
|
||||
data: engine.#WriteFile & {
|
||||
input: scratch.output
|
||||
path: "/test"
|
||||
mode: 0o600
|
||||
contents: "foobar"
|
||||
}
|
||||
}
|
||||
|
||||
outputs: directories: test: {
|
||||
contents: actions.data.output
|
||||
dest: "./out"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user