-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathBUILD
More file actions
52 lines (47 loc) · 1.5 KB
/
BUILD
File metadata and controls
52 lines (47 loc) · 1.5 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
44
45
46
47
48
49
50
51
52
load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
load("@io_bazel_rules_k8s//k8s:object.bzl", "k8s_object")
load("@io_bazel_rules_k8s//k8s:objects.bzl", "k8s_objects")
load("//rules/flags:index.bzl", "write_flag_to_file")
# TODO(tylerw): break depoloyment.yaml apart.
# TODO(tylerw): do the etsy context thing to set dev/prod vars.
k8s_object(
name = "buildbuddy_dev_app",
cluster = "gke_flame-build_us-west1-a_bb-dev-cluster",
images = {
"gcr.io/flame-build/buildbuddy-app-dev:server_image": "//server:buildbuddy_image",
},
tags = ["manual"],
template = ":buildbuddy-app.dev.yaml",
)
k8s_objects(
name = "dev",
objects = [
":buildbuddy_dev_app",
],
tags = ["manual"],
)
# Set --//deployment:image_tag to set the tag when running container_push
# targets. If unset, defaults to "development".
#
# Note that this tag is shared across all targets, which is fine since only one
# container_push target can run at once.
string_flag(
name = "image_tag",
build_setting_default = "development",
)
write_flag_to_file(
name = "image_tag_file",
out = "image_tag_file",
flag = ":image_tag",
visibility = ["//visibility:public"],
)
# TODO: Get rid of this.
# Currently rules OCI only support tag file names with the ".txt" extension.
copy_file(
name = "oci_tag_file",
src = ":image_tag_file",
out = "oci_tag.txt",
allow_symlink = True,
visibility = ["//visibility:public"],
)