blob: cfafaa73a6701301dc1dacef6c2ac733a59792cc [file] [log] [blame]
Tim Windelschmidt156248b2025-01-10 00:27:45 +01001load("@aspect_bazel_lib//lib:expand_template.bzl", "expand_template")
Tim Windelschmidt0974b222024-01-16 14:04:15 +01002load("@bazel_skylib//rules:write_file.bzl", "write_file")
Tim Windelschmidt44fdf7f2024-07-03 20:30:43 +02003load("@rules_multirun//:defs.bzl", "multirun")
Tim Windelschmidt156248b2025-01-10 00:27:45 +01004load("@rules_oci//oci:defs.bzl", "oci_push")
Tim Windelschmidt1fdab132023-03-30 15:04:16 +02005
Tim Windelschmidt0974b222024-01-16 14:04:15 +01006write_file(
7 name = "tags_tmpl",
8 out = "tags.txt.tmpl",
9 content = [
10 "BUILD_VERSION",
11 ],
Tim Windelschmidt1fdab132023-03-30 15:04:16 +020012)
13
Tim Windelschmidt0974b222024-01-16 14:04:15 +010014# Use the value of --embed_label under --stamp, otherwise use a deterministic constant
15# value to ensure cache hits for actions that depend on this.
16expand_template(
17 name = "stamped",
18 out = "_stamped.tags.txt",
19 stamp_substitutions = {"BUILD_VERSION": "{{STABLE_MONOGON_cloud_version}}"},
20 substitutions = {"BUILD_VERSION": "0.0.0"},
21 template = "tags_tmpl",
22)
23
Tim Windelschmidt0974b222024-01-16 14:04:15 +010024oci_push(
25 name = "apigw_image",
26 image = "//cloud/apigw:apigw_image",
27 remote_tags = ":stamped",
28 repository = "gcr.io/monogon-infra/cloud/apigw",
29)
30
31oci_push(
32 name = "shepherd_equinix",
33 image = "//cloud/shepherd/provider/equinix:equinix_image",
34 remote_tags = ":stamped",
35 repository = "gcr.io/monogon-infra/cloud/shepherd/equinix",
36)
37
38oci_push(
39 name = "bmsrv",
40 image = "//cloud/bmaas/server/cmd:cmd_image",
41 remote_tags = ":stamped",
42 repository = "gcr.io/monogon-infra/cloud/bmsrv",
43)
44
45oci_push(
46 name = "scruffy",
47 image = "//cloud/bmaas/scruffy/cmd:cmd_image",
48 remote_tags = ":stamped",
49 repository = "gcr.io/monogon-infra/cloud/scruffy",
50)
51
52oci_push(
53 name = "shepherd_mini",
54 image = "//cloud/shepherd/mini:mini_image",
55 remote_tags = ":stamped",
56 repository = "gcr.io/monogon-infra/cloud/shepherd/mini",
Tim Windelschmidt1fdab132023-03-30 15:04:16 +020057)
Tim Windelschmidt44fdf7f2024-07-03 20:30:43 +020058
59multirun(
60 name = "push",
61 commands = [
62 ":apigw_image",
63 ":shepherd_equinix",
64 ":bmsrv",
65 ":scruffy",
66 ":shepherd_mini",
67 ],
68)