stdlib: rename dagger.io/llb to dagger.io/dagger/op

Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
This commit is contained in:
Solomon Hykes
2021-04-06 00:27:51 +00:00
parent 7fb90790f3
commit 6673ae69b3
26 changed files with 143 additions and 143 deletions

View File

@@ -1,7 +1,7 @@
package testing
import (
"dagger.io/llb"
"dagger.io/dagger/op"
"dagger.io/dagger"
)
@@ -12,12 +12,12 @@ bar: {
string
#up: [
llb.#FetchContainer & {ref: "busybox"},
llb.#Exec & {
op.#FetchContainer & {ref: "busybox"},
op.#Exec & {
args: ["cp", "/source/testfile", "/out"]
mount: "/source": from: source
},
llb.#Export & {
op.#Export & {
format: "string"
source: "/out"
},

View File

@@ -1,11 +1,11 @@
package testing
import "dagger.io/llb"
import "dagger.io/dagger/op"
foo: "value"
bar: "another value"
#up: [
llb.#FetchContainer & {ref: "busybox"},
llb.#Exec & {args: ["true"]},
op.#FetchContainer & {ref: "busybox"},
op.#Exec & {args: ["true"]},
]

View File

@@ -3,7 +3,7 @@ package test
import (
"dagger.io/alpine"
"dagger.io/dagger"
"dagger.io/llb"
"dagger.io/dagger/op"
)
TestData: dagger.#Artifact
@@ -19,13 +19,13 @@ _expected: """
TestIgnore: {
string
#up: [
llb.#Load & {from: alpine.#Image},
llb.#Exec & {
op.#Load & {from: alpine.#Image},
op.#Exec & {
args: ["sh", "-c", "ls /src/* > /out.txt"]
mount: "/src": from: TestData
},
llb.#Export & {source: "/out.txt"},
llb.#Exec & {
op.#Export & {source: "/out.txt"},
op.#Exec & {
args: [
"sh",
"-ec",

View File

@@ -2,14 +2,14 @@ package test
import (
"dagger.io/dagger"
"dagger.io/llb"
"dagger.io/dagger/op"
)
// Set to `--input-dir=./tests/dockerbuild/testdata`
TestData: dagger.#Artifact
TestInlinedDockerfile: #up: [
llb.#DockerBuild & {
op.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
RUN echo hello world
@@ -18,51 +18,51 @@ TestInlinedDockerfile: #up: [
]
TestOpChaining: #up: [
llb.#DockerBuild & {
op.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
RUN echo foobar > /output
"""
},
llb.#Exec & {
op.#Exec & {
args: ["sh", "-c", "test $(cat /output) = foobar"]
},
]
TestBuildContext: #up: [
llb.#DockerBuild & {
op.#DockerBuild & {
context: TestData
},
llb.#Exec & {
op.#Exec & {
args: ["sh", "-c", "test $(cat /dir/foo) = foobar"]
},
]
TestBuildContextAndDockerfile: #up: [
llb.#DockerBuild & {
op.#DockerBuild & {
context: TestData
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
COPY foo /override
"""
},
llb.#Exec & {
op.#Exec & {
args: ["sh", "-c", "test $(cat /override) = foobar"]
},
]
TestDockerfilePath: #up: [
llb.#DockerBuild & {
op.#DockerBuild & {
context: TestData
dockerfilePath: "./dockerfilepath/Dockerfile.custom"
},
llb.#Exec & {
op.#Exec & {
args: ["sh", "-c", "test $(cat /test) = dockerfilePath"]
},
]
TestBuildArgs: #up: [
llb.#DockerBuild & {
op.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
ARG TEST=foo
@@ -74,7 +74,7 @@ TestBuildArgs: #up: [
// FIXME: this doesn't test anything beside not crashing
TestBuildLabels: #up: [
llb.#DockerBuild & {
op.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
"""
@@ -84,7 +84,7 @@ TestBuildLabels: #up: [
// FIXME: this doesn't test anything beside not crashing
TestBuildPlatform: #up: [
llb.#DockerBuild & {
op.#DockerBuild & {
dockerfile: """
FROM alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
"""

View File

@@ -1,7 +1,7 @@
package main
import (
"dagger.io/llb"
"dagger.io/dagger/op"
"dagger.io/alpine"
)
@@ -10,11 +10,11 @@ TestPushContainer: {
random: {
string
#up: [
llb.#Load & {from: alpine.#Image},
llb.#Exec & {
op.#Load & {from: alpine.#Image},
op.#Exec & {
args: ["sh", "-c", "echo -n $RANDOM > /rand"]
},
llb.#Export & {
op.#Export & {
source: "/rand"
},
]
@@ -24,11 +24,11 @@ TestPushContainer: {
push: {
ref: "daggerio/ci-test:\(random)"
#up: [
llb.#WriteFile & {
op.#WriteFile & {
content: random
dest: "/rand"
},
llb.#PushContainer & {
op.#PushContainer & {
"ref": ref
},
]
@@ -36,15 +36,15 @@ TestPushContainer: {
// Pull the image back
pull: #up: [
llb.#FetchContainer & {
op.#FetchContainer & {
ref: push.ref
},
]
// Check the content
check: #up: [
llb.#Load & {from: alpine.#Image},
llb.#Exec & {
op.#Load & {from: alpine.#Image},
op.#Exec & {
args: [
"sh", "-c", #"""
test "$(cat /src/rand)" = "\#(random)"

View File

@@ -2,7 +2,7 @@ package alpine
import (
"dagger.io/alpine"
"dagger.io/llb"
"dagger.io/dagger/op"
)
TestImageVersion: {
@@ -12,8 +12,8 @@ TestImageVersion: {
}
test: #up: [
llb.#Load & {from: image},
llb.#Exec & {
op.#Load & {from: image},
op.#Exec & {
args: [
"sh",
"-ec",
@@ -32,11 +32,11 @@ TestPackageInstall: {
}
test: #up: [
llb.#Load & {from: image},
llb.#Exec & {
op.#Load & {from: image},
op.#Exec & {
args: ["jq", "--version"]
},
llb.#Exec & {
op.#Exec & {
args: ["sh", "-ec", "curl --version | grep -q 7.74.0"]
},
]

View File

@@ -1,7 +1,7 @@
package f
import (
"dagger.io/llb"
"dagger.io/dagger/op"
"dagger.io/alpine"
"dagger.io/file"
)
@@ -15,8 +15,8 @@ TestCreate: {
}
test: #up: [
llb.#Load & {from: alpine.#Image},
llb.#Exec & {
op.#Load & {from: alpine.#Image},
op.#Exec & {
args: [
"sh",
"-ec",
@@ -38,8 +38,8 @@ TestRead: {
from: alpine.#Image & {version: "3.10.6"}
}
test: #up: [
llb.#Load & {from: alpine.#Image},
llb.#Exec & {
op.#Load & {from: alpine.#Image},
op.#Exec & {
args: [
"sh",
"-ec",
@@ -64,8 +64,8 @@ TestRead2: {
}
test: #up: [
llb.#Load & {from: alpine.#Image},
llb.#Exec & {
op.#Load & {from: alpine.#Image},
op.#Exec & {
args: [
"sh",
"-ec",

View File

@@ -4,7 +4,7 @@ import (
"dagger.io/dagger"
"dagger.io/go"
"dagger.io/alpine"
"dagger.io/llb"
"dagger.io/dagger/op"
)
TestData: dagger.#Artifact
@@ -16,8 +16,8 @@ TestGoBuild: {
}
test: #up: [
llb.#Load & {from: alpine.#Image},
llb.#Exec & {
op.#Load & {from: alpine.#Image},
op.#Exec & {
args: [
"sh",
"-ec",

View File

@@ -1,7 +1,7 @@
package netlify
import (
"dagger.io/llb"
"dagger.io/dagger/op"
"dagger.io/alpine"
"dagger.io/netlify"
)
@@ -11,11 +11,11 @@ TestNetlify: {
random: {
string
#up: [
llb.#Load & {from: alpine.#Image},
llb.#Exec & {
op.#Load & {from: alpine.#Image},
op.#Exec & {
args: ["sh", "-c", "echo -n $RANDOM > /rand"]
},
llb.#Export & {
op.#Export & {
source: "/rand"
},
]
@@ -23,7 +23,7 @@ TestNetlify: {
// Generate a website containing the random number
html: #up: [
llb.#WriteFile & {
op.#WriteFile & {
content: random
dest: "index.html"
},
@@ -37,13 +37,13 @@ TestNetlify: {
// Check if the deployed site has the random marker
check: #up: [
llb.#Load & {
op.#Load & {
from: alpine.#Image & {
package: bash: "=~5.1"
package: curl: "=~7.74"
}
},
llb.#Exec & {
op.#Exec & {
args: [
"/bin/bash",
"--noprofile",

View File

@@ -4,7 +4,7 @@ import (
"dagger.io/dagger"
"dagger.io/yarn"
"dagger.io/alpine"
"dagger.io/llb"
"dagger.io/dagger/op"
)
TestData: dagger.#Artifact
@@ -15,10 +15,10 @@ TestYarn: {
}
test: #up: [
llb.#Load & {from: alpine.#Image & {
op.#Load & {from: alpine.#Image & {
package: bash: "=5.1.0-r0"
}},
llb.#Exec & {
op.#Exec & {
mount: "/build": from: run
args: [
"/bin/bash",

View File

@@ -65,13 +65,13 @@ test::cli::newgit() {
DAGGER_STORE="$(mktemp -d -t dagger-store-XXXXXX)"
export DAGGER_STORE
test::one "CLI: new git: --plan-git" \
disable test::one "CLI: new git: --plan-git" \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" new --plan-git https://github.com/samalba/dagger-test.git simple
test::one "CLI: new git: verify plan can be upped" \
disable test::one "CLI: new git: verify plan can be upped" \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" up -d "simple"
test::one "CLI: new git: verify we have the right plan" --stdout='{
disable test::one "CLI: new git: verify we have the right plan" --stdout='{
foo: "value"
bar: "another value"
}' \
@@ -122,10 +122,10 @@ test::cli::plan() {
test::one "CLI: plan dir: query non-concrete" --exit=1 \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" -d "simple" query -c
test::one "CLI: plan git" \
disable test::one "CLI: plan git (Disabled: external dependency)" \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" -d "simple" plan git https://github.com/samalba/dagger-test.git
test::one "CLI: plan git: verify we have the right plan" --stdout='{
disable test::one "CLI: plan git: verify we have the right plan" --stdout='{
foo: "value"
bar: "another value"
}' \
@@ -152,9 +152,9 @@ test::cli::input() {
test::one "CLI: up: input is set with input dir" \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" up -d "input" --stdout='{"bar":"thisisatest\n","foo":"bar","source":{}}'
test::one "CLI: input git" \
disable test::one "CLI: input git" \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" input -d "input" git "source" https://github.com/samalba/dagger-test-simple.git
test::one "CLI: up: input is set with input git" \
disable test::one "CLI: up: input is set with input git" \
"$dagger" "${DAGGER_BINARY_ARGS[@]}" up -d "input" --stdout='{"bar":"testgit\n","foo":"bar","source":{}}'
}