skaffold icon indicating copy to clipboard operation
skaffold copied to clipboard

Bazel root not detected properly when using bzlmod

Open dmeijboom opened this issue 1 year ago • 0 comments

Expected behavior

Skaffold should recognize the bazel root correctly for projects without a WORKSPACE file (when using bzlmod).

Actual behavior

Skaffold only recognizes WORKSPACE or WORKSPACE.bazel as the bazel root. With bzlmod a workspace file is no longer required while a MODULE or MODULE.bazel file is.

Information

  • Skaffold version: v2.10.0
  • Operating system: macOs 14.2.1
  • Installed via: Homebrew
  • Contents of skaffold.yaml:
apiVersion: skaffold/v3
kind: Config
build:
  artifacts:
    - image: test
      bazel:
        target: //test-image.tar

Steps to reproduce the behavior

  1. a clonable repository with the sample skaffold project
  2. Setup bazel with bzlmod (only a BUILD and MODULE file)
  3. skaffold build
  4. fail!

dmeijboom avatar Feb 21 '24 07:02 dmeijboom