blob: 04222e72ec2b0b7b695821bc820a4246a15be23a [file] [log] [blame]
Tim Windelschmidt0974b222024-01-16 14:04:15 +01001load("@bazel_skylib//rules:write_file.bzl", "write_file")
Tim Windelschmidt44fdf7f2024-07-03 20:30:43 +02002load("@rules_multirun//:defs.bzl", "multirun")
Tim Windelschmidt1fdab132023-03-30 15:04:16 +02003
Tim Windelschmidt0974b222024-01-16 14:04:15 +01004write_file(
5 name = "tags_tmpl",
6 out = "tags.txt.tmpl",
7 content = [
8 "BUILD_VERSION",
9 ],
Tim Windelschmidt1fdab132023-03-30 15:04:16 +020010)
11
Tim Windelschmidt0974b222024-01-16 14:04:15 +010012load("@aspect_bazel_lib//lib:expand_template.bzl", "expand_template")
13
14# 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
24load("@rules_oci//oci:defs.bzl", "oci_push")
25
26oci_push(
27 name = "apigw_image",
28 image = "//cloud/apigw:apigw_image",
29 remote_tags = ":stamped",
30 repository = "gcr.io/monogon-infra/cloud/apigw",
31)
32
33oci_push(
34 name = "shepherd_equinix",
35 image = "//cloud/shepherd/provider/equinix:equinix_image",
36 remote_tags = ":stamped",
37 repository = "gcr.io/monogon-infra/cloud/shepherd/equinix",
38)
39
40oci_push(
41 name = "bmsrv",
42 image = "//cloud/bmaas/server/cmd:cmd_image",
43 remote_tags = ":stamped",
44 repository = "gcr.io/monogon-infra/cloud/bmsrv",
45)
46
47oci_push(
48 name = "scruffy",
49 image = "//cloud/bmaas/scruffy/cmd:cmd_image",
50 remote_tags = ":stamped",
51 repository = "gcr.io/monogon-infra/cloud/scruffy",
52)
53
54oci_push(
55 name = "shepherd_mini",
56 image = "//cloud/shepherd/mini:mini_image",
57 remote_tags = ":stamped",
58 repository = "gcr.io/monogon-infra/cloud/shepherd/mini",
Tim Windelschmidt1fdab132023-03-30 15:04:16 +020059)
Tim Windelschmidt44fdf7f2024-07-03 20:30:43 +020060
61multirun(
62 name = "push",
63 commands = [
64 ":apigw_image",
65 ":shepherd_equinix",
66 ":bmsrv",
67 ":scruffy",
68 ":shepherd_mini",
69 ],
70)