Skip to content

Support bazel output_groups for tar targets #9524

@leungster

Description

@leungster

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions