2020-10-06 15:28:19 +00:00
|
|
|
load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_push")
|
2019-07-13 14:16:23 +00:00
|
|
|
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
|
|
|
load("@io_bazel_rules_go//extras:embed_data.bzl", "go_embed_data")
|
|
|
|
|
|
|
|
go_embed_data(
|
|
|
|
name = "static",
|
2023-07-28 17:14:50 +00:00
|
|
|
srcs = [
|
|
|
|
"index.html",
|
|
|
|
"speedtest.js",
|
|
|
|
"speedtest_worker.js",
|
|
|
|
],
|
2019-07-13 14:16:23 +00:00
|
|
|
package = "static",
|
|
|
|
)
|
|
|
|
|
|
|
|
# keep
|
|
|
|
go_library(
|
|
|
|
name = "static_go",
|
|
|
|
srcs = [":static"],
|
2019-07-21 13:30:08 +00:00
|
|
|
importpath = "code.hackerspace.pl/hscloud/bgpwtf/speedtest/static",
|
2019-07-13 14:16:23 +00:00
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
2019-07-13 16:10:21 +00:00
|
|
|
container_image(
|
2023-07-28 17:14:50 +00:00
|
|
|
name = "latest",
|
|
|
|
base = "@prodimage-bionic//image",
|
2019-07-13 16:10:21 +00:00
|
|
|
directory = "/hscloud",
|
|
|
|
entrypoint = ["/hscloud/backend"],
|
2023-07-28 17:14:50 +00:00
|
|
|
files = ["//bgpwtf/speedtest/backend"],
|
2019-07-13 16:10:21 +00:00
|
|
|
)
|
|
|
|
|
2020-10-06 15:28:19 +00:00
|
|
|
container_push(
|
|
|
|
name = "push",
|
|
|
|
format = "Docker",
|
2023-07-28 17:14:50 +00:00
|
|
|
image = ":latest",
|
2020-10-06 15:28:19 +00:00
|
|
|
registry = "registry.k0.hswaw.net",
|
|
|
|
repository = "q3k/speedetst",
|
|
|
|
tag = "{BUILD_TIMESTAMP}-{STABLE_GIT_COMMIT}",
|
2019-07-13 16:10:21 +00:00
|
|
|
)
|