Adding rust
This commit is contained in:
@@ -2,57 +2,51 @@ package rust
|
||||
|
||||
import (
|
||||
"dagger.io/dagger"
|
||||
"dagger.io/dagger/core"
|
||||
// "dagger.io/dagger/core"
|
||||
"universe.dagger.io/x/contact@kjuulh.io/rust"
|
||||
"universe.dagger.io/docker"
|
||||
// "universe.dagger.io/docker"
|
||||
"universe.dagger.io/alpine"
|
||||
)
|
||||
|
||||
dagger.#Plan & {
|
||||
client: filesystem: "./data/hello_world": read: contents: dagger.#FS
|
||||
client: {
|
||||
filesystem: {
|
||||
".": {
|
||||
read: {
|
||||
contents: dagger.#FS
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
actions: test: {
|
||||
_baseImage: {
|
||||
build: alpine.#Build & {
|
||||
packages: {
|
||||
"ca-certificates": {}
|
||||
"krb5-libs": {}
|
||||
libgcc: {}
|
||||
libintl: {}
|
||||
"libssl1.1": {}
|
||||
"libstdc++": {}
|
||||
zlib: {}
|
||||
}
|
||||
}
|
||||
output: build.output
|
||||
}
|
||||
actions: {
|
||||
test: {
|
||||
_baseImage: alpine.#Build
|
||||
|
||||
simple: {
|
||||
publish: rust.#Publish & {
|
||||
source: client.filesystem."./data".read.contents
|
||||
package: "hello"
|
||||
source: client.filesystem.".".read.contents
|
||||
}
|
||||
|
||||
exec: docker.#Run & {
|
||||
input: _baseImage.output
|
||||
command: {
|
||||
name: "/bin/sh"
|
||||
args: ["-c", "/app/hello_world >> /output.txt"]
|
||||
}
|
||||
env: NAME: "dagger"
|
||||
mounts: binary: {
|
||||
dest: "/app"
|
||||
contents: publish.output
|
||||
source: "/"
|
||||
}
|
||||
}
|
||||
// exec: docker.#Run & {
|
||||
// input: _baseImage.output
|
||||
// command: {
|
||||
// name: "/bin/sh"
|
||||
// args: ["-c", "/app/hello_world >> /output.txt"]
|
||||
// }
|
||||
// env: NAME: "dagger"
|
||||
// mounts: binary: {
|
||||
// dest: "/app"
|
||||
// contents: publish.output
|
||||
// source: "/"
|
||||
// }
|
||||
// }
|
||||
|
||||
verify: core.#ReadFile & {
|
||||
input: exec.output.rootfs
|
||||
path: "/output.txt"
|
||||
} & {
|
||||
contents: "Hi dagger!"
|
||||
}
|
||||
}
|
||||
// verify: core.#ReadFile & {
|
||||
// input: exec.output.rootfs
|
||||
// path: "/output.txt"
|
||||
// } & {
|
||||
// contents: "Hi dagger!"
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user