diff --git a/helm/helm-chart-package.bzl b/helm/helm-chart-package.bzl index ac4065f..b653a96 100644 --- a/helm/helm-chart-package.bzl +++ b/helm/helm-chart-package.bzl @@ -82,6 +82,10 @@ def _helm_chart_impl(ctx): # extract docker image info from make variable or from rule attribute image_tag = get_make_value_or_default(ctx, ctx.attr.image_tag) + if ctx.attr.image_digest: + digest_path = ctx.attr.image_digest + inputs = inputs + [ctx.file.image, ctx.attr.image_digest] + deps = ctx.attr.chart_deps or [] # copy generated charts by other rules into temporal chart_root/charts directory (treated as a helm dependency) @@ -170,6 +174,7 @@ helm_chart = rule( attrs = { "srcs": attr.label_list(allow_files = True, mandatory = True), "image": attr.label(allow_single_file = True, mandatory = False), + "image_digest": attr.label(allow_single_file = True, mandatory = False), "image_tag": attr.string(mandatory = False), "package_name": attr.string(mandatory = True), "helm_chart_version": attr.string(mandatory = False, default = "1.0.0"),