blob: 04222e72ec2b0b7b695821bc820a4246a15be23a [file] [log] [blame]
load("@bazel_skylib//rules:write_file.bzl", "write_file")
load("@rules_multirun//:defs.bzl", "multirun")
write_file(
name = "tags_tmpl",
out = "tags.txt.tmpl",
content = [
"BUILD_VERSION",
],
)
load("@aspect_bazel_lib//lib:expand_template.bzl", "expand_template")
# Use the value of --embed_label under --stamp, otherwise use a deterministic constant
# value to ensure cache hits for actions that depend on this.
expand_template(
name = "stamped",
out = "_stamped.tags.txt",
stamp_substitutions = {"BUILD_VERSION": "{{STABLE_MONOGON_cloud_version}}"},
substitutions = {"BUILD_VERSION": "0.0.0"},
template = "tags_tmpl",
)
load("@rules_oci//oci:defs.bzl", "oci_push")
oci_push(
name = "apigw_image",
image = "//cloud/apigw:apigw_image",
remote_tags = ":stamped",
repository = "gcr.io/monogon-infra/cloud/apigw",
)
oci_push(
name = "shepherd_equinix",
image = "//cloud/shepherd/provider/equinix:equinix_image",
remote_tags = ":stamped",
repository = "gcr.io/monogon-infra/cloud/shepherd/equinix",
)
oci_push(
name = "bmsrv",
image = "//cloud/bmaas/server/cmd:cmd_image",
remote_tags = ":stamped",
repository = "gcr.io/monogon-infra/cloud/bmsrv",
)
oci_push(
name = "scruffy",
image = "//cloud/bmaas/scruffy/cmd:cmd_image",
remote_tags = ":stamped",
repository = "gcr.io/monogon-infra/cloud/scruffy",
)
oci_push(
name = "shepherd_mini",
image = "//cloud/shepherd/mini:mini_image",
remote_tags = ":stamped",
repository = "gcr.io/monogon-infra/cloud/shepherd/mini",
)
multirun(
name = "push",
commands = [
":apigw_image",
":shepherd_equinix",
":bmsrv",
":scruffy",
":shepherd_mini",
],
)