Allow hidden tasks

Signed-off-by: Joel Longtine <joel@dagger.io>
This commit is contained in:
Joel Longtine
2022-01-12 12:58:27 -07:00
parent 0a72696bdc
commit 816dfc8ca0
7 changed files with 68 additions and 82 deletions

View File

@@ -0,0 +1 @@
module: ""

View File

@@ -0,0 +1,4 @@
# generated by dagger
alpha.dagger.io
dagger.io
dagger.lock

View File

@@ -0,0 +1,26 @@
package hidden
import (
"dagger.io/dagger/engine"
)
#Hidden: {
_pull: engine.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
_write: engine.#WriteFile & {
input: _pull.output
path: "/testing"
contents: "1,2,3"
permissions: 700
}
_readfile: engine.#ReadFile & {
input: _write.output
path: "/testing"
} & {
// assert result
contents: "1,2,3"
}
output: _write.output
contents: _readfile.contents
}

View File

@@ -0,0 +1,31 @@
package main
import (
"dagger.io/dagger/engine"
"testing.dagger.io/hidden"
)
engine.#Plan & {
actions: {
pull: engine.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
_write: engine.#WriteFile & {
input: pull.output
path: "/testing"
contents: "1,2,3"
permissions: 700
}
readfile: engine.#ReadFile & {
input: _write.output
path: "/testing"
} & {
// assert result
contents: "1,2,3"
}
hiddenTasks: hidden.#Hidden & {
// assert result
contents: "1,2,3"
}
}
}