You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
727 B
Python
38 lines
727 B
Python
load("@rules_go//go:def.bzl", "go_binary", "go_library")
|
|
|
|
go_library(
|
|
name = "echo_lib",
|
|
srcs = ["server.go"],
|
|
importpath = "code.ndumas.com/ndumas/gomud/cmd/echo",
|
|
visibility = ["//visibility:private"],
|
|
)
|
|
|
|
go_binary(
|
|
name = "echo",
|
|
embed = [":echo_lib"],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
load("@rules_pkg//:pkg.bzl", "pkg_tar")
|
|
|
|
pkg_tar(
|
|
name = "tar",
|
|
srcs = [":echo"],
|
|
)
|
|
|
|
load("@rules_oci//oci:defs.bzl", "oci_image", "oci_push")
|
|
|
|
oci_image(
|
|
name = "image",
|
|
base = "@distroless_base",
|
|
entrypoint = ["/echo"],
|
|
tars = [":tar"],
|
|
)
|
|
|
|
oci_push(
|
|
name = "registry",
|
|
image = ":image",
|
|
repository = "code.ndumas.com/ndumas/gomud",
|
|
remote_tags = ["latest"],
|
|
)
|