cue files: #compute -> #up

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi 2021-04-02 15:00:30 -07:00 committed by Solomon Hykes
parent 8a4aa4d42b
commit c16455249e
87 changed files with 137 additions and 140 deletions

View File

@ -10,7 +10,7 @@ let defaultVersion = "3.13.2@sha256:a75afd8b57e7f34e4dad8d65e2c7ba2e1975c795ce1e
package: [string]: true | false | string package: [string]: true | false | string
version: string | *defaultVersion version: string | *defaultVersion
#compute: [ #up: [
llb.#FetchContainer & { llb.#FetchContainer & {
ref: "index.docker.io/alpine:\(version)" ref: "index.docker.io/alpine:\(version)"
}, },

View File

@ -18,7 +18,7 @@ import (
// Re-usable aws-cli component // Re-usable aws-cli component
#CLI: { #CLI: {
#compute: [ #up: [
llb.#Load & { llb.#Load & {
from: alpine.#Image & { from: alpine.#Image & {
package: bash: "=5.1.0-r0" package: bash: "=5.1.0-r0"

View File

@ -46,7 +46,7 @@ import (
outputs: [string]: string outputs: [string]: string
outputs: #compute: [ outputs: #up: [
llb.#Load & { llb.#Load & {
from: aws.#CLI from: aws.#CLI
}, },

View File

@ -21,7 +21,7 @@ import (
kubeconfig: { kubeconfig: {
dagger.#Secret dagger.#Secret
#compute: [ #up: [
llb.#Load & { llb.#Load & {
from: aws.#CLI from: aws.#CLI
}, },

View File

@ -7,7 +7,7 @@ import (
// An artifact such as source code checkout, container image, binary archive... // An artifact such as source code checkout, container image, binary archive...
// May be passed as user input, or computed by a buildkit pipeline // May be passed as user input, or computed by a buildkit pipeline
#Artifact: { #Artifact: {
#up: llb.#Pipeline #up: [...llb.#Op]
_ _
... ...
} }

View File

@ -11,7 +11,7 @@ import (
#Build: { #Build: {
source: dagger.#Artifact source: dagger.#Artifact
image: #compute: [ image: #up: [
llb.#DockerBuild & {context: source}, llb.#DockerBuild & {context: source},
] ]
} }
@ -22,14 +22,14 @@ import (
// image may be a remote image ref, or a computed artifact // image may be a remote image ref, or a computed artifact
{ {
image: #Ref image: #Ref
out: #compute: [ out: #up: [
llb.#FetchContainer & {ref: image}, llb.#FetchContainer & {ref: image},
llb.#Exec & {"args": args}, llb.#Exec & {"args": args},
] ]
} | { } | {
image: _ image: _
out: #compute: [ out: #up: [
llb.#Load & {from: image}, llb.#Load & {from: image},
llb.#Exec & {"args": args}, llb.#Exec & {"args": args},
] ]

View File

@ -11,7 +11,7 @@ import (
permissions: int | *0o644 permissions: int | *0o644
contents: string | bytes contents: string | bytes
#compute: [ #up: [
llb.#WriteFile & {dest: filename, content: contents, mode: permissions}, llb.#WriteFile & {dest: filename, content: contents, mode: permissions},
] ]
} }
@ -24,7 +24,7 @@ import (
orig: (#read & {path: filename, "from": from}).data orig: (#read & {path: filename, "from": from}).data
#compute: [ #up: [
llb.#WriteFile & {dest: filename, content: "\(orig)\(contents)", mode: permissions}, llb.#WriteFile & {dest: filename, content: "\(orig)\(contents)", mode: permissions},
] ]
} }
@ -40,7 +40,7 @@ import (
from: dagger.#Artifact from: dagger.#Artifact
data: { data: {
string string
#compute: [ #up: [
llb.#Load & {"from": from}, llb.#Load & {"from": from},
llb.#Export & {source: path}, llb.#Export & {source: path},
] ]
@ -62,7 +62,7 @@ _#glob: {
data: { data: {
string string
_tmppath: "/tmp/ls.out" _tmppath: "/tmp/ls.out"
#compute: [ #up: [
llb.#Load & {"from": from}, llb.#Load & {"from": from},
llb.#Exec & { llb.#Exec & {
args: ["sh", "-c", "ls \(glob) > \(_tmppath)"] args: ["sh", "-c", "ls \(glob) > \(_tmppath)"]

View File

@ -10,7 +10,7 @@ import (
remote: string remote: string
ref: string ref: string
#compute: [ #up: [
llb.#FetchGit & { llb.#FetchGit & {
"remote": remote "remote": remote
"ref": ref "ref": ref

View File

@ -18,7 +18,7 @@ import (
// Environment variables // Environment variables
env: [string]: string env: [string]: string
#compute: [ #up: [
llb.#FetchContainer & { llb.#FetchContainer & {
ref: "docker.io/golang:\(version)-alpine" ref: "docker.io/golang:\(version)-alpine"
}, },
@ -63,7 +63,7 @@ import (
env: [string]: string env: [string]: string
#compute: [ #up: [
llb.#Copy & { llb.#Copy & {
from: #Go & { from: #Go & {
"version": version "version": version

View File

@ -50,7 +50,7 @@ import (
// Kubectl version // Kubectl version
kubectlVersion: *"v1.19.9" | string kubectlVersion: *"v1.19.9" | string
#compute: [ #up: [
llb.#Load & { llb.#Load & {
from: kubernetes.#Kubectl & { from: kubernetes.#Kubectl & {
version: kubectlVersion version: kubectlVersion

View File

@ -17,7 +17,7 @@ import (
} }
"""# """#
#compute: [ #up: [
llb.#Load & { llb.#Load & {
from: alpine.#Image & { from: alpine.#Image & {
package: bash: "=5.1.0-r0" package: bash: "=5.1.0-r0"
@ -62,7 +62,7 @@ import (
kubectl --namespace "$KUBE_NAMESPACE" apply -R -f /source kubectl --namespace "$KUBE_NAMESPACE" apply -R -f /source
"""# """#
#compute: [ #up: [
llb.#Load & { llb.#Load & {
from: #Kubectl & {"version": version} from: #Kubectl & {"version": version}
}, },

View File

@ -15,9 +15,6 @@ package llb
#Mkdir | #Mkdir |
#DockerBuild #DockerBuild
// Pipeline is a series of operations
#Pipeline: [...llb.#Op]
// Export a value from fs state to cue // Export a value from fs state to cue
#Export: { #Export: {
do: "export" do: "export"

View File

@ -42,7 +42,7 @@ import (
// Logs URL for this deployment // Logs URL for this deployment
logsUrl: string logsUrl: string
#compute: [ #up: [
llb.#Load & { llb.#Load & {
from: alpine.#Image & { from: alpine.#Image & {
package: bash: "=~5.1" package: bash: "=~5.1"

View File

@ -21,7 +21,7 @@ import (
// Set these environment variables during the build // Set these environment variables during the build
env?: [string]: string env?: [string]: string
#compute: [ #up: [
llb.#Load & { llb.#Load & {
from: alpine.#Image & { from: alpine.#Image & {
package: bash: "=~5.1" package: bash: "=~5.1"

View File

@ -5,7 +5,7 @@ import "dagger.io/llb"
foo: "value" foo: "value"
bar: "another value" bar: "another value"
#compute: [ #up: [
llb.#FetchContainer & {ref: "busybox"}, llb.#FetchContainer & {ref: "busybox"},
llb.#Exec & {args: ["true"]}, llb.#Exec & {args: ["true"]},
] ]

View File

@ -3,7 +3,7 @@ package testing
A: { A: {
result: string result: string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"
@ -28,7 +28,7 @@ A: {
B: { B: {
result: string result: string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -3,7 +3,7 @@ package testing
A: { A: {
result: string result: string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"
@ -28,7 +28,7 @@ A: {
B: { B: {
result: string result: string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -5,7 +5,7 @@ import "encoding/json"
A: { A: {
string string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"
@ -32,7 +32,7 @@ unmarshalled: json.Unmarshal(A)
B: { B: {
result: string result: string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -18,7 +18,7 @@ _expected: """
TestIgnore: { TestIgnore: {
string string
#compute: [ #up: [
llb.#Load & {from: alpine.#Image}, llb.#Load & {from: alpine.#Image},
llb.#Exec & { llb.#Exec & {
args: ["sh", "-c", "ls /src/* > /out.txt"] args: ["sh", "-c", "ls /src/* > /out.txt"]

View File

@ -5,7 +5,7 @@ X1=in: string | *"default input"
test: { test: {
string string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -5,7 +5,7 @@ X1=in: string
test: { test: {
string string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -1,3 +1,3 @@
package testing package testing
#compute: true #up: true

View File

@ -1,3 +1,3 @@
package testing package testing
#compute: 123 #up: 123

View File

@ -1,3 +1,3 @@
package testing package testing
#compute: "whatever" #up: "whatever"

View File

@ -1,3 +1,3 @@
package testing package testing
#compute: whatever: "wrong" #up: whatever: "wrong"

View File

@ -2,5 +2,5 @@ package testing
// no-op, should not error // no-op, should not error
empty: { empty: {
#compute: [] #up: []
} }

View File

@ -6,7 +6,7 @@ new_prop: "lala"
new_prop_too: string new_prop_too: string
#new_def_too: string #new_def_too: string
#compute: [{ #up: [{
do: "fetch-container" do: "fetch-container"
ref: "busybox" ref: "busybox"
}, },

View File

@ -7,7 +7,7 @@ foo: {
new_prop_too: string new_prop_too: string
#new_def_too: string #new_def_too: string
#compute: [{ #up: [{
do: "fetch-container" do: "fetch-container"
ref: "busybox" ref: "busybox"
}, },

View File

@ -1,6 +1,6 @@
package testing package testing
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "busybox" ref: "busybox"

View File

@ -3,7 +3,7 @@ package testing
test1: { test1: {
string string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "busybox" ref: "busybox"
@ -25,7 +25,7 @@ test1: {
test2: { test2: {
string string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "busybox" ref: "busybox"

View File

@ -1,6 +1,6 @@
package testing package testing
component: #compute: [{ component: #up: [{
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"
}, { }, {
@ -14,7 +14,7 @@ component: #compute: [{
test1: { test1: {
string string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "busybox" ref: "busybox"
@ -36,14 +36,14 @@ test1: {
test2: { test2: {
string string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "busybox" ref: "busybox"
}, },
{ {
do: "copy" do: "copy"
from: #compute: [{ from: #up: [{
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"
}, { }, {

View File

@ -3,7 +3,7 @@ package testing
test: { test: {
string string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "busybox" ref: "busybox"

View File

@ -8,7 +8,7 @@ import (
// Set to `--input-dir=./tests/dockerbuild/testdata` // Set to `--input-dir=./tests/dockerbuild/testdata`
TestData: dagger.#Artifact TestData: dagger.#Artifact
TestInlinedDockerfile: #compute: [ TestInlinedDockerfile: #up: [
llb.#DockerBuild & { llb.#DockerBuild & {
dockerfile: """ dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
@ -17,7 +17,7 @@ TestInlinedDockerfile: #compute: [
}, },
] ]
TestOpChaining: #compute: [ TestOpChaining: #up: [
llb.#DockerBuild & { llb.#DockerBuild & {
dockerfile: """ dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
@ -29,7 +29,7 @@ TestOpChaining: #compute: [
}, },
] ]
TestBuildContext: #compute: [ TestBuildContext: #up: [
llb.#DockerBuild & { llb.#DockerBuild & {
context: TestData context: TestData
}, },
@ -38,7 +38,7 @@ TestBuildContext: #compute: [
}, },
] ]
TestBuildContextAndDockerfile: #compute: [ TestBuildContextAndDockerfile: #up: [
llb.#DockerBuild & { llb.#DockerBuild & {
context: TestData context: TestData
dockerfile: """ dockerfile: """
@ -51,7 +51,7 @@ TestBuildContextAndDockerfile: #compute: [
}, },
] ]
TestDockerfilePath: #compute: [ TestDockerfilePath: #up: [
llb.#DockerBuild & { llb.#DockerBuild & {
context: TestData context: TestData
dockerfilePath: "./dockerfilepath/Dockerfile.custom" dockerfilePath: "./dockerfilepath/Dockerfile.custom"
@ -61,7 +61,7 @@ TestDockerfilePath: #compute: [
}, },
] ]
TestBuildArgs: #compute: [ TestBuildArgs: #up: [
llb.#DockerBuild & { llb.#DockerBuild & {
dockerfile: """ dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
@ -73,7 +73,7 @@ TestBuildArgs: #compute: [
] ]
// FIXME: this doesn't test anything beside not crashing // FIXME: this doesn't test anything beside not crashing
TestBuildLabels: #compute: [ TestBuildLabels: #up: [
llb.#DockerBuild & { llb.#DockerBuild & {
dockerfile: """ dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
@ -83,7 +83,7 @@ TestBuildLabels: #compute: [
] ]
// FIXME: this doesn't test anything beside not crashing // FIXME: this doesn't test anything beside not crashing
TestBuildPlatform: #compute: [ TestBuildPlatform: #up: [
llb.#DockerBuild & { llb.#DockerBuild & {
dockerfile: """ dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d

View File

@ -1,6 +1,6 @@
package testing package testing
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -1,6 +1,6 @@
package testing package testing
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -1,6 +1,6 @@
package testing package testing
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -1,6 +1,6 @@
package testing package testing
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -2,7 +2,7 @@ package testing
bar: string bar: string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -1,6 +1,6 @@
package testing package testing
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -1,6 +1,6 @@
package testing package testing
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -1,6 +1,6 @@
package testing package testing
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -1,6 +1,6 @@
package testing package testing
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -1,6 +1,6 @@
package testing package testing
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -3,7 +3,7 @@ package testing
hello: "world" hello: "world"
bar: string bar: string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -3,7 +3,7 @@ package testing
hello: "world" hello: "world"
bar: string bar: string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -2,7 +2,7 @@ package def
#dang: string #dang: string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -4,7 +4,7 @@ import (
"dagger.io/def" "dagger.io/def"
) )
#compute: [ #up: [
{ {
do: "load", do: "load",
from: def from: def

View File

@ -2,7 +2,7 @@ package nonoptional
dang: string dang: string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -4,7 +4,7 @@ import (
"dagger.io/nonoptional" "dagger.io/nonoptional"
) )
#compute: [ #up: [
{ {
do: "load", do: "load",
from: nonoptional from: nonoptional

View File

@ -2,7 +2,7 @@ package optional
dang?: string dang?: string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -4,7 +4,7 @@ import (
"dagger.io/optional" "dagger.io/optional"
) )
#compute: [ #up: [
{ {
do: "load", do: "load",
from: optional from: optional

View File

@ -3,7 +3,7 @@ package testing
test: { test: {
bool bool
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -3,7 +3,7 @@ package testing
test1: { test1: {
string string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"
@ -27,7 +27,7 @@ test1: {
test2: { test2: {
string string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"
@ -51,7 +51,7 @@ test2: {
test3: { test3: {
string string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"
@ -75,7 +75,7 @@ test3: {
test4: { test4: {
string string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"
@ -99,7 +99,7 @@ test4: {
test5: { test5: {
string string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"
@ -123,7 +123,7 @@ test5: {
test6: { test6: {
string string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"
@ -147,7 +147,7 @@ test6: {
test7: { test7: {
string string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"
@ -171,7 +171,7 @@ test7: {
test8: { test8: {
string string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"
@ -195,7 +195,7 @@ test8: {
test9: { test9: {
string string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"
@ -219,7 +219,7 @@ test9: {
test10: { test10: {
string string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -3,7 +3,7 @@ package testing
test: { test: {
float float
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -3,7 +3,7 @@ package testing
teststring: { teststring: {
string string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -3,7 +3,7 @@ package testing
teststring: { teststring: {
string string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -4,7 +4,7 @@ test: {
string string
=~"^NAAAA.+" =~"^NAAAA.+"
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -3,7 +3,7 @@ package testing
testScalar: { testScalar: {
bool bool
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"
@ -25,7 +25,7 @@ testScalar: {
] ]
} }
testMap: #compute: [ testMap: #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"
@ -50,7 +50,7 @@ testMap: #compute: [
// testList: { // testList: {
// [...string] // [...string]
// #compute: [ // #up: [
// { // {
// do: "fetch-container" // do: "fetch-container"
// ref: "alpine" // ref: "alpine"

View File

@ -3,7 +3,7 @@ package testing
test: { test: {
number number
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -3,7 +3,7 @@ package testing
test: { test: {
string string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -4,7 +4,7 @@ test: {
string string
=~"^some.+" =~"^some.+"
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -3,7 +3,7 @@ package testing
testScalar: { testScalar: {
bool bool
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"
@ -30,7 +30,7 @@ testScalar: {
// testList: { // testList: {
// [...string] // [...string]
// #compute: [ // #up: [
// { // {
// do: "fetch-container" // do: "fetch-container"
// ref: "alpine" // ref: "alpine"
@ -54,7 +54,7 @@ testScalar: {
// ] // ]
// } // }
testMap: #compute: [ testMap: #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -1,34 +1,34 @@
package testing package testing
busybox1: #compute: [ busybox1: #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "busybox" ref: "busybox"
}, },
] ]
busybox2: #compute: [ busybox2: #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "busybox:latest" ref: "busybox:latest"
}, },
] ]
busybox3: #compute: [ busybox3: #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "busybox:1.33-musl" ref: "busybox:1.33-musl"
}, },
] ]
busybox4: #compute: [ busybox4: #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "busybox@sha256:e2af53705b841ace3ab3a44998663d4251d33ee8a9acaf71b66df4ae01c3bbe7" ref: "busybox@sha256:e2af53705b841ace3ab3a44998663d4251d33ee8a9acaf71b66df4ae01c3bbe7"
}, },
] ]
busybox5: #compute: [ busybox5: #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "busybox:1.33-musl@sha256:e2af53705b841ace3ab3a44998663d4251d33ee8a9acaf71b66df4ae01c3bbe7" ref: "busybox:1.33-musl@sha256:e2af53705b841ace3ab3a44998663d4251d33ee8a9acaf71b66df4ae01c3bbe7"

View File

@ -1,6 +1,6 @@
package testing package testing
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
}, },

View File

@ -1,6 +1,6 @@
package testing package testing
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine@sha256:c6c7524e2111f22a9f7577211232d89a9e68cf5b9ed4a41ba77957c9771380a5" ref: "alpine@sha256:c6c7524e2111f22a9f7577211232d89a9e68cf5b9ed4a41ba77957c9771380a5"

View File

@ -2,7 +2,7 @@ package testing
// XXX WATCHOUT // XXX WATCHOUT
// Once buildkit has pulled that digest, it will stay cached and happily succeed WHATEVER the image name then is // Once buildkit has pulled that digest, it will stay cached and happily succeed WHATEVER the image name then is
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "busyboxaaa@sha256:e2af53705b841ace3ab3a44998663d4251d33ee8a9acaf71b66df4ae01c3bbe7" ref: "busyboxaaa@sha256:e2af53705b841ace3ab3a44998663d4251d33ee8a9acaf71b66df4ae01c3bbe7"

View File

@ -1,6 +1,6 @@
package testing package testing
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "doesnotexist" ref: "doesnotexist"

View File

@ -1,6 +1,6 @@
package testing package testing
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine:doesnotexist" ref: "alpine:doesnotexist"

View File

@ -1,6 +1,6 @@
package testing package testing
#compute: [ #up: [
{ {
do: "fetch-git" do: "fetch-git"
remote: "https://github.com/blocklayerhq/acme-clothing.git" remote: "https://github.com/blocklayerhq/acme-clothing.git"

View File

@ -1,6 +1,6 @@
package testing package testing
#compute: [ #up: [
{ {
do: "fetch-git" do: "fetch-git"
}, },

View File

@ -1,6 +1,6 @@
package testing package testing
#compute: [ #up: [
{ {
do: "fetch-git" do: "fetch-git"
remote: "pork://pork" remote: "pork://pork"

View File

@ -1,6 +1,6 @@
package testing package testing
#compute: [ #up: [
{ {
do: "fetch-git" do: "fetch-git"
remote: "https://github.com/blocklayerhq/acme-clothing.git" remote: "https://github.com/blocklayerhq/acme-clothing.git"

View File

@ -1,6 +1,6 @@
package testing package testing
#compute: [ #up: [
{ {
do: "fetch-git" do: "fetch-git"
remote: "https://github.com/blocklayerhq/lalalala.git" remote: "https://github.com/blocklayerhq/lalalala.git"

View File

@ -3,7 +3,7 @@ package testing
test1: { test1: {
string string
#compute: [ #up: [
{ {
do: "load" do: "load"
from: [{do: "fetch-container", ref: "alpine"}] from: [{do: "fetch-container", ref: "alpine"}]
@ -19,7 +19,7 @@ test1: {
test2: { test2: {
string string
#compute: [ #up: [
{ {
do: "load" do: "load"
from: [{do: "fetch-container", ref: "busybox"}] from: [{do: "fetch-container", ref: "busybox"}]

View File

@ -1,6 +1,6 @@
package testing package testing
component: #compute: [{ component: #up: [{
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"
}, { }, {
@ -14,7 +14,7 @@ component: #compute: [{
test1: { test1: {
string string
#compute: [ #up: [
{ {
do: "load" do: "load"
from: component from: component
@ -30,10 +30,10 @@ test1: {
test2: { test2: {
string string
#compute: [ #up: [
{ {
do: "load" do: "load"
from: #compute: [{ from: #up: [{
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"
}, { }, {

View File

@ -3,7 +3,7 @@ package testing
test: { test: {
string string
#compute: [ #up: [
{ {
do: "load" do: "load"
from: [{do: "fetch-container", ref: "alpine"}] from: [{do: "fetch-container", ref: "alpine"}]

View File

@ -3,7 +3,7 @@ package testing
test: { test: {
string string
#compute: [ #up: [
{ {
do: "load" do: "load"
from: [{do: "fetch-container", ref: "alpine"}] from: [{do: "fetch-container", ref: "alpine"}]

View File

@ -3,7 +3,7 @@ package testing
test: { test: {
string string
#compute: [ #up: [
{ {
do: "load" do: "load"
from: [{do: "fetch-container", ref: "alpine"}] from: [{do: "fetch-container", ref: "alpine"}]
@ -13,7 +13,7 @@ test: {
args: ["sh", "-c", """ args: ["sh", "-c", """
cat /mnt/test/lol > /out cat /mnt/test/lol > /out
"""] """]
mount: "/mnt/test": from: #compute: [ mount: "/mnt/test": from: #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -3,7 +3,7 @@ package testing
test: { test: {
string string
#compute: [ #up: [
{ {
do: "load" do: "load"
from: [{do: "fetch-container", ref: "alpine"}] from: [{do: "fetch-container", ref: "alpine"}]

View File

@ -3,7 +3,7 @@ package testing
test: { test: {
string string
#compute: [ #up: [
{ {
do: "load" do: "load"
from: [{do: "fetch-container", ref: "alpine"}] from: [{do: "fetch-container", ref: "alpine"}]

View File

@ -9,7 +9,7 @@ TestPushContainer: {
// Generate a random number // Generate a random number
random: { random: {
string string
#compute: [ #up: [
llb.#Load & {from: alpine.#Image}, llb.#Load & {from: alpine.#Image},
llb.#Exec & { llb.#Exec & {
args: ["sh", "-c", "echo -n $RANDOM > /rand"] args: ["sh", "-c", "echo -n $RANDOM > /rand"]
@ -23,7 +23,7 @@ TestPushContainer: {
// Push an image with a random tag // Push an image with a random tag
push: { push: {
ref: "daggerio/ci-test:\(random)" ref: "daggerio/ci-test:\(random)"
#compute: [ #up: [
llb.#WriteFile & { llb.#WriteFile & {
content: random content: random
dest: "/rand" dest: "/rand"
@ -35,14 +35,14 @@ TestPushContainer: {
} }
// Pull the image back // Pull the image back
pull: #compute: [ pull: #up: [
llb.#FetchContainer & { llb.#FetchContainer & {
ref: push.ref ref: push.ref
}, },
] ]
// Check the content // Check the content
check: #compute: [ check: #up: [
llb.#Load & {from: alpine.#Image}, llb.#Load & {from: alpine.#Image},
llb.#Exec & { llb.#Exec & {
args: [ args: [

View File

@ -3,7 +3,7 @@ package main
hello: { hello: {
string string
#compute: [ #up: [
{ {
do: "fetch-container" do: "fetch-container"
ref: "alpine" ref: "alpine"

View File

@ -11,7 +11,7 @@ TestImageVersion: {
version: "3.10.6" version: "3.10.6"
} }
test: #compute: [ test: #up: [
llb.#Load & {from: image}, llb.#Load & {from: image},
llb.#Exec & { llb.#Exec & {
args: [ args: [
@ -31,7 +31,7 @@ TestPackageInstall: {
package: curl: "=~7.74.0" package: curl: "=~7.74.0"
} }
test: #compute: [ test: #up: [
llb.#Load & {from: image}, llb.#Load & {from: image},
llb.#Exec & { llb.#Exec & {
args: ["jq", "--version"] args: ["jq", "--version"]

View File

@ -14,7 +14,7 @@ TestCreate: {
contents: _content contents: _content
} }
test: #compute: [ test: #up: [
llb.#Load & {from: alpine.#Image}, llb.#Load & {from: alpine.#Image},
llb.#Exec & { llb.#Exec & {
args: [ args: [
@ -37,7 +37,7 @@ TestRead: {
filename: "/etc/alpine-release" filename: "/etc/alpine-release"
from: alpine.#Image & {version: "3.10.6"} from: alpine.#Image & {version: "3.10.6"}
} }
test: #compute: [ test: #up: [
llb.#Load & {from: alpine.#Image}, llb.#Load & {from: alpine.#Image},
llb.#Exec & { llb.#Exec & {
args: [ args: [
@ -63,7 +63,7 @@ TestRead2: {
from: write from: write
} }
test: #compute: [ test: #up: [
llb.#Load & {from: alpine.#Image}, llb.#Load & {from: alpine.#Image},
llb.#Exec & { llb.#Exec & {
args: [ args: [

View File

@ -15,7 +15,7 @@ TestGoBuild: {
output: "/bin/testbin" output: "/bin/testbin"
} }
test: #compute: [ test: #up: [
llb.#Load & {from: alpine.#Image}, llb.#Load & {from: alpine.#Image},
llb.#Exec & { llb.#Exec & {
args: [ args: [

View File

@ -10,7 +10,7 @@ TestNetlify: {
// Generate a random number // Generate a random number
random: { random: {
string string
#compute: [ #up: [
llb.#Load & {from: alpine.#Image}, llb.#Load & {from: alpine.#Image},
llb.#Exec & { llb.#Exec & {
args: ["sh", "-c", "echo -n $RANDOM > /rand"] args: ["sh", "-c", "echo -n $RANDOM > /rand"]
@ -22,7 +22,7 @@ TestNetlify: {
} }
// Generate a website containing the random number // Generate a website containing the random number
html: #compute: [ html: #up: [
llb.#WriteFile & { llb.#WriteFile & {
content: random content: random
dest: "index.html" dest: "index.html"
@ -36,7 +36,7 @@ TestNetlify: {
} }
// Check if the deployed site has the random marker // Check if the deployed site has the random marker
check: #compute: [ check: #up: [
llb.#Load & { llb.#Load & {
from: alpine.#Image & { from: alpine.#Image & {
package: bash: "=~5.1" package: bash: "=~5.1"

View File

@ -14,7 +14,7 @@ TestYarn: {
source: TestData source: TestData
} }
test: #compute: [ test: #up: [
llb.#Load & {from: alpine.#Image & { llb.#Load & {from: alpine.#Image & {
package: bash: "=5.1.0-r0" package: bash: "=5.1.0-r0"
}}, }},