mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-01-05 21:01:04 -05:00
61 lines
1.6 KiB
Python
61 lines
1.6 KiB
Python
|
"""
|
||
|
This folder contains labels used to collect release artifacts.
|
||
|
"""
|
||
|
|
||
|
load("@com_github_ash2k_bazel_tools//multirun:def.bzl", "multirun")
|
||
|
load("//bazel/oci:containers.bzl", "container_sum", "containers", "oci_push", "oci_tarball")
|
||
|
load("//bazel/oci:pin.bzl", "oci_sum_merge")
|
||
|
|
||
|
[
|
||
|
oci_tarball(
|
||
|
name = container["name"] + "_tar",
|
||
|
image = container["oci"],
|
||
|
)
|
||
|
for container in containers()
|
||
|
]
|
||
|
|
||
|
[
|
||
|
container_sum(
|
||
|
name = container["name"],
|
||
|
image_name = container["image_name"],
|
||
|
oci = container["oci"],
|
||
|
prefix = container["prefix"],
|
||
|
registry = container["registry"],
|
||
|
tag_file = container["tag_file"],
|
||
|
)
|
||
|
for container in containers()
|
||
|
]
|
||
|
|
||
|
oci_sum_merge(
|
||
|
name = "container_sums",
|
||
|
sums = [
|
||
|
":%s_sum" % container["name"]
|
||
|
for container in containers()
|
||
|
],
|
||
|
visibility = ["//visibility:public"],
|
||
|
)
|
||
|
|
||
|
# TODO(malt3): use config setting to allow devs the use of custom registries
|
||
|
# https://www.grahambrooks.com/software-development/2021/08/30/user-defined-bazel-arguments.html
|
||
|
[
|
||
|
oci_push(
|
||
|
name = container["name"] + "_push",
|
||
|
image = container["oci"],
|
||
|
image_name = container["image_name"],
|
||
|
prefix = container["prefix"],
|
||
|
registry = container["registry"],
|
||
|
repotags = container["tag_file"],
|
||
|
)
|
||
|
for container in containers()
|
||
|
]
|
||
|
|
||
|
multirun(
|
||
|
name = "push",
|
||
|
commands = [
|
||
|
":" + container["name"] + "_push"
|
||
|
for container in containers()
|
||
|
],
|
||
|
jobs = 0, # execute in parallel
|
||
|
visibility = ["//visibility:public"],
|
||
|
)
|