-
Notifications
You must be signed in to change notification settings - Fork 3
/
.space.kts
147 lines (134 loc) · 4.21 KB
/
.space.kts
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
job("Run tests & Build") {
startOn {
codeReviewOpened{}
}
container(image = "minik8s.xyz/rust:latest") {
resources {
cpu = 8.cpu
memory = 12000.mb
}
shellScript {
interpreter = "/bin/bash"
content = """
sudo su
pwd
rustup version
cargo version
echo Installing clippy...
rustup component add clippy
echo Running tests...
cargo clippy -- -Dwarnings
cargo test
"""
}
}
}
job("Build docker images") {
startOn {
gitPush {
branchFilter {
+"refs/heads/develop"
}
}
}
container(displayName = "Compile", image = "minik8s.xyz/rust:latest") {
resources {
cpu = 8.cpu
memory = 12000.mb
}
shellScript {
interpreter = "/bin/bash"
content = """
cargo build --release
cd ./target/release
curl -F "api_server=@api_server" http://minik8s.xyz:8008/api/upload
curl -F "endpoints-controller=@endpoints-controller" http://minik8s.xyz:8008/api/upload
curl -F "ingress-controller=@ingress-controller" http://minik8s.xyz:8008/api/upload
curl -F "podautoscaler=@podautoscaler" http://minik8s.xyz:8008/api/upload
curl -F "replicaset-controller=@replicaset-controller" http://minik8s.xyz:8008/api/upload
curl -F "rkube-proxy=@rkube-proxy" http://minik8s.xyz:8008/api/upload
curl -F "rkubectl=@rkubectl" http://minik8s.xyz:8008/api/upload
curl -F "rkubelet=@rkubelet" http://minik8s.xyz:8008/api/upload
curl -F "scheduler=@scheduler" http://minik8s.xyz:8008/api/upload
curl -F "function-controller=@function-controller" http://minik8s.xyz:8008/api/upload
curl -F "serverless-router=@serverless-router" http://minik8s.xyz:8008/api/upload
curl -F "gpujob-controller=@gpujob-controller" http://minik8s.xyz:8008/api/upload
"""
}
}
docker {
build {
file = "./scripts/x86/docker/api_server/Dockerfile"
}
push("minik8s.xyz/x86/api_server") {
tags("latest")
}
}
docker {
build {
file = "./scripts/x86/docker/endpoints-controller/Dockerfile"
}
push("minik8s.xyz/endpoints-controller") {
tags("latest")
}
}
docker {
build {
file = "./scripts/x86/docker/ingress-controller/Dockerfile"
}
push("minik8s.xyz/ingress-controller") {
tags("latest")
}
}
docker {
build {
file = "./scripts/x86/docker/podautoscaler/Dockerfile"
}
push("minik8s.xyz/podautoscaler") {
tags("latest")
}
}
docker {
build {
file = "./scripts/x86/docker/replicaset-controller/Dockerfile"
}
push("minik8s.xyz/replicaset-controller") {
tags("latest")
}
}
docker {
build {
file = "./scripts/x86/docker/scheduler/Dockerfile"
}
push("minik8s.xyz/scheduler") {
tags("latest")
}
}
docker {
build {
context = "./scripts/x86/docker/function-controller"
file = "./scripts/x86/docker/function-controller/Dockerfile"
}
push("minik8s.xyz/function-controller") {
tags("latest")
}
}
docker {
build {
context = "./scripts/x86/docker/serverless-router"
file = "./scripts/x86/docker/serverless-router/Dockerfile"
}
push("minik8s.xyz/serverless-router") {
tags("latest")
}
}
docker {
build {
context = "./scripts/x86/docker/gpujob-controller"
file = "./scripts/x86/docker/gpujob-controller/Dockerfile"
}
push("minik8s.xyz/gpujob-controller") {
tags("latest")
}
}
}