53 lines
1.3 KiB
Python
53 lines
1.3 KiB
Python
load("@aspect_bazel_lib//lib:transitions.bzl", "platform_transition_binary")
|
|
load("@rules_oci//oci:defs.bzl", "oci_image", "oci_push")
|
|
load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
|
|
load("@rules_go//go:def.bzl", "go_library")
|
|
load("@rules_go//extras:embed_data.bzl", "go_embed_data")
|
|
|
|
go_embed_data(
|
|
name = "static",
|
|
srcs = [
|
|
"cebula2020.jpeg",
|
|
"hotel-orle.jpg",
|
|
"index.html",
|
|
"style/main.css",
|
|
],
|
|
package = "static",
|
|
)
|
|
|
|
# keep
|
|
go_library(
|
|
name = "static_go",
|
|
srcs = [":static"],
|
|
importpath = "code.hackerspace.pl/hscloud/hswaw/cebulacamp/landing/static",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
platform_transition_binary(
|
|
name = "backend_x86",
|
|
binary = "//hswaw/cebulacamp/landing/backend",
|
|
target_platform = "@rules_go//go/toolchain:linux_amd64",
|
|
)
|
|
|
|
pkg_tar(
|
|
name = "layer_bin",
|
|
srcs = [":backend_x86"],
|
|
package_dir = "/hscloud/hswaw/cebulacamp/landing/",
|
|
)
|
|
|
|
oci_image(
|
|
name = "runtime",
|
|
base = "@prodimage-bionic-oci",
|
|
tars = [
|
|
":layer_bin",
|
|
],
|
|
entrypoint = ["/hscloud/hswaw/cebulacamp/landing/backend"],
|
|
)
|
|
|
|
oci_push(
|
|
name = "push",
|
|
image = ":runtime",
|
|
remote_tags = ["1680303245"],
|
|
repository = "registry.k0.hswaw.net/radex/cebulacamp-landing",
|
|
)
|