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 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)"]
}
}

View File

@@ -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"

View File

@@ -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"
},

View File

@@ -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"
},

View File

@@ -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]
_
...
}

View File

@@ -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 |

View File

@@ -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},
]
}
}

View File

@@ -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},
]
}
}

View File

@@ -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
},

View File

@@ -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

View File

@@ -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",

View File

@@ -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",

View File

@@ -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"
},

View File

@@ -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"
},
]