Merge dagger.io/dagger/engine into dagger.io/dagger

Signed-off-by: Solomon Hykes <solomon@dagger.io>
This commit is contained in:
Solomon Hykes
2022-02-16 18:37:16 +00:00
parent bf6d463833
commit c2766c265b
116 changed files with 658 additions and 750 deletions

View File

@@ -1,2 +1,4 @@
# dagger universe
alpha.dagger.io
dagger.io
universe.dagger.io

View File

@@ -1,2 +1,4 @@
# dagger universe
alpha.dagger.io
dagger.io
universe.dagger.io

View File

@@ -1,2 +1,4 @@
# dagger universe
alpha.dagger.io
dagger.io
universe.dagger.io

View File

@@ -1,11 +1,11 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
"alpha.dagger.io/os"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
sayHello: os.#Container & {
command: "echo Hello Europa! > /out.txt"

View File

@@ -1,12 +1,12 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
inputs: directories: test: path: "."
actions: verify: engine.#ReadFile & {
actions: verify: dagger.#ReadFile & {
input: inputs.directories.test.contents
path: "test.txt"
} & {

View File

@@ -1,12 +1,12 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
inputs: directories: test: path: "."
actions: verify: engine.#ReadFile & {
actions: verify: dagger.#ReadFile & {
input: inputs.directories.test.contents
path: "test.txt"
} & {

View File

@@ -1,13 +1,13 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
// should fail because path does not exist locally
inputs: directories: test: path: "./fasdfsdfs"
actions: verify: engine.#ReadFile & {
actions: verify: dagger.#ReadFile & {
input: inputs.directories.test.contents
path: "test.txt"
} & {

View File

@@ -1,10 +1,10 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
inputs: secrets: echo: command: {
name: "echo"
args: ["hello europa"]
@@ -12,11 +12,11 @@ engine.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
verify: engine.#Exec & {
verify: dagger.#Exec & {
input: image.output
mounts: secret: {
dest: "/run/secrets/test"

View File

@@ -1,10 +1,10 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
inputs: secrets: echo: command: {
name: "cat"
args: ["./test.txt"]
@@ -12,11 +12,11 @@ engine.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
verify: engine.#Exec & {
verify: dagger.#Exec & {
input: image.output
mounts: secret: {
dest: "/run/secrets/test"

View File

@@ -1,10 +1,10 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
inputs: secrets: echo: command: {
name: "rtyet" // should fail because command doesn't exist
args: ["hello europa"]
@@ -12,11 +12,11 @@ engine.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
verify: engine.#Exec & {
verify: dagger.#Exec & {
input: image.output
mounts: secret: {
dest: "/run/secrets/test"

View File

@@ -1,10 +1,9 @@
package main
import (
"dagger.io/dagger/engine"
)
engine.#Plan & {
dagger.#Plan & {
inputs: secrets: echo: command: {
name: "cat"
args: ["--sfgjkhf"] // // should fail because invalid option
@@ -12,11 +11,11 @@ engine.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
verify: engine.#Exec & {
verify: dagger.#Exec & {
input: image.output
mounts: secret: {
dest: "/run/secrets/test"

View File

@@ -1,10 +1,12 @@
package main
import "dagger.io/dagger/engine"
import (
"dagger.io/dagger"
)
engine.#Plan & {
actions: data: engine.#WriteFile & {
input: engine.#Scratch
dagger.#Plan & {
actions: data: dagger.#WriteFile & {
input: dagger.#Scratch
path: "/test"
permissions: 0o600
contents: "foobar"

View File

@@ -1,18 +1,17 @@
package main
import (
"dagger.io/dagger/engine"
)
engine.#Plan & {
dagger.#Plan & {
platform: "linux/unknown"
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0"
}
writeArch: engine.#Exec & {
writeArch: dagger.#Exec & {
input: image.output
always: true
args: [
@@ -22,7 +21,7 @@ engine.#Plan & {
]
}
verify: engine.#ReadFile & {
verify: dagger.#ReadFile & {
input: writeArch.output
path: "/arch.txt"
} & {

View File

@@ -1,18 +1,17 @@
package main
import (
"dagger.io/dagger/engine"
)
engine.#Plan & {
dagger.#Plan & {
platform: "linux/amd64"
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0"
}
writeArch: engine.#Exec & {
writeArch: dagger.#Exec & {
input: image.output
always: true
args: [
@@ -22,7 +21,7 @@ engine.#Plan & {
]
}
verify: engine.#ReadFile & {
verify: dagger.#ReadFile & {
input: writeArch.output
path: "/arch.txt"
} & {

View File

@@ -1,18 +1,17 @@
package main
import (
"dagger.io/dagger/engine"
)
engine.#Plan & {
dagger.#Plan & {
platform: "linux/arm64"
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0"
}
writeArch: engine.#Exec & {
writeArch: dagger.#Exec & {
input: image.output
always: true
args: [
@@ -22,7 +21,7 @@ engine.#Plan & {
]
}
verify: engine.#ReadFile & {
verify: dagger.#ReadFile & {
input: writeArch.output
path: "/arch.txt"
} & {

View File

@@ -1,12 +1,13 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
"alpha.dagger.io/dagger/op"
"alpha.dagger.io/alpine"
)
engine.#Plan & {
dagger.#Plan & {
// should fail due to incomplete service
proxy: dockerSocket: {}

View File

@@ -1,12 +1,11 @@
package main
import (
"dagger.io/dagger/engine"
"alpha.dagger.io/dagger/op"
"alpha.dagger.io/alpine"
)
engine.#Plan & {
dagger.#Plan & {
// should fail because incomplete value
proxy: dockerSocket: unix: string

View File

@@ -1,12 +1,11 @@
package main
import (
"dagger.io/dagger/engine"
"alpha.dagger.io/dagger/op"
"alpha.dagger.io/alpine"
)
engine.#Plan & {
dagger.#Plan & {
// should fail because of misspelled key
proxy: dockerSocket: unx: "/var/run/docker.sock"

View File

@@ -1,12 +1,11 @@
package main
import (
"dagger.io/dagger/engine"
"alpha.dagger.io/dagger/op"
"alpha.dagger.io/alpine"
)
engine.#Plan & {
dagger.#Plan & {
// should fail because of misspelled value
proxy: dockerSocket: unix: "/var/run/docker.soc"

View File

@@ -1,12 +1,12 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
"alpha.dagger.io/dagger/op"
"alpha.dagger.io/alpine"
)
engine.#Plan & {
dagger.#Plan & {
// should succeed
proxy: dockerSocket: unix: "/var/run/docker.sock"

View File

@@ -1,17 +1,17 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
verify: engine.#Exec & {
verify: dagger.#Exec & {
input: image.output
env: FOO: string
args: [

View File

@@ -1,18 +1,18 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
inputs: params: foo: string
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
verify: engine.#Exec & {
verify: dagger.#Exec & {
input: image.output
env: FOO: inputs.params.foo
args: [

View File

@@ -1,16 +1,16 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
exec: engine.#Exec & {
exec: dagger.#Exec & {
input: image.output
args: [
"sh", "-c",
@@ -20,7 +20,7 @@ engine.#Plan & {
]
}
verify_file: engine.#ReadFile & {
verify_file: dagger.#ReadFile & {
input: exec.output
path: "/output.txt"
} & {
@@ -28,14 +28,14 @@ engine.#Plan & {
contents: "hello world"
}
copy: engine.#Copy & {
copy: dagger.#Copy & {
input: image.output
contents: exec.output
source: "/output.txt"
dest: "/output.txt"
}
verify_copy: engine.#ReadFile & {
verify_copy: dagger.#ReadFile & {
input: copy.output
path: "/output.txt"
} & {

View File

@@ -1,16 +1,16 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
exec: engine.#Exec & {
exec: dagger.#Exec & {
input: image.output
args: [
"sh", "-c",
@@ -20,7 +20,7 @@ engine.#Plan & {
]
}
verify_file: engine.#ReadFile & {
verify_file: dagger.#ReadFile & {
input: exec.output
path: "/output.txt"
} & {
@@ -28,13 +28,13 @@ engine.#Plan & {
contents: "hello world from dagger"
}
copy: engine.#Copy & {
copy: dagger.#Copy & {
input: image.output
contents: exec.output
source: "/output.txt"
dest: "/output.txt"
}
verify_copy: engine.#ReadFile & {
verify_copy: dagger.#ReadFile & {
input: copy.output
path: "/output.txt"
} & {

View File

@@ -1,20 +1,20 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
alpine3_15_0: engine.#Pull & {
alpine3_15_0: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
busybox1_34_1: engine.#Pull & {
busybox1_34_1: dagger.#Pull & {
source: "busybox:1.34.1-glibc@sha256:ec98391b8f0911db08be2ee6c46813eeac17b9625b402ea1ce45dcfcd05d78d6"
}
verify_alpine_3_15_0: engine.#ReadFile & {
verify_alpine_3_15_0: dagger.#ReadFile & {
input: alpine3_15_0.output
path: "/etc/alpine-release"
} & {
@@ -22,14 +22,14 @@ engine.#Plan & {
contents: "3.15.0\n"
}
copy: engine.#Copy & {
copy: dagger.#Copy & {
input: busybox1_34_1.output
contents: alpine3_15_0.output
source: "/etc/alpine-release"
dest: "/alpine3_15_0_release"
}
verify_copy: engine.#ReadFile & {
verify_copy: dagger.#ReadFile & {
input: copy.output
path: "/alpine3_15_0_release"
} & {

View File

@@ -1,13 +1,13 @@
package testing
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
inputs: directories: testdata: path: "./testdata"
actions: build: engine.#Dockerfile & {
actions: build: dagger.#Dockerfile & {
source: inputs.directories.testdata.contents
dockerfile: contents: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d

View File

@@ -2,10 +2,9 @@ package testing
import (
"dagger.io/dagger"
"dagger.io/dagger/engine"
)
engine.#Plan & {
dagger.#Plan & {
inputs: {
directories: testdata: path: "./testdata"
secrets: sops: command: {
@@ -20,7 +19,7 @@ engine.#Plan & {
input: inputs.secrets.sops.contents
}
build: engine.#Dockerfile & {
build: dagger.#Dockerfile & {
source: inputs.directories.testdata.contents
auth: "daggerio/ci-test:private-pull": {
username: "daggertest"

View File

@@ -1,18 +1,18 @@
package testing
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
inputs: directories: testdata: path: "./testdata"
actions: {
build: engine.#Dockerfile & {
build: dagger.#Dockerfile & {
source: inputs.directories.testdata.contents
}
verify: engine.#Exec & {
verify: dagger.#Exec & {
input: build.output
args: ["sh", "-c", "test $(cat /dir/foo) = foobar"]
}

View File

@@ -1,19 +1,19 @@
package testing
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
inputs: directories: testdata: path: "./testdata"
actions: {
build: engine.#Dockerfile & {
build: dagger.#Dockerfile & {
source: inputs.directories.testdata.contents
dockerfile: path: "./dockerfilepath/Dockerfile.custom"
}
verify: engine.#Exec & {
verify: dagger.#Exec & {
input: build.output
args: ["sh", "-c", "test $(cat /test) = dockerfilePath"]
}

View File

@@ -1,15 +1,15 @@
package testing
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
inputs: directories: testdata: path: "./testdata"
actions: {
// FIXME: this doesn't test anything beside not crashing
build: engine.#Dockerfile & {
build: dagger.#Dockerfile & {
source: inputs.directories.testdata.contents
dockerfile: contents: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d

View File

@@ -1,14 +1,14 @@
package testing
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
inputs: directories: testdata: path: "./testdata"
actions: {
build: engine.#Dockerfile & {
build: dagger.#Dockerfile & {
source: inputs.directories.testdata.contents
dockerfile: contents: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
@@ -16,7 +16,7 @@ engine.#Plan & {
"""
}
verify: engine.#Exec & {
verify: dagger.#Exec & {
input: build.output
args: ["sh", "-c", "test $(cat /output) = foobar"]
}

View File

@@ -1,14 +1,14 @@
package testing
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
inputs: directories: testdata: path: "./testdata"
actions: {
build: engine.#Dockerfile & {
build: dagger.#Dockerfile & {
source: inputs.directories.testdata.contents
dockerfile: contents: """
# syntax = docker/dockerfile:1.3
@@ -17,7 +17,7 @@ engine.#Plan & {
"""
}
verify: engine.#Exec & {
verify: dagger.#Exec & {
input: build.output
args: ["sh", "-c", "test $(cat /output) = foobar"]
}

View File

@@ -1,15 +1,15 @@
package testing
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
inputs: directories: testdata: path: "./testdata"
actions: {
// FIXME: this doesn't test anything beside not crashing
build: engine.#Dockerfile & {
build: dagger.#Dockerfile & {
source: inputs.directories.testdata.contents
dockerfile: contents: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d

View File

@@ -1,15 +1,15 @@
package testing
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
inputs: directories: testdata: path: "./testdata"
actions: {
// FIXME: this doesn't test anything beside not crashing
build: engine.#Dockerfile & {
build: dagger.#Dockerfile & {
source: inputs.directories.testdata.contents
dockerfile: contents: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d

View File

@@ -1,21 +1,21 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
exec: engine.#Exec & {
exec: dagger.#Exec & {
input: image.output
args: ["sh", "-c", "echo -n hello world > /output.txt"]
}
verify: engine.#ReadFile & {
verify: dagger.#ReadFile & {
input: exec.output
path: "/output.txt"
} & {

View File

@@ -1,16 +1,16 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
verify: engine.#Exec & {
verify: dagger.#Exec & {
input: image.output
env: TEST: "hello world"
args: [

View File

@@ -1,17 +1,17 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
inputs: secrets: testSecret: path: "secret.txt"
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
verify: engine.#Exec & {
verify: dagger.#Exec & {
input: image.output
env: TEST: inputs.secrets.testSecret.contents
args: [

View File

@@ -1,16 +1,16 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
verify: engine.#Exec & {
verify: dagger.#Exec & {
input: image.output
hosts: "unit.test": "1.2.3.4"
args: [

View File

@@ -1,20 +1,20 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
sharedCache: engine.#CacheDir & {
sharedCache: dagger.#CacheDir & {
id: "mycache"
}
exec: engine.#Exec & {
exec: dagger.#Exec & {
input: image.output
mounts: cache: {
dest: "/cache"
@@ -28,7 +28,7 @@ engine.#Plan & {
]
}
verify: engine.#Exec & {
verify: dagger.#Exec & {
input: image.output
mounts: cache: {
dest: "/cache"
@@ -43,10 +43,10 @@ engine.#Plan & {
]
}
otherCache: engine.#CacheDir & {
otherCache: dagger.#CacheDir & {
id: "othercache"
}
verifyOtherCache: engine.#Exec & {
verifyOtherCache: dagger.#Exec & {
input: image.output
mounts: cache: {
dest: "/cache"

View File

@@ -1,16 +1,16 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
exec: engine.#Exec & {
exec: dagger.#Exec & {
input: image.output
args: [
"sh", "-c",
@@ -20,7 +20,7 @@ engine.#Plan & {
]
}
verify: engine.#Exec & {
verify: dagger.#Exec & {
input: image.output
mounts: fs: {
dest: "/target"
@@ -35,7 +35,7 @@ engine.#Plan & {
]
}
verifyRO: engine.#Exec & {
verifyRO: dagger.#Exec & {
input: image.output
mounts: fs: {
dest: "/target"
@@ -53,7 +53,7 @@ engine.#Plan & {
]
}
verifySource: engine.#Exec & {
verifySource: dagger.#Exec & {
input: image.output
mounts: fs: {
dest: "/target.txt"

View File

@@ -1,17 +1,17 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
inputs: secrets: testSecret: envvar: "TESTSECRET"
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
verify: engine.#Exec & {
verify: dagger.#Exec & {
input: image.output
mounts: secret: {
dest: "/run/secrets/test"
@@ -26,7 +26,7 @@ engine.#Plan & {
]
}
verifyPerm: engine.#Exec & {
verifyPerm: dagger.#Exec & {
input: image.output
mounts: secret: {
dest: "/run/secrets/test"

View File

@@ -1,23 +1,23 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
proxy: dockerSocket: unix: "/var/run/docker.sock"
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
imageWithDocker: engine.#Exec & {
imageWithDocker: dagger.#Exec & {
input: image.output
args: ["apk", "add", "--no-cache", "docker-cli"]
}
verify: engine.#Exec & {
verify: dagger.#Exec & {
input: imageWithDocker.output
mounts: docker: {
dest: "/var/run/docker.sock"

View File

@@ -1,20 +1,20 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
exec: engine.#Exec & {
exec: dagger.#Exec & {
input: image.output
mounts: temp: {
dest: "/temp"
contents: engine.#TempDir
contents: dagger.#TempDir
}
args: [
"sh", "-c",
@@ -24,7 +24,7 @@ engine.#Plan & {
]
}
verify: engine.#Exec & {
verify: dagger.#Exec & {
input: exec.output
args: [
"sh", "-c",

View File

@@ -1,21 +1,21 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
addUser: engine.#Exec & {
addUser: dagger.#Exec & {
input: image.output
args: ["adduser", "-D", "test"]
}
verifyUsername: engine.#Exec & {
verifyUsername: dagger.#Exec & {
input: addUser.output
user: "test"
args: [
@@ -26,7 +26,7 @@ engine.#Plan & {
]
}
verifyUserID: engine.#Exec & {
verifyUserID: dagger.#Exec & {
input: addUser.output
user: "1000"
args: [

View File

@@ -1,16 +1,16 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
verify: engine.#Exec & {
verify: dagger.#Exec & {
input: image.output
workdir: "/tmp"
args: [

View File

@@ -1,9 +1,11 @@
package main
import "dagger.io/dagger/engine"
import (
"dagger.io/dagger"
)
engine.#Plan & {
actions: badref: engine.#GitPull & {
dagger.#Plan & {
actions: badref: dagger.#GitPull & {
remote: "https://github.com/blocklayerhq/acme-clothing.git"
ref: "lalalalal"
}

View File

@@ -1,9 +1,11 @@
package main
import "dagger.io/dagger/engine"
import (
"dagger.io/dagger"
)
engine.#Plan & {
actions: badremote: engine.#GitPull & {
dagger.#Plan & {
actions: badremote: dagger.#GitPull & {
remote: "https://github.com/blocklayerhq/lalalala.git"
ref: "master"
}

View File

@@ -1,9 +1,11 @@
package main
import "dagger.io/dagger/engine"
import (
"dagger.io/dagger"
)
engine.#Plan & {
actions: gitPull: engine.#GitPull & {
dagger.#Plan & {
actions: gitPull: dagger.#GitPull & {
remote: "https://github.com/blocklayerhq/acme-clothing.git"
ref: "master"
}

View File

@@ -1,25 +1,27 @@
package testing
import "dagger.io/dagger/engine"
import (
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
repo1: engine.#GitPull & {
repo1: dagger.#GitPull & {
remote: "https://github.com/blocklayerhq/acme-clothing.git"
ref: "master"
}
repo2: engine.#GitPull & {
repo2: dagger.#GitPull & {
remote: "https://github.com/blocklayerhq/acme-clothing.git"
ref: "master"
keepGitDir: true
}
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0"
}
verify: engine.#Exec & {
verify: dagger.#Exec & {
input: image.output
args: ["sh", "-c", """
set -eu

View File

@@ -1,7 +1,9 @@
package main
import "dagger.io/dagger/engine"
import (
"dagger.io/dagger"
)
engine.#Plan & {
actions: invalid: engine.#GitPull & {}
dagger.#Plan & {
actions: invalid: dagger.#GitPull & {}
}

View File

@@ -2,10 +2,9 @@ package main
import (
"dagger.io/dagger"
"dagger.io/dagger/engine"
)
engine.#Plan & {
dagger.#Plan & {
inputs: secrets: sops: command: {
name: "sops"
args: ["-d", "../../secrets_sops.yaml"]
@@ -13,7 +12,7 @@ engine.#Plan & {
actions: {
alpine: engine.#Pull & {
alpine: dagger.#Pull & {
source: "alpine:3.15.0"
}
@@ -22,7 +21,7 @@ engine.#Plan & {
input: inputs.secrets.sops.contents
}
testRepo: engine.#GitPull & {
testRepo: dagger.#GitPull & {
remote: "https://github.com/dagger/dagger.git"
ref: "main"
auth: {
@@ -31,7 +30,7 @@ engine.#Plan & {
}
}
testContent: engine.#Exec & {
testContent: dagger.#Exec & {
input: alpine.output
always: true
args: ["ls", "-l", "/repo/README.md"]

View File

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

View File

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

View File

@@ -1,9 +1,11 @@
package main
import "dagger.io/dagger/engine"
import (
"dagger.io/dagger"
)
engine.#Plan & {
actions: fetch: engine.#HTTPFetch & {
dagger.#Plan & {
actions: fetch: dagger.#HTTPFetch & {
source: "https://releases.dagger.io/dagger/latest_version"
dest: "/latest.html"
}

View File

@@ -1,9 +1,11 @@
package main
import "dagger.io/dagger/engine"
import (
"dagger.io/dagger"
)
engine.#Plan & {
actions: fetch: engine.#HTTPFetch & {
dagger.#Plan & {
actions: fetch: dagger.#HTTPFetch & {
source: "https://releases.dagger.io/dagger/asfgdsfg"
dest: "/latest.html"
}

View File

@@ -1,28 +1,28 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
mkdir: engine.#Mkdir & {
mkdir: dagger.#Mkdir & {
input: image.output
path: "/test"
}
writeChecker: engine.#WriteFile & {
writeChecker: dagger.#WriteFile & {
input: mkdir.output
path: "/test/foo"
contents: "bar"
permissions: 700
}
readChecker: engine.#ReadFile & {
readChecker: dagger.#ReadFile & {
input: writeChecker.output
path: "/test/foo"
} & {

View File

@@ -1,29 +1,29 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
mkdir: engine.#Mkdir & {
mkdir: dagger.#Mkdir & {
input: image.output
path: "/test/baz"
parents: false
}
writeChecker: engine.#WriteFile & {
writeChecker: dagger.#WriteFile & {
input: mkdir.output
path: "/test/baz/foo"
contents: "bar"
permissions: 700
}
readChecker: engine.#ReadFile & {
readChecker: dagger.#ReadFile & {
input: writeChecker.output
path: "/test/baz/foo"
} & {

View File

@@ -1,28 +1,28 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
mkdir: engine.#Mkdir & {
mkdir: dagger.#Mkdir & {
input: image.output
path: "/test/baz"
}
writeChecker: engine.#WriteFile & {
writeChecker: dagger.#WriteFile & {
input: mkdir.output
path: "/test/baz/foo"
contents: "bar"
permissions: 700
}
readChecker: engine.#ReadFile & {
readChecker: dagger.#ReadFile & {
input: writeChecker.output
path: "/test/baz/foo"
} & {

View File

@@ -1,26 +1,26 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
generate: engine.#Exec & {
generate: dagger.#Exec & {
input: image.output
args: ["sh", "-c", "echo test > /secret"]
}
load: engine.#NewSecret & {
load: dagger.#NewSecret & {
input: generate.output
path: "/secret"
}
verify: engine.#Exec & {
verify: dagger.#Exec & {
input: image.output
mounts: secret: {
dest: "/run/secrets/test"

View File

@@ -1,11 +1,11 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
actions: pull: engine.#Pull & {
dagger.#Plan & {
actions: pull: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
} & {
// assert result

View File

@@ -2,10 +2,9 @@ package main
import (
"dagger.io/dagger"
"dagger.io/dagger/engine"
)
engine.#Plan & {
dagger.#Plan & {
inputs: secrets: sops: command: {
name: "sops"
args: ["-d", "../../secrets_sops.yaml"]
@@ -17,7 +16,7 @@ engine.#Plan & {
input: inputs.secrets.sops.contents
}
pull: engine.#Pull & {
pull: dagger.#Pull & {
source: "daggerio/ci-test:private-pull@sha256:c74f1b1166784193ea6c8f9440263b9be6cae07dfe35e32a5df7a31358ac2060"
auth: {
username: "daggertest"

View File

@@ -3,10 +3,9 @@ package main
import (
"strings"
"dagger.io/dagger"
"dagger.io/dagger/engine"
)
engine.#Plan & {
dagger.#Plan & {
inputs: secrets: sops: command: {
name: "sops"
args: ["-d", "../../secrets_sops.yaml"]
@@ -25,18 +24,18 @@ engine.#Plan & {
}
randomString: {
baseImage: engine.#Pull & {
baseImage: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
image: engine.#Exec & {
image: dagger.#Exec & {
input: baseImage.output
args: [
"sh", "-c", "echo -n $RANDOM > /output.txt",
]
}
outputFile: engine.#ReadFile & {
outputFile: dagger.#ReadFile & {
input: image.output
path: "/output.txt"
}
@@ -45,7 +44,7 @@ engine.#Plan & {
}
// Push image with random content
push: engine.#Push & {
push: dagger.#Push & {
dest: "daggerio/ci-test:\(randomString.output)"
input: randomString.image.output
config: env: FOO: randomString.output
@@ -53,7 +52,7 @@ engine.#Plan & {
}
// Pull same image and check the content
pull: engine.#Pull & {
pull: dagger.#Pull & {
source: "daggerio/ci-test:\(randomString.output)"
auth: #auth
} & {
@@ -63,7 +62,7 @@ engine.#Plan & {
config: env: FOO: randomString.output
}
pullOutputFile: engine.#ReadFile & {
pullOutputFile: dagger.#ReadFile & {
input: pull.output
path: "/output.txt"
}

View File

@@ -1,16 +1,16 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
readfile: engine.#ReadFile & {
readfile: dagger.#ReadFile & {
input: image.output
path: "/etc/alpine-release"
} & {

View File

@@ -1,20 +1,20 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
exec: engine.#Exec & {
exec: dagger.#Exec & {
input: image.output
mounts: fs: {
dest: "/scratch"
contents: engine.#Scratch
contents: dagger.#Scratch
}
workdir: "/"
args: [

View File

@@ -1,14 +1,14 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
actions: build: engine.#Build & {
source: engine.#Scratch
dagger.#Plan & {
actions: build: dagger.#Build & {
source: dagger.#Scratch
dockerfile: contents: "FROM scratch"
// Assert that output is engine.#Scratch
output: engine.#Scratch
// Assert that output is dagger.#Scratch
output: dagger.#Scratch
}
}

View File

@@ -1,18 +1,18 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
write: engine.#WriteFile & {
input: engine.#Scratch
write: dagger.#WriteFile & {
input: dagger.#Scratch
path: "/testing"
contents: "1,2,3"
permissions: 700
}
readfile: engine.#ReadFile & {
readfile: dagger.#ReadFile & {
input: write.output
path: "/testing"
} & {

View File

@@ -1,20 +1,20 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
source: engine.#Source & {
source: dagger.#Source & {
path: "."
}
exec: engine.#Exec & {
exec: dagger.#Exec & {
input: image.output
mounts: code: {
dest: "/src"
@@ -23,7 +23,7 @@ engine.#Plan & {
args: ["/src/test.sh"]
}
verifyHello: engine.#ReadFile & {
verifyHello: dagger.#ReadFile & {
input: source.output
path: "/world.txt"
} & {
@@ -31,7 +31,7 @@ engine.#Plan & {
contents: "world\n"
}
verifyWorld: engine.#ReadFile & {
verifyWorld: dagger.#ReadFile & {
input: exec.output
path: "/test.txt"
} & {

View File

@@ -1,26 +1,26 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
sourceInclude: engine.#Source & {
sourceInclude: dagger.#Source & {
path: "."
include: ["hello.txt"]
}
sourceExclude: engine.#Source & {
sourceExclude: dagger.#Source & {
path: "."
exclude: ["hello.txt"]
}
test: engine.#Exec & {
test: dagger.#Exec & {
input: image.output
mounts: {
include: {

View File

@@ -1,16 +1,16 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
source: engine.#Source & {
source: dagger.#Source & {
path: "testdata/../.."
}
}

View File

@@ -1,16 +1,15 @@
package main
import (
"dagger.io/dagger/engine"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
source: engine.#Source & {
source: dagger.#Source & {
path: "not/exist"
}
}

View File

@@ -1,20 +1,20 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
source: engine.#Source & {
source: dagger.#Source & {
path: "./testdata"
}
verifyHello: engine.#ReadFile & {
verifyHello: dagger.#ReadFile & {
input: source.output
path: "/world.txt"
} & {

View File

@@ -1,22 +1,21 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
mkdir: engine.#Mkdir & {
mkdir: dagger.#Mkdir & {
input: image.output
path: "/test/foo"
}
writeChecker: engine.#WriteFile & {
writeChecker: dagger.#WriteFile & {
input: mkdir.output
path: "/test/foo/hello"
contents: "world"
@@ -28,7 +27,7 @@ engine.#Plan & {
path: "/test/foo"
}
verify: engine.#Exec & {
verify: dagger.#Exec & {
input: subdir.output
args: [
"sh", "-c",

View File

@@ -1,22 +1,21 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
mkdir: engine.#Mkdir & {
mkdir: dagger.#Mkdir & {
input: image.output
path: "/test/foo"
}
writeChecker: engine.#WriteFile & {
writeChecker: dagger.#WriteFile & {
input: mkdir.output
path: "/test/foo/hello"
contents: "world"
@@ -28,7 +27,7 @@ engine.#Plan & {
path: "/directorynotfound"
}
verify: engine.#Exec & {
verify: dagger.#Exec & {
input: image.output
mounts: fs: {
dest: "/target"

View File

@@ -1,22 +1,21 @@
package main
import (
"dagger.io/dagger/engine"
"dagger.io/dagger"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
image: engine.#Pull & {
image: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
mkdir: engine.#Mkdir & {
mkdir: dagger.#Mkdir & {
input: image.output
path: "/test/foo"
}
writeChecker: engine.#WriteFile & {
writeChecker: dagger.#WriteFile & {
input: mkdir.output
path: "/test/foo/hello"
contents: "world"
@@ -28,7 +27,7 @@ engine.#Plan & {
path: "/test/foo"
}
verify: engine.#ReadFile & {
verify: dagger.#ReadFile & {
input: subdir.output
path: "/hello"
} & {

View File

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

View File

@@ -1,21 +1,20 @@
package main
import (
"dagger.io/dagger/engine"
)
engine.#Plan & {
dagger.#Plan & {
actions: {
pull: engine.#Pull & {
pull: dagger.#Pull & {
source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3"
}
write: engine.#WriteFile & {
write: dagger.#WriteFile & {
input: pull.output
path: "/testing"
contents: "1,2,3,4"
permissions: 700
}
readfile: engine.#ReadFile & {
readfile: dagger.#ReadFile & {
input: write.output
path: "/testing"
} & {