GoogleContainerTools / GoogleContainerTools/skaffold
Specify exact image(s) to build with skaffold build
- Dominant language
- Go
- Stars
- 15.9k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 10
Description
`skaffold build --build-images=[]` is useful in being able to build just a subset of images, however the [`strings.Contains()`](https://github.com/GoogleContainerTools/skaffold/blob/6293a3efe10fc12ccb16c2477e59aa4b9335a8dc/pkg/skaffold/config/options.go#L150-L162) matching is problematic for configurations that have similarly named images.
### Expected behavior
Given a config like:
```yaml
apiVersion: skaffold/v4beta11
kind: Config
build:
artifacts:
- image: foo-api
- image: bar-api
- image: bar-api-v2
```
Support some way of building only `bar-api`, e.g. `skaffold build --build-only=bar-api`
### Actual behavior
Both `bar-api` and `bar-api-v2` will be built if you run: `skaffold build --build-image=bar-api`
### Information
- Skaffold version: v2.13.2
- Operating system: macOS
- Installed via: Homebrew
- Contents of skaffold.yaml:
```yaml
apiVersion: skaffold/v4beta11
kind: Config
build:
artifacts:
- image: foo-api
- image: bar-api
- image: bar-api-v2
```
### Steps to reproduce the behavior
Example above.
Contributor guide
Assessment
This issue has not been assessed yet.