GoogleContainerTools / GoogleContainerTools/skaffold

Support bazel output_groups for tar targets

Open
#9,524 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

### 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:

```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](https://github.com/bazel-contrib/rules_oci/blob/main/docs/load.md)
2. Run skaffold with the skaffold yaml

### Workaround

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.