Fixed build

This commit is contained in:
Kasper Juul Hermansen 2022-04-20 17:52:26 +02:00
parent 412574659d
commit 667352ba36
2 changed files with 8 additions and 43 deletions

View File

@ -6,7 +6,7 @@ import (
) )
#Container: { #Container: {
// Container publisher // Container name
name: *"rust_publisher" | string name: *"rust_publisher" | string
// Source code // Source code
@ -20,6 +20,7 @@ import (
docker.#Run & { docker.#Run & {
input: *_image.output | docker.#Image input: *_image.output | docker.#Image
workdir: _sourcePath workdir: _sourcePath
command: name: "cargo"
mounts: "source": { mounts: "source": {
dest: _sourcePath dest: _sourcePath
contents: source contents: source

View File

@ -2,51 +2,15 @@ package rust
import ( import (
"dagger.io/dagger" "dagger.io/dagger"
// "dagger.io/dagger/core"
"universe.dagger.io/x/contact@kjuulh.io/rust" "universe.dagger.io/x/contact@kjuulh.io/rust"
// "universe.dagger.io/docker"
"universe.dagger.io/alpine"
) )
dagger.#Plan & { dagger.#Plan & {
client: { client: filesystem: "./data/hello": read: contents: dagger.#FS
filesystem: {
".": { actions: test: {
read: { publish: rust.#Publish & {
contents: dagger.#FS source: client.filesystem."./data/hello".read.contents
} }
}
}
} }
actions: {
test: {
_baseImage: alpine.#Build
publish: rust.#Publish & {
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: "/"
// }
// }
// verify: core.#ReadFile & {
// input: exec.output.rootfs
// path: "/output.txt"
// } & {
// contents: "Hi dagger!"
// }
}
}
} }