| Tim Windelschmidt | 0974b22 | 2024-01-16 14:04:15 +0100 | [diff] [blame^] | 1 | load("@bazel_skylib//rules:write_file.bzl", "write_file") |
| Tim Windelschmidt | 1fdab13 | 2023-03-30 15:04:16 +0200 | [diff] [blame] | 2 | |
| Tim Windelschmidt | 0974b22 | 2024-01-16 14:04:15 +0100 | [diff] [blame^] | 3 | write_file( |
| 4 | name = "tags_tmpl", |
| 5 | out = "tags.txt.tmpl", |
| 6 | content = [ |
| 7 | "BUILD_VERSION", |
| 8 | ], |
| Tim Windelschmidt | 1fdab13 | 2023-03-30 15:04:16 +0200 | [diff] [blame] | 9 | ) |
| 10 | |
| Tim Windelschmidt | 0974b22 | 2024-01-16 14:04:15 +0100 | [diff] [blame^] | 11 | load("@aspect_bazel_lib//lib:expand_template.bzl", "expand_template") |
| 12 | |
| 13 | # Use the value of --embed_label under --stamp, otherwise use a deterministic constant |
| 14 | # value to ensure cache hits for actions that depend on this. |
| 15 | expand_template( |
| 16 | name = "stamped", |
| 17 | out = "_stamped.tags.txt", |
| 18 | stamp_substitutions = {"BUILD_VERSION": "{{STABLE_MONOGON_cloud_version}}"}, |
| 19 | substitutions = {"BUILD_VERSION": "0.0.0"}, |
| 20 | template = "tags_tmpl", |
| 21 | ) |
| 22 | |
| 23 | load("@rules_oci//oci:defs.bzl", "oci_push") |
| 24 | |
| 25 | oci_push( |
| 26 | name = "apigw_image", |
| 27 | image = "//cloud/apigw:apigw_image", |
| 28 | remote_tags = ":stamped", |
| 29 | repository = "gcr.io/monogon-infra/cloud/apigw", |
| 30 | ) |
| 31 | |
| 32 | oci_push( |
| 33 | name = "shepherd_equinix", |
| 34 | image = "//cloud/shepherd/provider/equinix:equinix_image", |
| 35 | remote_tags = ":stamped", |
| 36 | repository = "gcr.io/monogon-infra/cloud/shepherd/equinix", |
| 37 | ) |
| 38 | |
| 39 | oci_push( |
| 40 | name = "bmsrv", |
| 41 | image = "//cloud/bmaas/server/cmd:cmd_image", |
| 42 | remote_tags = ":stamped", |
| 43 | repository = "gcr.io/monogon-infra/cloud/bmsrv", |
| 44 | ) |
| 45 | |
| 46 | oci_push( |
| 47 | name = "scruffy", |
| 48 | image = "//cloud/bmaas/scruffy/cmd:cmd_image", |
| 49 | remote_tags = ":stamped", |
| 50 | repository = "gcr.io/monogon-infra/cloud/scruffy", |
| 51 | ) |
| 52 | |
| 53 | oci_push( |
| 54 | name = "shepherd_mini", |
| 55 | image = "//cloud/shepherd/mini:mini_image", |
| 56 | remote_tags = ":stamped", |
| 57 | repository = "gcr.io/monogon-infra/cloud/shepherd/mini", |
| Tim Windelschmidt | 1fdab13 | 2023-03-30 15:04:16 +0200 | [diff] [blame] | 58 | ) |