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
0e157cbc
Unverified
Commit
0e157cbc
authored
Apr 13, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Apr 13, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #75713 from SataQiu/fix-e2e_node-builder-20190326
Fix golint failures in test/e2e_node/builder
parents
0a59758c
b1cb58fd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
.golint_failures
hack/.golint_failures
+0
-1
build.go
test/e2e_node/builder/build.go
+6
-4
No files found.
hack/.golint_failures
View file @
0e157cbc
...
...
@@ -654,7 +654,6 @@ test/e2e/storage/utils
test/e2e/storage/vsphere
test/e2e_kubeadm
test/e2e_node
test/e2e_node/builder
test/e2e_node/remote
test/e2e_node/runner/remote
test/e2e_node/services
...
...
test/e2e_node/builder/build.go
View file @
0e157cbc
...
...
@@ -37,11 +37,12 @@ var buildTargets = []string{
"cluster/gce/gci/mounter"
,
}
// BuildGo builds k8s binaries.
func
BuildGo
()
error
{
klog
.
Infof
(
"Building k8s binaries..."
)
k8sRoot
,
err
:=
utils
.
GetK8sRootDir
()
if
err
!=
nil
{
return
fmt
.
Errorf
(
"failed to locate kubernetes root directory %v
.
"
,
err
)
return
fmt
.
Errorf
(
"failed to locate kubernetes root directory %v"
,
err
)
}
targets
:=
strings
.
Join
(
buildTargets
,
" "
)
cmd
:=
exec
.
Command
(
"make"
,
"-C"
,
k8sRoot
,
fmt
.
Sprintf
(
"WHAT=%s"
,
targets
))
...
...
@@ -49,7 +50,7 @@ func BuildGo() error {
cmd
.
Stderr
=
os
.
Stderr
err
=
cmd
.
Run
()
if
err
!=
nil
{
return
fmt
.
Errorf
(
"failed to build go packages %v
\n
"
,
err
)
return
fmt
.
Errorf
(
"failed to build go packages %v"
,
err
)
}
return
nil
}
...
...
@@ -62,14 +63,14 @@ func getK8sBin(bin string) (string, error) {
return
""
,
err
}
if
_
,
err
:=
os
.
Stat
(
filepath
.
Join
(
*
k8sBinDir
,
bin
));
err
!=
nil
{
return
""
,
fmt
.
Errorf
(
"Could not find %s under directory %s
.
"
,
bin
,
absPath
)
return
""
,
fmt
.
Errorf
(
"Could not find %s under directory %s"
,
bin
,
absPath
)
}
return
filepath
.
Join
(
absPath
,
bin
),
nil
}
path
,
err
:=
filepath
.
Abs
(
filepath
.
Dir
(
os
.
Args
[
0
]))
if
err
!=
nil
{
return
""
,
fmt
.
Errorf
(
"Could not find absolute path of directory containing the tests %s
.
"
,
filepath
.
Dir
(
os
.
Args
[
0
]))
return
""
,
fmt
.
Errorf
(
"Could not find absolute path of directory containing the tests %s"
,
filepath
.
Dir
(
os
.
Args
[
0
]))
}
if
_
,
err
:=
os
.
Stat
(
filepath
.
Join
(
path
,
bin
));
err
==
nil
{
return
filepath
.
Join
(
path
,
bin
),
nil
...
...
@@ -87,6 +88,7 @@ func getK8sBin(bin string) (string, error) {
return
""
,
fmt
.
Errorf
(
"unable to locate %s, Can be defined using --k8s-path"
,
bin
)
}
// GetKubeletServerBin returns the path of kubelet binary.
func
GetKubeletServerBin
()
string
{
bin
,
err
:=
getK8sBin
(
"kubelet"
)
if
err
!=
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