Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
8fd63426
Unverified
Commit
8fd63426
authored
Mar 12, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Mar 12, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #74799 from lubinsz/pr_bazel
Add bazel-test-integration support for Arm64
parents
93402fc8
973a3c72
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
15 deletions
+40
-15
WORKSPACE
build/root/WORKSPACE
+0
-10
workspace.bzl
build/workspace.bzl
+19
-1
BUILD
test/integration/framework/BUILD
+18
-3
etcd.go
test/integration/framework/etcd.go
+3
-1
No files found.
build/root/WORKSPACE
View file @
8fd63426
...
...
@@ -19,16 +19,6 @@ http_archive(
urls = mirror("https://github.com/kubernetes/repo-infra/archive/b461270ab6ccfb94ff2d78df96d26f669376d660.tar.gz"),
)
ETCD_VERSION = "3.3.10"
http_archive(
name = "com_coreos_etcd",
build_file = "@//third_party:etcd.BUILD",
sha256 = "1620a59150ec0a0124a65540e23891243feb2d9a628092fb1edcc23974724a45",
strip_prefix = "etcd-v%s-linux-amd64" % ETCD_VERSION,
urls = mirror("https://github.com/coreos/etcd/releases/download/v%s/etcd-v%s-linux-amd64.tar.gz" % (ETCD_VERSION, ETCD_VERSION)),
)
http_archive(
name = "io_bazel_rules_go",
sha256 = "6776d68ebb897625dead17ae510eac3d5f6342367327875210df44dbe2aeeb19",
...
...
build/workspace.bzl
View file @
8fd63426
...
...
@@ -14,7 +14,7 @@
load("//build:platforms.bzl", "SERVER_PLATFORMS")
load("//build:workspace_mirror.bzl", "mirror")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_
archive", "http_
file")
load("@io_bazel_rules_docker//container:container.bzl", "container_pull")
CNI_VERSION = "0.6.0"
...
...
@@ -35,6 +35,13 @@ _CRI_TARBALL_ARCH_SHA256 = {
"s390x": "814aa9cd496be416612c2653097a1c9eb5784e38aa4889034b44ebf888709057",
}
ETCD_VERSION = "3.3.10"
_ETCD_TARBALL_ARCH_SHA256 = {
"amd64": "1620a59150ec0a0124a65540e23891243feb2d9a628092fb1edcc23974724a45",
"arm64": "5ec97b0b872adce275b8130d19db314f7f2b803aeb24c4aae17a19e2d66853c4",
"ppc64le": "148fe96f0ec1813c5db9916199e96a913174304546bc8447a2d2f9fee4b8f6c2",
}
# Note that these are digests for the manifest list. We resolve the manifest
# list to each of its platform-specific images in
# debian_image_dependencies().
...
...
@@ -48,6 +55,7 @@ def release_dependencies():
cni_tarballs()
cri_tarballs()
debian_image_dependencies()
etcd_tarballs()
def cni_tarballs():
for arch, sha in _CNI_TARBALL_ARCH_SHA256.items():
...
...
@@ -92,3 +100,13 @@ def debian_image_dependencies():
registry = "k8s.gcr.io",
repository = "debian-hyperkube-base",
)
def etcd_tarballs():
for arch, sha in _ETCD_TARBALL_ARCH_SHA256.items():
http_archive(
name = "com_coreos_etcd_%s" % arch,
build_file = "@//third_party:etcd.BUILD",
sha256 = sha,
strip_prefix = "etcd-v%s-linux-%s" % (ETCD_VERSION, arch),
urls = mirror("https://github.com/coreos/etcd/releases/download/v%s/etcd-v%s-linux-%s.tar.gz" % (ETCD_VERSION, ETCD_VERSION, arch)),
)
test/integration/framework/BUILD
View file @
8fd63426
...
...
@@ -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",
...
...
test/integration/framework/etcd.go
View file @
8fd63426
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment