-
Notifications
You must be signed in to change notification settings - Fork 0
/
dagger-demo.cue
47 lines (40 loc) · 1.07 KB
/
dagger-demo.cue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package main
import (
"dagger.io/dagger"
"universe.dagger.io/alpine"
"universe.dagger.io/docker"
"universe.dagger.io/go"
)
dagger.#Plan & {
client: filesystem: ".": read: contents: dagger.#FS
actions: {
// Test the app
test_app: go.#Test & {
source: client.filesystem.".".read.contents
}
// Build the app
// Builds the golang app
build_app: go.#Build & {
source: client.filesystem.".".read.contents
}
// Build base
// "environment" fpr the golang app build
build_base: alpine.#Build & {
packages: "ca-certificates": _
}
// Build image
build_image: docker.#Build & {
steps: [
docker.#Copy & {
input: build_base.output
contents: build_app.output
dest: "/app"
},
docker.#Set & {
config: cmd: ["/app"]
},
]
}
// Push not implemented
}
}