-
Notifications
You must be signed in to change notification settings - Fork 16
/
bb.edn
69 lines (59 loc) · 3.16 KB
/
bb.edn
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
; Copyright 2018- Rahul De
;
; Use of this source code is governed by an MIT-style
; license that can be found in the LICENSE file or at
; https://opensource.org/licenses/MIT.
{:tasks {:init (do
(def apiserver-dir "apiserver")
(def runner-dir "runner")
(def prep-task "bb prep")
(def compile-task "bb compile")
(def test-task "bb test")
(def image-task "bb image")
(def push-task "bb push")
(def clean-task "bb clean")
; TODO: Remove exclusions if moving to XT2 or upgrading 1.x
(def antq-task "clojure -Sdeps '{:deps {com.github.liquidz/antq {:mvn/version \"RELEASE\"}}}' -M -m antq.core outdated --upgrade --exclude=com.xtdb/xtdb-core --exclude=com.xtdb/xtdb-jdbc"))
apiserver {:doc "Builds the apiserver"
:task (shell {:dir apiserver-dir} compile-task)}
apiserver-prep {:doc "Prepares the deps of the apiserver"
:task (shell {:dir apiserver-dir} prep-task)}
test-apiserver {:doc "Runs tests for the apiserver"
:task (shell {:dir apiserver-dir} test-task)}
image-apiserver {:doc "Make a docker image of the apiserver"
:task (shell {:dir apiserver-dir} image-task)}
push-apiserver {:doc "Push the docker image of the apiserver"
:task (shell {:dir apiserver-dir} push-task)}
runner {:doc "Builds the runner"
:task (shell {:dir runner-dir} compile-task)}
runner-prep {:doc "Prepares the deps of runner"
:task (shell {:dir runner-dir} prep-task)}
test-runner {:doc "Runs tests for runner"
:task (shell {:dir runner-dir} test-task)}
image-runner {:doc "Make a docker image of runner"
:task (shell {:dir runner-dir} image-task)}
push-runner {:doc "Push the docker image of runner"
:task (shell {:dir runner-dir} push-task)}
prep {:doc "Prepares the deps"
:task (run '-prep)}
-prep {:depends [apiserver-prep runner-prep]}
compile {:doc "Compile all services"
:task (run '-compile {:parallel true})}
-compile {:depends [apiserver runner]}
; TODO: Run in parallel with namespaced resources
test {:doc "Run tests for all services"
:task (run '-test)}
-test {:depends [test-apiserver test-runner]}
image {:doc "Build docker images for all services"
:task (run '-image)}
-image {:depends [image-apiserver image-runner]}
clean {:doc "Clean up"
:task (do
(shell {:dir apiserver-dir} clean-task)
(shell {:dir runner-dir} clean-task))}
antq {:doc "Upgrade deps"
:task (do
(println "Checking:" apiserver-dir)
(shell {:dir apiserver-dir} antq-task)
(println "Checking:" runner-dir)
(shell {:dir runner-dir} antq-task))}}}