Serge Bazanski | eb09c6a | 2020-10-06 17:28:19 +0200 | [diff] [blame] | 1 | load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_push") |
Sergiusz Bazanski | f448f99 | 2019-07-13 16:16:23 +0200 | [diff] [blame] | 2 | load("@io_bazel_rules_go//go:def.bzl", "go_library") |
| 3 | load("@io_bazel_rules_go//extras:embed_data.bzl", "go_embed_data") |
| 4 | |
| 5 | go_embed_data( |
| 6 | name = "static", |
| 7 | srcs = ["index.html", "speedtest.js", "speedtest_worker.js"], |
| 8 | package = "static", |
| 9 | ) |
| 10 | |
| 11 | # keep |
| 12 | go_library( |
| 13 | name = "static_go", |
| 14 | srcs = [":static"], |
Sergiusz Bazanski | cea71e3 | 2019-07-21 15:30:08 +0200 | [diff] [blame] | 15 | importpath = "code.hackerspace.pl/hscloud/bgpwtf/speedtest/static", |
Sergiusz Bazanski | f448f99 | 2019-07-13 16:16:23 +0200 | [diff] [blame] | 16 | visibility = ["//visibility:public"], |
| 17 | ) |
| 18 | |
Sergiusz Bazanski | 3e21233 | 2019-07-13 18:10:21 +0200 | [diff] [blame] | 19 | container_image( |
| 20 | name="latest", |
| 21 | base="@prodimage-bionic//image", |
Sergiusz Bazanski | cea71e3 | 2019-07-21 15:30:08 +0200 | [diff] [blame] | 22 | files = ["//bgpwtf/speedtest/backend:backend"], |
Sergiusz Bazanski | 3e21233 | 2019-07-13 18:10:21 +0200 | [diff] [blame] | 23 | directory = "/hscloud", |
| 24 | entrypoint = ["/hscloud/backend"], |
| 25 | ) |
| 26 | |
Serge Bazanski | eb09c6a | 2020-10-06 17:28:19 +0200 | [diff] [blame] | 27 | container_push( |
| 28 | name = "push", |
| 29 | image = ":latest", |
| 30 | format = "Docker", |
| 31 | registry = "registry.k0.hswaw.net", |
| 32 | repository = "q3k/speedetst", |
| 33 | tag = "{BUILD_TIMESTAMP}-{STABLE_GIT_COMMIT}", |
Sergiusz Bazanski | 3e21233 | 2019-07-13 18:10:21 +0200 | [diff] [blame] | 34 | ) |