dev.cue: polish

Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
This commit is contained in:
Solomon Hykes
2021-04-06 20:52:06 +00:00
parent 299a38c6b1
commit d522fc3396
2 changed files with 48 additions and 16 deletions

15
dev.cue
View File

@@ -8,6 +8,7 @@ import (
// Dagger source code
source: dagger.#Artifact
// Build the dagger binaries
build: #Container & {
image: #ImageFromRef & {ref: "docker.io/golang:1.16-alpine"}
@@ -15,6 +16,11 @@ build: #Container & {
"apk add --no-cache file",
]
command: """
go test -v ./...
go build -o /binaries/ ./cmd/...
"""
volume: {
daggerSource: {
from: source
@@ -36,20 +42,17 @@ build: #Container & {
dir: "/src"
outputDir: "/binaries"
command: """
go test -v ./...
go build -o /binaries/ ./cmd/...
"""
}
// Execute `dagger help`
usage: #Container & {
image: alpine.#Image
command: "dagger help"
volume: binaries: {
from: build
dest: "/usr/local/dagger/bin/"
}
shell: search: "/usr/local/dagger/bin": true
command: "dagger help"
}