skaffold icon indicating copy to clipboard operation
skaffold copied to clipboard

Specify exact image(s) to build with skaffold build

Open jsok opened this issue 1 year ago • 0 comments

skaffold build --build-images=[] is useful in being able to build just a subset of images, however the strings.Contains() matching is problematic for configurations that have similarly named images.

Expected behavior

Given a config like:

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:
apiVersion: skaffold/v4beta11
kind: Config
build:
  artifacts:
    - image: foo-api
    - image: bar-api
    - image: bar-api-v2

Steps to reproduce the behavior

Example above.

jsok avatar Oct 21 '24 03:10 jsok