forked from pallets/flask
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdagger.cue
62 lines (52 loc) · 962 Bytes
/
dagger.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package flask
import (
"dagger.io/dagger"
"universe.dagger.io/docker"
)
#PythonBuild: {
app: dagger.#FS
image: _build.output
_build: docker.#Build & {
steps: [
docker.#Pull & {
source: "python:3.10"
},
docker.#Copy & {
contents: app
dest: "/app"
},
docker.#Run & {
command: {
name: "pip",
args: ["install", "tox"]
}
}
]
}
}
dagger.#Plan & {
client: filesystem: ".": read: contents: dagger.#FS
actions: {
build: #PythonBuild & {
app: client.filesystem.".".read.contents
}
#Run: docker.#Run & {
input: build.image
mounts: "app": {
contents: client.filesystem.".".read.contents
dest: "/app"
}
workdir: "/app"
}
test: {
_op: #Run & {
command: {
name: "tox"
args: ["-e", "py310"]
}
}
success: _op.success
error: _op.error.message
}
}
}