Fix structural cycle error

Signed-off-by: Guillaume de Rouville <guillaume.derouville@gmail.com>
This commit is contained in:
Guillaume de Rouville 2021-09-03 02:28:35 +02:00
parent 95040d8320
commit 9448fba997

View File

@ -3,7 +3,6 @@ package git
import ( import (
"alpha.dagger.io/alpine" "alpha.dagger.io/alpine"
"alpha.dagger.io/dagger" "alpha.dagger.io/dagger"
"alpha.dagger.io/dagger/op"
"alpha.dagger.io/os" "alpha.dagger.io/os"
"alpha.dagger.io/random" "alpha.dagger.io/random"
) )
@ -25,32 +24,17 @@ TestData: {
} }
}.out }.out
// FIXME Currently throw a structural cycle error TestFile: os.#Dir & {
//TestFile: os.#Dir & { from: os.#Container & {
// from: os.#Container & { image: alpine.#Image
// image: alpine.#Image command: #"""
// command: #""" mkdir -p /output
// mkdir -p /output echo "$MESSAGE" >> /output/test.md
// echo "$MESSAGE" >> /output/test.md """#
// """# env: MESSAGE: TestData
// env: MESSAGE: TestData }
// }
// path: "/output"
//}
TestFile: #up: [
op.#Load & {from: alpine.#Image},
op.#Mkdir & {
path: "/output" path: "/output"
}, }
op.#WriteFile & {
content: TestData
dest: "/output/test.md"
},
op.#Subdir & {
dir: "/output"
},
]
TestCommit: #Commit & { TestCommit: #Commit & {
repository: { repository: {
@ -88,8 +72,8 @@ TestCheck: {
mount: "/input/repo": from: _TestRepo mount: "/input/repo": from: _TestRepo
env: { env: {
EXPECTED_MESSAGE: TestData EXPECTED_MESSAGE: TestData
// Force dependency // Force dependency with interpolation
GIT_HASH: TestCommit.hash GIT_HASH: "\(TestCommit.hash)"
} }
} }
} }