-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbb.edn
More file actions
43 lines (40 loc) · 1.68 KB
/
Copy pathbb.edn
File metadata and controls
43 lines (40 loc) · 1.68 KB
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
{:tasks {:init (do
(require '[clojure.edn :as edn])
(def config
(edn/read-string (slurp "config.edn")))
(def tag
(.format (java.time.format.DateTimeFormatter/ofPattern
"yyyyMMddHHmmss")
(java.time.LocalDateTime/now
java.time.ZoneOffset/UTC)))
(def base-image
(str (:base-image config)
":"
tag))
(def image
(str (:image config)
":"
tag))
)
build-base-image (shell "docker" "build" "-t"
base-image
".")
push-base-image {:depends [build-base-image]
:task (shell "docker push"
base-image)}
aot (do
(shell "mkdir -p classes")
(clojure "-e"
"(compile 'sv.peer-sci.main)"))
pack {:depends [aot]
:task (clojure "-M:pack" "mach.pack.alpha.jib"
"--image-name" image
"--image-type" "docker"
"--base-image" base-image
"--extra-java-args" "-XX:MaxRAMPercentage=90"
"-m" "sv.peer-sci.main")}
push {:depends [pack]
:task (shell "docker"
"push"
image)}
build {:depends [push-base-image push]}}}