-
-
Notifications
You must be signed in to change notification settings - Fork 67
/
BUILD.bazel
79 lines (67 loc) · 1.91 KB
/
BUILD.bazel
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
package(default_visibility = ["//visibility:public"])
load("@bazel_gazelle//:def.bzl", "gazelle")
load("@io_bazel_rules_docker//cc:image.bzl", "cc_image")
load("@io_bazel_rules_docker//docker:docker.bzl", "docker_push")
load("@io_bazel_rules_docker//go:image.bzl", "go_image")
load("@io_bazel_rules_docker//java:image.bzl", "java_image")
DOCKER_REGISTRY_URL = "localhost:5000"
# A Gazelle executable for auto-generating Go BUILD definitions
gazelle(
name = "gazelle",
prefix = "github.com/lucperkins/colossus",
)
# This line is necessary to keep Gazelle from using the vendored gRPC for Go library:
# gazelle:exclude vendor
# A Docker image for the web service (Linux binary)
go_image(
name = "colossus-web",
binary = "//web:web_linux_bin",
)
# A Docker image for the auth service (Linux binary)
go_image(
name = "colossus-auth",
binary = "//auth:auth_linux_bin",
)
# A Docker image for the data service
java_image(
name = "colossus-data",
main_class = "colossus.DataHandler",
runtime_deps = ["//data:data_java_lib"],
)
# A Docker image for the userinfo C++ service
cc_image(
name = "colossus-userinfo",
binary = "//userinfo:userinfo-bin",
)
docker_push(
name = "auth-push",
image = ":colossus-auth",
registry = DOCKER_REGISTRY_URL,
repository = "colossus/auth",
stamp = True,
tag = "{BUILD_TIMESTAMP}",
)
docker_push(
name = "web-push",
image = ":colossus-web",
registry = DOCKER_REGISTRY_URL,
repository = "colossus/web",
stamp = True,
tag = "{BUILD_TIMESTAMP}",
)
docker_push(
name = "data-push",
image = ":colossus-data",
registry = DOCKER_REGISTRY_URL,
repository = "colossus/data",
stamp = True,
tag = "{BUILD_TIMESTAMP}",
)
docker_push(
name = "userinfo-push",
image = ":colossus-userinfo",
registry = DOCKER_REGISTRY_URL,
repository = "colossus/userinfo",
stamp = True,
tag = "{BUILD_TIMESTAMP}",
)