skaffold icon indicating copy to clipboard operation
skaffold copied to clipboard

Support bazel output_groups for tar targets

Open leungster opened this issue 5 months ago • 0 comments

Expected behavior

I can specify an output_groups=tarball in my skaffold template to use the tarball from an oci_load bazel target.

Actual behavior

The oci_load run script is assumed to be the tarball and the output_groups is ignored for the tar ball path. https://github.com/GoogleContainerTools/skaffold/blob/main/pkg/skaffold/build/bazel/build.go#L140

Information

  • Skaffold version: v2.9.0
  • Operating system: macOS 14.6.1
  • Installed via: github releases
  • Contents of skaffold.yaml:
# Builds the container image
build:
  artifacts:
    - image: service
      bazel:
        target: //path:image.tar
        args:
        - "output_groups=tarball"

Steps to reproduce the behavior

  1. Define a bazel target using oci_load
  2. Run skaffold with the skaffold yaml

Workaround

I worked around this by defining a filegroup and having skaffold point to that.

leungster avatar Sep 10 '24 23:09 leungster