You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My environment is:
Ubuntu Linux 24.04.1 (arm64)
Bazel 7.3.1
rules_helm 0.5.1
rules_oci 2.0.0
My code is the following:
defhelm_package(
name,
package,
values,
images= {},
api_version="v2",
type="application",
app_version="1.0.0",
version="0.1.0",
description="A Helm chart",
templates= [],
substitutions= []):
# Normalize the rule name by replacing hyphens and dots with underscores.rule_name=name.replace("-", "_").replace(".", "_")
# Iterate over the images dictionary and push each image to the OCI registry.forimageinimages:
tag=images[image]
oci_push(
name="%s.push"%image, # Name of the OCI push target.image="%s"%image, # Image name.remote_tags= [tag], # Tags to apply to the pushed image.repository="%s/%s/%s"% (REGISTRY_PUSH_URI, package, to_registy_image_name(image)), # Repository URI.
)
# Create a Helm chart file with the specified parameters.chart_file(
name="%s.chart_file"%rule_name, # Name of the chart file target.api_version=api_version, # API version of the Helm chart.app_version=app_version, # Application version of the Helm chart.chart_name="%s-chart"%name, # Name of the Helm chart.description=description, # Description of the Helm chart.type=type, # Type of the Helm chart.version=version, # Version of the Helm chart.
)
# Define the Helm chart target.helm_chart(
name="%s"%rule_name, # Name of the Helm chart target.chart=":%s.chart_file"%rule_name, # Reference to the chart file target.substitutions=substitutions, # Substitutions to apply to the Helm chart.templates=templates, # Template files for the Helm chart.values=values, # Values file for the Helm chart.images= [
":%s.push"%imageforimageinimages
],
)
I get the error when I build:
Error replacing image stamps: Failed to find key @@//<oci_push rule created using "for/in"> in content
Thanks in advance for any help.
The text was updated successfully, but these errors were encountered:
In a way that seems reasonable to help devs avoid unnecessary dependencies but if that's really the intent here then the messaging is pretty lacking. I'd be happy to review a PR to improve the UX here if that's indeed the issue 😄
Hello,
First thanks author very much for the great tool!
I faced with the bug, I think.
My environment is:
Ubuntu Linux 24.04.1 (arm64)
Bazel 7.3.1
rules_helm 0.5.1
rules_oci 2.0.0
My code is the following:
I get the error when I build:
Thanks in advance for any help.
The text was updated successfully, but these errors were encountered: