skaffold icon indicating copy to clipboard operation
skaffold copied to clipboard

Backport Bazel build context fixes to v1

Open mikekamornikov opened this issue 2 years ago • 0 comments

Expected behavior

I can run skaffold build with bazel artifact from bazel workspace subfolder

build:
  artifacts:
  - image: quay.io/org/project
    context: ../../..
    bazel:
      target: //projects/project:docker.tar

Actual behavior

#7281, #7600 both being blockers for expected behaviour were not backported to v1. So the issue is still reproducible even in the latest v1 release (1.39.2) failing with something like:

failed: reading image "bazel-out/darwin_arm64-fastbuild/bin/some_image.tar": open bazel-out/darwin_arm64-fastbuild/bin/some_image.tar: no such file or directory

Information

  • Skaffold version: 1.39.2
  • Operating system: macOS 12.4
  • Installed via: downloaded from Github release assets
  • Contents of skaffold.yaml:
apiVersion: skaffold/v2beta29
kind: Config
build:
  artifacts:
  - image: quay.io/org/project
    context: ../../..
    bazel:
      target: //projects/go/cmd/project:docker.tar
      args:
      - --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64
  tagPolicy:
    inputDigest: {}
  local:
    useBuildkit: false

Steps to reproduce the behavior

  1. Put skaffold.yaml to bazel workspace subfolder
  2. Set context to relative path to bazel workspace
  3. Run skaffold build

mikekamornikov avatar Sep 18 '22 11:09 mikekamornikov