2020-05-05 07:22:26 +00:00
|
|
|
load("@prysm//tools/go:def.bzl", "go_library")
|
|
|
|
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_test")
|
2019-12-26 16:53:27 +00:00
|
|
|
load("@io_bazel_rules_docker//go:image.bzl", "go_image")
|
2020-11-21 21:37:03 +00:00
|
|
|
load("@io_bazel_rules_docker//container:container.bzl", "container_bundle", "container_image")
|
2019-12-26 16:53:27 +00:00
|
|
|
load("@io_bazel_rules_docker//contrib:push-all.bzl", "docker_push")
|
2019-09-26 16:29:10 +00:00
|
|
|
|
|
|
|
go_library(
|
|
|
|
name = "go_default_library",
|
2019-10-19 03:35:09 +00:00
|
|
|
srcs = [
|
2019-10-31 03:26:55 +00:00
|
|
|
"main.go",
|
|
|
|
"usage.go",
|
2019-10-19 03:35:09 +00:00
|
|
|
],
|
2019-09-26 16:29:10 +00:00
|
|
|
importpath = "github.com/prysmaticlabs/prysm/slasher",
|
|
|
|
visibility = ["//slasher:__subpackages__"],
|
|
|
|
deps = [
|
2019-10-31 03:26:55 +00:00
|
|
|
"//shared/cmd:go_default_library",
|
|
|
|
"//shared/debug:go_default_library",
|
2020-04-22 15:53:09 +00:00
|
|
|
"//shared/featureconfig:go_default_library",
|
2020-10-14 00:10:57 +00:00
|
|
|
"//shared/journald:go_default_library",
|
2019-10-31 03:26:55 +00:00
|
|
|
"//shared/logutil:go_default_library",
|
2020-10-15 02:05:30 +00:00
|
|
|
"//shared/tos:go_default_library",
|
2019-10-31 03:26:55 +00:00
|
|
|
"//shared/version:go_default_library",
|
|
|
|
"//slasher/flags:go_default_library",
|
2020-02-14 07:09:54 +00:00
|
|
|
"//slasher/node:go_default_library",
|
2019-10-31 03:26:55 +00:00
|
|
|
"@com_github_joonix_log//:go_default_library",
|
2019-09-26 16:29:10 +00:00
|
|
|
"@com_github_sirupsen_logrus//:go_default_library",
|
2020-05-31 06:44:34 +00:00
|
|
|
"@com_github_urfave_cli_v2//:go_default_library",
|
2019-10-31 03:26:55 +00:00
|
|
|
"@com_github_x_cray_logrus_prefixed_formatter//:go_default_library",
|
2019-09-26 16:29:10 +00:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
go_test(
|
|
|
|
name = "go_default_test",
|
2019-10-31 03:26:55 +00:00
|
|
|
size = "small",
|
|
|
|
srcs = ["usage_test.go"],
|
2019-09-26 16:29:10 +00:00
|
|
|
embed = [":go_default_library"],
|
2020-04-22 15:53:09 +00:00
|
|
|
deps = [
|
|
|
|
"//shared/featureconfig:go_default_library",
|
2020-08-18 12:41:25 +00:00
|
|
|
"//shared/testutil/assert:go_default_library",
|
2020-05-31 06:44:34 +00:00
|
|
|
"@com_github_urfave_cli_v2//:go_default_library",
|
2020-04-22 15:53:09 +00:00
|
|
|
],
|
2019-10-31 03:26:55 +00:00
|
|
|
)
|
|
|
|
|
2019-12-26 16:53:27 +00:00
|
|
|
go_image(
|
|
|
|
name = "image",
|
|
|
|
base = "//tools:cc_image",
|
2020-11-10 03:01:56 +00:00
|
|
|
binary = ":slasher",
|
2019-12-26 16:53:27 +00:00
|
|
|
tags = ["manual"],
|
|
|
|
visibility = ["//visibility:private"],
|
|
|
|
)
|
|
|
|
|
2020-11-21 21:37:03 +00:00
|
|
|
container_image(
|
|
|
|
name = "image_with_creation_time",
|
|
|
|
base = "image",
|
|
|
|
stamp = True,
|
|
|
|
)
|
|
|
|
|
2019-12-26 16:53:27 +00:00
|
|
|
container_bundle(
|
|
|
|
name = "image_bundle",
|
|
|
|
images = {
|
2020-11-21 21:37:03 +00:00
|
|
|
"gcr.io/prysmaticlabs/prysm/slasher:latest": ":image_with_creation_time",
|
|
|
|
"gcr.io/prysmaticlabs/prysm/slasher:{DOCKER_TAG}": ":image_with_creation_time",
|
|
|
|
"index.docker.io/prysmaticlabs/prysm-slasher:latest": ":image_with_creation_time",
|
|
|
|
"index.docker.io/prysmaticlabs/prysm-slasher:{DOCKER_TAG}": ":image_with_creation_time",
|
2019-12-26 16:53:27 +00:00
|
|
|
},
|
|
|
|
tags = ["manual"],
|
|
|
|
)
|
|
|
|
|
|
|
|
docker_push(
|
|
|
|
name = "push_images",
|
|
|
|
bundle = ":image_bundle",
|
|
|
|
tags = ["manual"],
|
|
|
|
)
|
|
|
|
|
2019-10-31 03:26:55 +00:00
|
|
|
go_binary(
|
|
|
|
name = "slasher",
|
|
|
|
embed = [":go_default_library"],
|
2020-03-15 05:09:23 +00:00
|
|
|
visibility = [
|
|
|
|
"//endtoend:__pkg__",
|
|
|
|
],
|
2019-09-26 16:29:10 +00:00
|
|
|
)
|