1
0
Fork 0

go/svc/{invoice,speedtest} -> bgpwtf/

Continued from https://gerrit.hackerspace.pl/c/hscloud/+/71 .

Change-Id: I5aef587c7e9a4cec301e3c95530c33914851ad44
master
q3k 2019-07-21 15:30:08 +02:00
parent 61594bb088
commit cea71e3be8
22 changed files with 17 additions and 17 deletions

View File

@ -9,12 +9,12 @@ go_library(
"render.go", "render.go",
"statusz.go", "statusz.go",
], ],
importpath = "code.hackerspace.pl/hscloud/go/svc/invoice", importpath = "code.hackerspace.pl/hscloud/bgpwtf/invoice",
visibility = ["//visibility:private"], visibility = ["//visibility:private"],
deps = [ deps = [
"//go/mirko:go_default_library", "//go/mirko:go_default_library",
"//go/statusz:go_default_library", "//go/statusz:go_default_library",
"//go/svc/invoice/templates:go_default_library", "//bgpwtf/invoice/templates:go_default_library",
"//proto/invoice:go_default_library", "//proto/invoice:go_default_library",
"@com_github_golang_glog//:go_default_library", "@com_github_golang_glog//:go_default_library",
"@com_github_golang_protobuf//proto:go_default_library", "@com_github_golang_protobuf//proto:go_default_library",

View File

@ -3,6 +3,6 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library( go_library(
name = "go_default_library", name = "go_default_library",
srcs = ["generate.go"], srcs = ["generate.go"],
importpath = "code.hackerspace.pl/hscloud/go/svc/invoice/proto", importpath = "code.hackerspace.pl/hscloud/bgpwtf/invoice/proto",
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )

View File

@ -8,7 +8,7 @@ import (
wkhtml "github.com/sebastiaanklippert/go-wkhtmltopdf" wkhtml "github.com/sebastiaanklippert/go-wkhtmltopdf"
"code.hackerspace.pl/hscloud/go/svc/invoice/templates" "code.hackerspace.pl/hscloud/bgpwtf/invoice/templates"
pb "code.hackerspace.pl/hscloud/proto/invoice" pb "code.hackerspace.pl/hscloud/proto/invoice"
) )

View File

@ -13,6 +13,6 @@ go_library(
srcs = [ srcs = [
":templates_bindata", # keep ":templates_bindata", # keep
], ],
importpath = "code.hackerspace.pl/hscloud/go/svc/invoice/templates", # keep importpath = "code.hackerspace.pl/hscloud/bgpwtf/invoice/templates", # keep
visibility = ["//go/svc/invoice:__subpackages__"], visibility = ["//bgpwtf/invoice:__subpackages__"],
) )

View File

@ -12,14 +12,14 @@ go_embed_data(
go_library( go_library(
name = "static_go", name = "static_go",
srcs = [":static"], srcs = [":static"],
importpath = "code.hackerspace.pl/hscloud/go/svc/speedtest/static", importpath = "code.hackerspace.pl/hscloud/bgpwtf/speedtest/static",
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
container_image( container_image(
name="latest", name="latest",
base="@prodimage-bionic//image", base="@prodimage-bionic//image",
files = ["//go/svc/speedtest/backend:backend"], files = ["//bgpwtf/speedtest/backend:backend"],
directory = "/hscloud", directory = "/hscloud",
entrypoint = ["/hscloud/backend"], entrypoint = ["/hscloud/backend"],
) )
@ -30,9 +30,9 @@ genrule(
outs = ["version.sh"], outs = ["version.sh"],
executable = True, executable = True,
cmd = """ cmd = """
local=bazel/go/svc/speedtest:latest local=bazel/bgpwtf/speedtest:latest
tag=$$(date +%s) tag=$$(date +%s)
remote=registry.k0.hswaw.net/go/svc/speedtest:$$tag remote=registry.k0.hswaw.net/bgpwtf/speedtest:$$tag
docker tag $$local $$remote docker tag $$local $$remote
docker push $$remote docker push $$remote

View File

@ -3,11 +3,11 @@ load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")
go_library( go_library(
name = "go_default_library", name = "go_default_library",
srcs = ["main.go"], srcs = ["main.go"],
importpath = "code.hackerspace.pl/hscloud/go/svc/speedtest/backend", importpath = "code.hackerspace.pl/hscloud/bgpwtf/speedtest/backend",
visibility = ["//visibility:private"], visibility = ["//visibility:private"],
deps = [ deps = [
"@com_github_golang_glog//:go_default_library", "@com_github_golang_glog//:go_default_library",
"//go/svc/speedtest:static_go", # keep "//bgpwtf/speedtest:static_go", # keep
], ],
) )

View File

@ -27,7 +27,7 @@ import (
"github.com/golang/glog" "github.com/golang/glog"
"code.hackerspace.pl/hscloud/go/svc/speedtest/static" "code.hackerspace.pl/hscloud/bgpwtf/speedtest/static"
) )
var ( var (
@ -131,13 +131,13 @@ func main() {
json.NewEncoder(w).Encode(res) json.NewEncoder(w).Encode(res)
}) })
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.Write(static.Data["go/svc/speedtest/index.html"]) w.Write(static.Data["bgpwtf/speedtest/index.html"])
}) })
http.HandleFunc("/speedtest.js", func(w http.ResponseWriter, r *http.Request) { http.HandleFunc("/speedtest.js", func(w http.ResponseWriter, r *http.Request) {
w.Write(static.Data["go/svc/speedtest/speedtest.js"]) w.Write(static.Data["bgpwtf/speedtest/speedtest.js"])
}) })
http.HandleFunc("/speedtest_worker.js", func(w http.ResponseWriter, r *http.Request) { http.HandleFunc("/speedtest_worker.js", func(w http.ResponseWriter, r *http.Request) {
w.Write(static.Data["go/svc/speedtest/speedtest_worker.js"]) w.Write(static.Data["bgpwtf/speedtest/speedtest_worker.js"])
}) })
glog.Infof("Starting up at %v", flagBind) glog.Infof("Starting up at %v", flagBind)

View File

@ -9,7 +9,7 @@ local kube = import '../../../../kube/kube.libsonnet';
domain: "speedtest.hackerspace.pl", domain: "speedtest.hackerspace.pl",
tag: "1563032542", tag: "1563032542",
image: "registry.k0.hswaw.net/go/svc/speedtest:" + cfg.tag, image: "registry.k0.hswaw.net/bgpwtf/speedtest:" + cfg.tag,
resources: { resources: {
requests: { requests: {