mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Merge pull request #74799 from lubinsz/pr_bazel
Add bazel-test-integration support for Arm64
This commit is contained in:
@@ -4,6 +4,7 @@ load(
|
||||
"@io_bazel_rules_go//go:def.bzl",
|
||||
"go_library",
|
||||
)
|
||||
load("//build:platforms.bzl", "go_platform_constraint")
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
@@ -15,9 +16,23 @@ go_library(
|
||||
"test_server.go",
|
||||
"util.go",
|
||||
],
|
||||
data = [
|
||||
"@com_coreos_etcd//:etcd",
|
||||
],
|
||||
data = select({
|
||||
go_platform_constraint(
|
||||
arch = "arm64",
|
||||
os = "linux",
|
||||
): [
|
||||
"@com_coreos_etcd_arm64//:etcd",
|
||||
],
|
||||
go_platform_constraint(
|
||||
arch = "ppc64le",
|
||||
os = "linux",
|
||||
): [
|
||||
"@com_coreos_etcd_ppc64le//:etcd",
|
||||
],
|
||||
"//conditions:default": [
|
||||
"@com_coreos_etcd_amd64//:etcd",
|
||||
],
|
||||
}),
|
||||
importpath = "k8s.io/kubernetes/test/integration/framework",
|
||||
deps = [
|
||||
"//cmd/kube-apiserver/app:go_default_library",
|
||||
|
||||
@@ -24,6 +24,7 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"k8s.io/klog"
|
||||
@@ -43,7 +44,8 @@ You can use 'hack/install-etcd.sh' to install a copy in third_party/.
|
||||
|
||||
// getEtcdPath returns a path to an etcd executable.
|
||||
func getEtcdPath() (string, error) {
|
||||
bazelPath := filepath.Join(os.Getenv("RUNFILES_DIR"), "com_coreos_etcd/etcd")
|
||||
bazelPath := filepath.Join(os.Getenv("RUNFILES_DIR"), fmt.Sprintf("com_coreos_etcd_%s", runtime.GOARCH), "etcd")
|
||||
|
||||
p, err := exec.LookPath(bazelPath)
|
||||
if err == nil {
|
||||
return p, nil
|
||||
|
||||
Reference in New Issue
Block a user