forked from kubev2v/forklift
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
113 lines (97 loc) · 3.11 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
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
load("@bazel_gazelle//:def.bzl", "gazelle")
load("@bazeldnf//:def.bzl", "bazeldnf")
load("@bazel_tools//tools/python:toolchain.bzl", "py_runtime_pair")
bazeldnf(name = "bazeldnf")
py_runtime(
name = "py2_runtime",
interpreter_path = "/usr/bin/python2",
python_version = "PY2",
)
py_runtime(
name = "py3_runtime",
interpreter_path = "/usr/bin/python3",
python_version = "PY3",
)
py_runtime_pair(
name = "py_runtime_pair",
py2_runtime = ":py2_runtime",
py3_runtime = ":py3_runtime",
)
toolchain(
name = "py_toolchain",
toolchain = "py_runtime_pair",
toolchain_type = "@bazel_tools//tools/python:toolchain_type",
)
# gazelle:prefix github.com/konveyor/forklift-controller
gazelle(name = "gazelle")
# gazelle:proto disable_global
genrule(
name = "build-controller",
srcs = [
"//cmd/forklift-controller",
],
outs = ["forklift-controller"],
cmd = "echo '#!/bin/sh\n\ncp -f $(SRCS) $$1' > \"$@\"",
executable = 1,
)
load(
"@io_bazel_rules_docker//container:container.bzl",
"container_pull",
"container_push",
)
container_push(
name = "push-forklift-controller",
format = "Docker",
image = "//cmd/forklift-controller:forklift-controller-image",
registry = "$${REGISTRY:-quay.io}",
repository = "$${REGISTRY_ACCOUNT:-}$${REGISTRY_ACCOUNT:+/}forklift-controller",
tag = "$${REGISTRY_TAG:-devel}",
)
container_push(
name = "push-forklift-api",
format = "Docker",
image = "//cmd/forklift-api:forklift-api-image",
registry = "$${REGISTRY:-quay.io}",
repository = "$${REGISTRY_ACCOUNT:-}$${REGISTRY_ACCOUNT:+/}forklift-api",
tag = "$${REGISTRY_TAG:-devel}",
)
container_push(
name = "push-forklift-operator-index",
format = "Docker",
image = "//operator:forklift-operator-index-image",
registry = "$${REGISTRY:-quay.io}",
repository = "$${REGISTRY_ACCOUNT:-}$${REGISTRY_ACCOUNT:+/}forklift-operator-index",
tag = "$${REGISTRY_TAG:-devel}",
)
container_push(
name = "push-forklift-operator-bundle",
format = "Docker",
image = "//operator:forklift-operator-bundle-image",
registry = "$${REGISTRY:-quay.io}",
repository = "$${REGISTRY_ACCOUNT:-}$${REGISTRY_ACCOUNT:+/}forklift-operator-bundle",
tag = "$${REGISTRY_TAG:-devel}",
)
container_push(
name = "push-forklift-operator",
format = "Docker",
image = "//operator:forklift-operator-image",
registry = "$${REGISTRY:-quay.io}",
repository = "$${REGISTRY_ACCOUNT:-}$${REGISTRY_ACCOUNT:+/}forklift-operator",
tag = "$${REGISTRY_TAG:-devel}",
)
container_push(
name = "push-forklift-validation",
format = "Docker",
image = "//validation:forklift-validation-image",
registry = "$${REGISTRY:-quay.io}",
repository = "$${REGISTRY_ACCOUNT:-}$${REGISTRY_ACCOUNT:+/}forklift-validation",
tag = "$${REGISTRY_TAG:-devel}",
)
container_push(
name = "push-forklift-virt-v2v",
format = "Docker",
image = "//virt-v2v:forklift-virt-v2v",
registry = "$${REGISTRY:-quay.io}",
repository = "$${REGISTRY_ACCOUNT:-}$${REGISTRY_ACCOUNT:+/}forklift-virt-v2v",
tag = "$${REGISTRY_TAG:-devel}",
)