From 6673ae69b3cd246c718be3c13e4a4455983ae0c7 Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Tue, 6 Apr 2021 00:27:51 +0000 Subject: [PATCH] stdlib: rename dagger.io/llb to dagger.io/dagger/op Signed-off-by: Solomon Hykes --- docker.cue | 18 +++++++------- stdlib/alpine/alpine.cue | 8 +++--- stdlib/aws/aws.cue | 4 +-- stdlib/aws/cloudformation/cloudformation.cue | 12 ++++----- stdlib/aws/eks/eks.cue | 10 ++++---- stdlib/dagger/dagger.cue | 4 +-- stdlib/{llb/llb.cue => dagger/op/op.cue} | 4 +-- stdlib/docker/docker.cue | 12 ++++----- stdlib/file/file.cue | 16 ++++++------ stdlib/git/git.cue | 4 +-- stdlib/go/go.cue | 8 +++--- stdlib/kubernetes/helm/helm.cue | 16 ++++++------ stdlib/kubernetes/kubernetes.cue | 18 +++++++------- stdlib/netlify/netlify.cue | 10 ++++---- stdlib/yarn/yarn.cue | 8 +++--- tests/cli/input/main.cue | 8 +++--- tests/cli/simple/main.cue | 6 ++--- tests/compute/ignore/main.cue | 10 ++++---- tests/llb/dockerbuild/main.cue | 26 ++++++++++---------- tests/llb/push-container/main.cue | 18 +++++++------- tests/stdlib/alpine/alpine.cue | 12 ++++----- tests/stdlib/file/file.cue | 14 +++++------ tests/stdlib/go/go.cue | 6 ++--- tests/stdlib/netlify/netlify.cue | 14 +++++------ tests/stdlib/yarn/yarn.cue | 6 ++--- tests/test-cli.sh | 14 +++++------ 26 files changed, 143 insertions(+), 143 deletions(-) rename stdlib/{llb/llb.cue => dagger/op/op.cue} (95%) diff --git a/docker.cue b/docker.cue index 596a76e0..424241d8 100644 --- a/docker.cue +++ b/docker.cue @@ -2,14 +2,14 @@ package main import ( "dagger.io/dagger" - "dagger.io/llb" + "dagger.io/dagger/op" ) #ImageFromSource: { source: dagger.#Artifact #up: [ - llb.#DockerBuild & { + op.#DockerBuild & { context: source }, ] @@ -19,7 +19,7 @@ import ( ref: string #up: [ - llb.#FetchContainer & { + op.#FetchContainer & { "ref": ref }, ] @@ -30,7 +30,7 @@ import ( context: dagger.#Artifact #up: [ - llb.#DockerBuild & { + op.#DockerBuild & { "context": context "dockerfile": dockerfile }, @@ -74,10 +74,10 @@ import ( // Execute each command in a pristine filesystem state // (commands do not interfere with each other's changes) #up: [ - llb.#Load & {from: image}, + op.#Load & {from: image}, // Copy volumes with type=copy for _, v in volume if v.type == "copy" { - llb.#Copy & { + op.#Copy & { from: v.from dest: v.dest src: v.source @@ -85,12 +85,12 @@ import ( }, // Execute setup script if setup != null { - llb.#Exec & { + op.#Exec & { "env": env args: ["/bin/sh", "-c", setup] } }, - llb.#Exec & { + op.#Exec & { "args": args "env": env "dir": dir @@ -110,7 +110,7 @@ import ( } } }, - llb.#Subdir & { + op.#Subdir & { dir: outputDir }, ] diff --git a/stdlib/alpine/alpine.cue b/stdlib/alpine/alpine.cue index e9489898..29094070 100644 --- a/stdlib/alpine/alpine.cue +++ b/stdlib/alpine/alpine.cue @@ -1,7 +1,7 @@ package alpine import ( - "dagger.io/llb" + "dagger.io/dagger/op" ) let defaultVersion = "3.13.2@sha256:a75afd8b57e7f34e4dad8d65e2c7ba2e1975c795ce1ee22fa34f8cf46f96a3be" @@ -11,17 +11,17 @@ let defaultVersion = "3.13.2@sha256:a75afd8b57e7f34e4dad8d65e2c7ba2e1975c795ce1e version: string | *defaultVersion #up: [ - llb.#FetchContainer & { + op.#FetchContainer & { ref: "index.docker.io/alpine:\(version)" }, for pkg, info in package { if (info & true) != _|_ { - llb.#Exec & { + op.#Exec & { args: ["apk", "add", "-U", "--no-cache", pkg] } } if (info & string) != _|_ { - llb.#Exec & { + op.#Exec & { args: ["apk", "add", "-U", "--no-cache", "\(pkg)\(info)"] } } diff --git a/stdlib/aws/aws.cue b/stdlib/aws/aws.cue index 829eceeb..12ed1b1b 100644 --- a/stdlib/aws/aws.cue +++ b/stdlib/aws/aws.cue @@ -2,7 +2,7 @@ package aws import ( "dagger.io/dagger" - "dagger.io/llb" + "dagger.io/dagger/op" "dagger.io/alpine" ) @@ -19,7 +19,7 @@ import ( // Re-usable aws-cli component #CLI: { #up: [ - llb.#Load & { + op.#Load & { from: alpine.#Image & { package: bash: "=5.1.0-r0" package: jq: "=1.6-r1" diff --git a/stdlib/aws/cloudformation/cloudformation.cue b/stdlib/aws/cloudformation/cloudformation.cue index e5dc1fc1..3fedd398 100644 --- a/stdlib/aws/cloudformation/cloudformation.cue +++ b/stdlib/aws/cloudformation/cloudformation.cue @@ -3,7 +3,7 @@ package cloudformation import ( "encoding/json" - "dagger.io/llb" + "dagger.io/dagger/op" "dagger.io/aws" ) @@ -47,19 +47,19 @@ import ( outputs: [string]: string outputs: #up: [ - llb.#Load & { + op.#Load & { from: aws.#CLI }, - llb.#Mkdir & { + op.#Mkdir & { path: "/src" }, for dest, content in #files { - llb.#WriteFile & { + op.#WriteFile & { "dest": dest "content": content } }, - llb.#Exec & { + op.#Exec & { args: [ "/bin/bash", "--noprofile", @@ -86,7 +86,7 @@ import ( dir: "/src" mount: "/cache/aws": "cache" }, - llb.#Export & { + op.#Export & { source: "/outputs.json" format: "json" }, diff --git a/stdlib/aws/eks/eks.cue b/stdlib/aws/eks/eks.cue index 64c8a476..cd94428d 100644 --- a/stdlib/aws/eks/eks.cue +++ b/stdlib/aws/eks/eks.cue @@ -2,7 +2,7 @@ package eks import ( "dagger.io/dagger" - "dagger.io/llb" + "dagger.io/dagger/op" "dagger.io/aws" ) @@ -22,14 +22,14 @@ import ( dagger.#Secret #up: [ - llb.#Load & { + op.#Load & { from: aws.#CLI }, - llb.#WriteFile & { + op.#WriteFile & { dest: "/entrypoint.sh" content: #Code }, - llb.#Exec & { + op.#Exec & { always: true args: [ "/bin/bash", @@ -55,7 +55,7 @@ import ( "/cache/bin": "cache" } }, - llb.#Export & { + op.#Export & { source: "/kubeconfig" format: "string" }, diff --git a/stdlib/dagger/dagger.cue b/stdlib/dagger/dagger.cue index 320fdbf7..b6c141df 100644 --- a/stdlib/dagger/dagger.cue +++ b/stdlib/dagger/dagger.cue @@ -1,13 +1,13 @@ package dagger import ( - "dagger.io/llb" + "dagger.io/dagger/op" ) // An artifact such as source code checkout, container image, binary archive... // May be passed as user input, or computed by a buildkit pipeline #Artifact: { - #up: [...llb.#Op] + #up: [...op.#Op] _ ... } diff --git a/stdlib/llb/llb.cue b/stdlib/dagger/op/op.cue similarity index 95% rename from stdlib/llb/llb.cue rename to stdlib/dagger/op/op.cue index ea077a3c..6a30148f 100644 --- a/stdlib/llb/llb.cue +++ b/stdlib/dagger/op/op.cue @@ -1,5 +1,5 @@ -// llb: compile LLB graphs executable by buildkit -package llb +// op: low-level operations for Dagger processing pipelines +package op // One operation in a pipeline #Op: #Export | diff --git a/stdlib/docker/docker.cue b/stdlib/docker/docker.cue index 58f22cd9..6e3b94a1 100644 --- a/stdlib/docker/docker.cue +++ b/stdlib/docker/docker.cue @@ -2,7 +2,7 @@ package docker import ( "dagger.io/dagger" - "dagger.io/llb" + "dagger.io/dagger/op" ) #Ref: string @@ -12,7 +12,7 @@ import ( source: dagger.#Artifact image: #up: [ - llb.#DockerBuild & {context: source}, + op.#DockerBuild & {context: source}, ] } @@ -23,15 +23,15 @@ import ( { image: #Ref out: #up: [ - llb.#FetchContainer & {ref: image}, - llb.#Exec & {"args": args}, + op.#FetchContainer & {ref: image}, + op.#Exec & {"args": args}, ] } | { image: _ out: #up: [ - llb.#Load & {from: image}, - llb.#Exec & {"args": args}, + op.#Load & {from: image}, + op.#Exec & {"args": args}, ] } } diff --git a/stdlib/file/file.cue b/stdlib/file/file.cue index efa00027..1307da17 100644 --- a/stdlib/file/file.cue +++ b/stdlib/file/file.cue @@ -3,7 +3,7 @@ package file import ( "strings" "dagger.io/dagger" - "dagger.io/llb" + "dagger.io/dagger/op" ) #Create: { @@ -12,7 +12,7 @@ import ( contents: string | bytes #up: [ - llb.#WriteFile & {dest: filename, content: contents, mode: permissions}, + op.#WriteFile & {dest: filename, content: contents, mode: permissions}, ] } @@ -25,7 +25,7 @@ import ( orig: (#read & {path: filename, "from": from}).data #up: [ - llb.#WriteFile & {dest: filename, content: "\(orig)\(contents)", mode: permissions}, + op.#WriteFile & {dest: filename, content: "\(orig)\(contents)", mode: permissions}, ] } @@ -41,8 +41,8 @@ import ( data: { string #up: [ - llb.#Load & {"from": from}, - llb.#Export & {source: path}, + op.#Load & {"from": from}, + op.#Export & {source: path}, ] } } @@ -63,11 +63,11 @@ _#glob: { string _tmppath: "/tmp/ls.out" #up: [ - llb.#Load & {"from": from}, - llb.#Exec & { + op.#Load & {"from": from}, + op.#Exec & { args: ["sh", "-c", "ls \(glob) > \(_tmppath)"] }, - llb.#Export & {source: _tmppath}, + op.#Export & {source: _tmppath}, ] } } diff --git a/stdlib/git/git.cue b/stdlib/git/git.cue index b7c716d9..6babaacc 100644 --- a/stdlib/git/git.cue +++ b/stdlib/git/git.cue @@ -1,7 +1,7 @@ package git import ( - "dagger.io/llb" + "dagger.io/dagger/op" ) // A git repository @@ -11,7 +11,7 @@ import ( ref: string #up: [ - llb.#FetchGit & { + op.#FetchGit & { "remote": remote "ref": ref }, diff --git a/stdlib/go/go.cue b/stdlib/go/go.cue index f1afce9a..4129c9a5 100644 --- a/stdlib/go/go.cue +++ b/stdlib/go/go.cue @@ -2,7 +2,7 @@ package go import ( "dagger.io/dagger" - "dagger.io/llb" + "dagger.io/dagger/op" ) #Go: { @@ -19,10 +19,10 @@ import ( env: [string]: string #up: [ - llb.#FetchContainer & { + op.#FetchContainer & { ref: "docker.io/golang:\(version)-alpine" }, - llb.#Exec & { + op.#Exec & { "args": ["go"] + args "env": env @@ -65,7 +65,7 @@ import ( env: [string]: string #up: [ - llb.#Copy & { + op.#Copy & { from: #Go & { "version": version "source": source diff --git a/stdlib/kubernetes/helm/helm.cue b/stdlib/kubernetes/helm/helm.cue index 0586f2aa..d667f656 100644 --- a/stdlib/kubernetes/helm/helm.cue +++ b/stdlib/kubernetes/helm/helm.cue @@ -4,7 +4,7 @@ import ( "strconv" "dagger.io/dagger" - "dagger.io/llb" + "dagger.io/dagger/op" "dagger.io/kubernetes" ) @@ -51,12 +51,12 @@ import ( kubectlVersion: *"v1.19.9" | string #up: [ - llb.#Load & { + op.#Load & { from: kubernetes.#Kubectl & { version: kubectlVersion } }, - llb.#Exec & { + op.#Exec & { env: HELM_VERSION: version args: [ "/bin/bash", @@ -74,25 +74,25 @@ import ( """#, ] }, - llb.#Mkdir & { + op.#Mkdir & { path: "/helm" }, - llb.#WriteFile & { + op.#WriteFile & { dest: "/entrypoint.sh" content: #code }, - llb.#WriteFile & { + op.#WriteFile & { dest: "/kubeconfig" content: kubeconfig mode: 0o600 }, if (chart & string) != _|_ { - llb.#WriteFile & { + op.#WriteFile & { dest: "/helm/chart" content: chart } }, - llb.#Exec & { + op.#Exec & { always: true args: [ "/bin/bash", diff --git a/stdlib/kubernetes/kubernetes.cue b/stdlib/kubernetes/kubernetes.cue index bf5edee2..de74da22 100644 --- a/stdlib/kubernetes/kubernetes.cue +++ b/stdlib/kubernetes/kubernetes.cue @@ -1,7 +1,7 @@ package kubernetes import ( - "dagger.io/llb" + "dagger.io/dagger/op" "dagger.io/dagger" "dagger.io/alpine" ) @@ -18,18 +18,18 @@ import ( """# #up: [ - llb.#Load & { + op.#Load & { from: alpine.#Image & { package: bash: "=5.1.0-r0" package: jq: "=1.6-r1" package: curl: "=7.74.0-r1" } }, - llb.#WriteFile & { + op.#WriteFile & { dest: "/entrypoint.sh" content: #code }, - llb.#Exec & { + op.#Exec & { args: [ "/bin/bash", "--noprofile", @@ -63,25 +63,25 @@ import ( """# #up: [ - llb.#Load & { + op.#Load & { from: #Kubectl & {"version": version} }, - llb.#WriteFile & { + op.#WriteFile & { dest: "/entrypoint.sh" content: #code }, - llb.#WriteFile & { + op.#WriteFile & { dest: "/kubeconfig" content: kubeconfig mode: 0o600 }, if (source & string) != _|_ { - llb.#WriteFile & { + op.#WriteFile & { dest: "/source" content: source } }, - llb.#Exec & { + op.#Exec & { always: true args: [ "/bin/bash", diff --git a/stdlib/netlify/netlify.cue b/stdlib/netlify/netlify.cue index 6a105d39..a325ae3d 100644 --- a/stdlib/netlify/netlify.cue +++ b/stdlib/netlify/netlify.cue @@ -3,7 +3,7 @@ package netlify import ( "dagger.io/dagger" "dagger.io/alpine" - "dagger.io/llb" + "dagger.io/dagger/op" ) // A Netlify account @@ -43,7 +43,7 @@ import ( logsUrl: string #up: [ - llb.#Load & { + op.#Load & { from: alpine.#Image & { package: bash: "=~5.1" package: jq: "=~1.6" @@ -51,10 +51,10 @@ import ( package: yarn: "=~1.22" } }, - llb.#Exec & { + op.#Exec & { args: ["yarn", "global", "add", "netlify-cli@2.47.0"] }, - llb.#Exec & { + op.#Exec & { args: [ "/bin/bash", "--noprofile", @@ -78,7 +78,7 @@ import ( dir: "/src" mount: "/src": from: contents }, - llb.#Export & { + op.#Export & { source: "/output.json" format: "json" }, diff --git a/stdlib/yarn/yarn.cue b/stdlib/yarn/yarn.cue index dc84724f..66481d8e 100644 --- a/stdlib/yarn/yarn.cue +++ b/stdlib/yarn/yarn.cue @@ -3,7 +3,7 @@ package yarn import ( "dagger.io/dagger" "dagger.io/alpine" - "dagger.io/llb" + "dagger.io/dagger/op" ) // Yarn Script @@ -22,13 +22,13 @@ import ( env?: [string]: string #up: [ - llb.#Load & { + op.#Load & { from: alpine.#Image & { package: bash: "=~5.1" package: yarn: "=~1.22" } }, - llb.#Exec & { + op.#Exec & { args: [ "/bin/bash", "--noprofile", @@ -56,7 +56,7 @@ import ( "/cache/yarn": "cache" } }, - llb.#Subdir & { + op.#Subdir & { dir: "/build" }, ] diff --git a/tests/cli/input/main.cue b/tests/cli/input/main.cue index fd0f7b94..aa8f8737 100644 --- a/tests/cli/input/main.cue +++ b/tests/cli/input/main.cue @@ -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" }, diff --git a/tests/cli/simple/main.cue b/tests/cli/simple/main.cue index f4ca27b7..d2a09c27 100644 --- a/tests/cli/simple/main.cue +++ b/tests/cli/simple/main.cue @@ -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"]}, ] diff --git a/tests/compute/ignore/main.cue b/tests/compute/ignore/main.cue index 1f625458..29eef0f5 100644 --- a/tests/compute/ignore/main.cue +++ b/tests/compute/ignore/main.cue @@ -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", diff --git a/tests/llb/dockerbuild/main.cue b/tests/llb/dockerbuild/main.cue index 3bfbee11..4cce6d8a 100644 --- a/tests/llb/dockerbuild/main.cue +++ b/tests/llb/dockerbuild/main.cue @@ -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 """ diff --git a/tests/llb/push-container/main.cue b/tests/llb/push-container/main.cue index d258fbfa..b094d694 100644 --- a/tests/llb/push-container/main.cue +++ b/tests/llb/push-container/main.cue @@ -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)" diff --git a/tests/stdlib/alpine/alpine.cue b/tests/stdlib/alpine/alpine.cue index 855db7de..1bcd3e62 100644 --- a/tests/stdlib/alpine/alpine.cue +++ b/tests/stdlib/alpine/alpine.cue @@ -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"] }, ] diff --git a/tests/stdlib/file/file.cue b/tests/stdlib/file/file.cue index 5cd9180b..09037a08 100644 --- a/tests/stdlib/file/file.cue +++ b/tests/stdlib/file/file.cue @@ -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", diff --git a/tests/stdlib/go/go.cue b/tests/stdlib/go/go.cue index 5a6519d3..007f127b 100644 --- a/tests/stdlib/go/go.cue +++ b/tests/stdlib/go/go.cue @@ -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", diff --git a/tests/stdlib/netlify/netlify.cue b/tests/stdlib/netlify/netlify.cue index 752926f9..40c5fe18 100644 --- a/tests/stdlib/netlify/netlify.cue +++ b/tests/stdlib/netlify/netlify.cue @@ -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", diff --git a/tests/stdlib/yarn/yarn.cue b/tests/stdlib/yarn/yarn.cue index a92bc548..8c566d40 100644 --- a/tests/stdlib/yarn/yarn.cue +++ b/tests/stdlib/yarn/yarn.cue @@ -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", diff --git a/tests/test-cli.sh b/tests/test-cli.sh index 276d50b1..5d33251a 100644 --- a/tests/test-cli.sh +++ b/tests/test-cli.sh @@ -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":{}}' }