blob: 607790fc8379138cb16b47418dc9fe4ac807dffa [file] [log] [blame]
Serge Bazanskib9ed1232021-05-12 21:05:05 +00001load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_push")
2load("@io_bazel_rules_go//go:def.bzl", "go_library")
3load("@io_bazel_rules_go//extras:embed_data.bzl", "go_embed_data")
4
5go_embed_data(
6 name = "static",
Serge Bazanski97b5cd72023-07-28 17:14:50 +00007 srcs = [
8 "cebula2020.jpeg",
9 "hotel-orle.jpg",
10 "index.html",
11 "style/main.css",
12 ],
Serge Bazanskib9ed1232021-05-12 21:05:05 +000013 package = "static",
14)
15
16# keep
17go_library(
18 name = "static_go",
19 srcs = [":static"],
20 importpath = "code.hackerspace.pl/hscloud/hswaw/cebulacamp/landing/static",
21 visibility = ["//visibility:public"],
22)
23
24container_image(
Serge Bazanski97b5cd72023-07-28 17:14:50 +000025 name = "latest",
26 base = "@prodimage-bionic//image",
Serge Bazanskib9ed1232021-05-12 21:05:05 +000027 directory = "/hscloud/hswaw/cebulacamp/landing",
28 entrypoint = ["/hscloud/hswaw/cebulacamp/landing/backend"],
Serge Bazanski97b5cd72023-07-28 17:14:50 +000029 files = ["//hswaw/cebulacamp/landing/backend"],
Serge Bazanskib9ed1232021-05-12 21:05:05 +000030)
31
32container_push(
33 name = "push",
Serge Bazanskib9ed1232021-05-12 21:05:05 +000034 format = "Docker",
Serge Bazanski97b5cd72023-07-28 17:14:50 +000035 image = ":latest",
Serge Bazanskib9ed1232021-05-12 21:05:05 +000036 registry = "registry.k0.hswaw.net",
37 repository = "q3k/cebulacamp-landing",
38 tag = "{BUILD_TIMESTAMP}-{STABLE_GIT_COMMIT}",
39)