No more runtime spec validation

Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
This commit is contained in:
Solomon Hykes
2021-02-12 22:37:41 +00:00
parent ec56160307
commit e8527ddcf5
11 changed files with 209 additions and 410 deletions

View File

@@ -6,12 +6,12 @@ import (
"dagger.cloud/dagger"
)
let alpine={
let alpine = {
digest: "sha256:3c7497bf0c7af93428242d6176e8f7905f2201d8fc5861f45be7a346b5f23436"
package: [string]: true | false | string
#dagger: compute: [
{
do: "fetch-container"
do: "fetch-container"
ref: "index.docker.io/alpine@\(digest)"
},
for pkg, info in package {
@@ -19,7 +19,7 @@ let alpine={
do: "exec"
args: ["apk", "add", "-U", "--no-cache", pkg]
}
if (info & string) != _|_ {
if (info & string) != _|_ {
do: "exec"
args: ["apk", "add", "-U", "--no-cache", "\(pkg)\(info)"]
}
@@ -41,13 +41,11 @@ www: {
},
dagger.#Exec & {
args: ["sh", "-c", "ls /src > /tmp/out"]
mount: "/src": {
from: source
}
mount: "/src": from: source
},
dagger.#Export & {
source: "/tmp/out"
}
},
]
}
@@ -58,7 +56,7 @@ www: {
#dagger: compute: [
{
do: "load"
do: "load"
from: alpine
},
dagger.#Exec & {