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
973a3c72
Commit
973a3c72
authored
Mar 01, 2019
by
Bin Lu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add bazel-test-integration for Arm64
Signed-off-by:
Bin Lu
<
bin.lu@arm.com
>
parent
e9b285af
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 @
973a3c72
...
@@ -19,16 +19,6 @@ http_archive(
...
@@ -19,16 +19,6 @@ http_archive(
urls = mirror("https://github.com/kubernetes/repo-infra/archive/b461270ab6ccfb94ff2d78df96d26f669376d660.tar.gz"),
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(
http_archive(
name = "io_bazel_rules_go",
name = "io_bazel_rules_go",
sha256 = "492c3ac68ed9dcf527a07e6a1b2dcbf199c6bf8b35517951467ac32e421c06c1",
sha256 = "492c3ac68ed9dcf527a07e6a1b2dcbf199c6bf8b35517951467ac32e421c06c1",
...
...
build/workspace.bzl
View file @
973a3c72
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
load("//build:platforms.bzl", "SERVER_PLATFORMS")
load("//build:platforms.bzl", "SERVER_PLATFORMS")
load("//build:workspace_mirror.bzl", "mirror")
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")
load("@io_bazel_rules_docker//container:container.bzl", "container_pull")
CNI_VERSION = "0.6.0"
CNI_VERSION = "0.6.0"
...
@@ -35,6 +35,13 @@ _CRI_TARBALL_ARCH_SHA256 = {
...
@@ -35,6 +35,13 @@ _CRI_TARBALL_ARCH_SHA256 = {
"s390x": "814aa9cd496be416612c2653097a1c9eb5784e38aa4889034b44ebf888709057",
"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
# Note that these are digests for the manifest list. We resolve the manifest
# list to each of its platform-specific images in
# list to each of its platform-specific images in
# debian_image_dependencies().
# debian_image_dependencies().
...
@@ -48,6 +55,7 @@ def release_dependencies():
...
@@ -48,6 +55,7 @@ def release_dependencies():
cni_tarballs()
cni_tarballs()
cri_tarballs()
cri_tarballs()
debian_image_dependencies()
debian_image_dependencies()
etcd_tarballs()
def cni_tarballs():
def cni_tarballs():
for arch, sha in _CNI_TARBALL_ARCH_SHA256.items():
for arch, sha in _CNI_TARBALL_ARCH_SHA256.items():
...
@@ -92,3 +100,13 @@ def debian_image_dependencies():
...
@@ -92,3 +100,13 @@ def debian_image_dependencies():
registry = "k8s.gcr.io",
registry = "k8s.gcr.io",
repository = "debian-hyperkube-base",
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 @
973a3c72
...
@@ -4,6 +4,7 @@ load(
...
@@ -4,6 +4,7 @@ load(
"@io_bazel_rules_go//go:def.bzl",
"@io_bazel_rules_go//go:def.bzl",
"go_library",
"go_library",
)
)
load("//build:platforms.bzl", "go_platform_constraint")
go_library(
go_library(
name = "go_default_library",
name = "go_default_library",
...
@@ -15,9 +16,23 @@ go_library(
...
@@ -15,9 +16,23 @@ go_library(
"test_server.go",
"test_server.go",
"util.go",
"util.go",
],
],
data = [
data = select({
"@com_coreos_etcd//:etcd",
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",
importpath = "k8s.io/kubernetes/test/integration/framework",
deps = [
deps = [
"//cmd/kube-apiserver/app:go_default_library",
"//cmd/kube-apiserver/app:go_default_library",
...
...
test/integration/framework/etcd.go
View file @
973a3c72
...
@@ -24,6 +24,7 @@ import (
...
@@ -24,6 +24,7 @@ import (
"os"
"os"
"os/exec"
"os/exec"
"path/filepath"
"path/filepath"
"runtime"
"strings"
"strings"
"k8s.io/klog"
"k8s.io/klog"
...
@@ -43,7 +44,8 @@ You can use 'hack/install-etcd.sh' to install a copy in third_party/.
...
@@ -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.
// getEtcdPath returns a path to an etcd executable.
func
getEtcdPath
()
(
string
,
error
)
{
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
)
p
,
err
:=
exec
.
LookPath
(
bazelPath
)
if
err
==
nil
{
if
err
==
nil
{
return
p
,
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