You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Skaffold uses github.com/opencontainers/image-spec/specs-go/v1 and containerd strings like "linux/amd64" or "linux/arm64/v7" to represent platforms.
Bazel's platform system uses bazel targets to define platforms (https://bazel.build/extending/platforms). While there are common cpu and os definitions available, each Bazel project defines its own target platforms (!)
Currently, when skaffold invokes bazel, skaffold's platform information is not passed to Bazel. Bazel defaults to the host platform, unless the target skaffold is building explicitly specifies a platform.
To allow a Bazel + Skaffold project to flexibly target multiple platforms, skaffold should provide a mechanism to invoke bazel with --platforms when cross-compiling, based on its own --platform setting.
The text was updated successfully, but these errors were encountered:
* feat: Support Bazel platform mappings
This change introduces an artifact-level setting for configuring Bazel and
defines a platform mapping from Skaffold platforms to Bazel platforms.
The Bazel artifact builder then passes the --platforms flag to Bazel if applicable.
Fixes#9360.
* Update examples/bazel
* Copy examples/bazel to integration/examples/bazel
* Add unit test
* Remove bazel platforms from examples/bazel
Summary: According to ./hack/check-samples.sh,
'''
# /examples should use the latest released version
LATEST_RELEASED="skaffold/$(go run ./hack/versions/cmd/latest_released/version.go)"
'''
The new 'platforms' field is in v4beta10 and not available in a released version yet, so CI fails.
It can be added to /examples/bazel later, after a release.
Test Plan: `./hack/check-samples.sh`
* Remove yaml block that breaks docs
Skaffold uses
github.com/opencontainers/image-spec/specs-go/v1
and containerd strings like "linux/amd64" or "linux/arm64/v7" to represent platforms.Bazel's platform system uses bazel targets to define platforms (https://bazel.build/extending/platforms). While there are common cpu and os definitions available, each Bazel project defines its own target platforms (!)
Currently, when skaffold invokes bazel, skaffold's platform information is not passed to Bazel. Bazel defaults to the host platform, unless the target skaffold is building explicitly specifies a platform.
To allow a Bazel + Skaffold project to flexibly target multiple platforms, skaffold should provide a mechanism to invoke bazel with
--platforms
when cross-compiling, based on its own--platform
setting.The text was updated successfully, but these errors were encountered: