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
881e21c2
Commit
881e21c2
authored
May 30, 2016
by
Tim Hockin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Link _output/bin/ to real binaries for this arch
This makes followup commits easier wrt finding binaries during build.
parent
faeef5c4
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
1 deletion
+17
-1
Dockerfile
build/build-image/Dockerfile
+5
-1
common.sh
build/common.sh
+5
-0
kubectl.sh
cluster/kubectl.sh
+1
-0
golang.sh
hack/lib/golang.sh
+2
-0
init.sh
hack/lib/init.sh
+3
-0
util.sh
hack/lib/util.sh
+1
-0
No files found.
build/build-image/Dockerfile
View file @
881e21c2
...
@@ -25,7 +25,11 @@ RUN chmod -R a+rwx /usr/local/go/pkg
...
@@ -25,7 +25,11 @@ RUN chmod -R a+rwx /usr/local/go/pkg
# of operations.
# of operations.
ENV
HOME /go/src/k8s.io/kubernetes
ENV
HOME /go/src/k8s.io/kubernetes
WORKDIR
${HOME}
WORKDIR
${HOME}
RUN
chmod
-R
a+rwx
${
HOME
}
# We have to mkdir the dirs we need, or else Docker will create them when we
# mount volumes, and it will create them with root-only permissions. The
# explicit chmod of _output is required, but I can't really explain why.
RUN
mkdir
-p
${
HOME
}
${
HOME
}
/_output
\
&&
chmod
-R
a+rwx
${
HOME
}
${
HOME
}
/_output
# Propagate the git tree version into the build image
# Propagate the git tree version into the build image
ADD
kube-version-defs /kube-version-defs
ADD
kube-version-defs /kube-version-defs
...
...
build/common.sh
View file @
881e21c2
...
@@ -64,6 +64,9 @@ readonly LOCAL_OUTPUT_BINPATH="${LOCAL_OUTPUT_SUBPATH}/bin"
...
@@ -64,6 +64,9 @@ readonly LOCAL_OUTPUT_BINPATH="${LOCAL_OUTPUT_SUBPATH}/bin"
readonly
LOCAL_OUTPUT_GOPATH
=
"
${
LOCAL_OUTPUT_SUBPATH
}
/go"
readonly
LOCAL_OUTPUT_GOPATH
=
"
${
LOCAL_OUTPUT_SUBPATH
}
/go"
readonly
LOCAL_OUTPUT_IMAGE_STAGING
=
"
${
LOCAL_OUTPUT_ROOT
}
/images"
readonly
LOCAL_OUTPUT_IMAGE_STAGING
=
"
${
LOCAL_OUTPUT_ROOT
}
/images"
# This is a symlink to binaries for "this platform" (e.g. build tools).
readonly
THIS_PLATFORM_BIN
=
"
${
LOCAL_OUTPUT_ROOT
}
/bin"
readonly
OUTPUT_BINPATH
=
"
${
CUSTOM_OUTPUT_BINPATH
:-
$LOCAL_OUTPUT_BINPATH
}
"
readonly
OUTPUT_BINPATH
=
"
${
CUSTOM_OUTPUT_BINPATH
:-
$LOCAL_OUTPUT_BINPATH
}
"
readonly
REMOTE_OUTPUT_ROOT
=
"/go/src/
${
KUBE_GO_PACKAGE
}
/_output"
readonly
REMOTE_OUTPUT_ROOT
=
"/go/src/
${
KUBE_GO_PACKAGE
}
/_output"
...
@@ -672,6 +675,8 @@ function kube::build::copy_output() {
...
@@ -672,6 +675,8 @@ function kube::build::copy_output() {
kube::log::status
"Syncing back _output/dockerized/bin directory from remote Docker"
kube::log::status
"Syncing back _output/dockerized/bin directory from remote Docker"
rm
-rf
"
${
LOCAL_OUTPUT_BINPATH
}
"
rm
-rf
"
${
LOCAL_OUTPUT_BINPATH
}
"
mkdir
-p
"
${
LOCAL_OUTPUT_BINPATH
}
"
mkdir
-p
"
${
LOCAL_OUTPUT_BINPATH
}
"
rm
-f
"
${
THIS_PLATFORM_BIN
}
"
ln
-s
"
${
LOCAL_OUTPUT_BINPATH
}
"
"
${
THIS_PLATFORM_BIN
}
"
kube::build::destroy_container
"
${
KUBE_BUILD_CONTAINER_NAME
}
"
kube::build::destroy_container
"
${
KUBE_BUILD_CONTAINER_NAME
}
"
"
${
docker_cmd
[@]
}
"
bash
-c
"cp -r
${
REMOTE_OUTPUT_BINPATH
}
/tmp/bin;touch /tmp/finished;rm /tmp/bin/test_for_remote;/bin/sleep 600"
>
/dev/null 2>&1
"
${
docker_cmd
[@]
}
"
bash
-c
"cp -r
${
REMOTE_OUTPUT_BINPATH
}
/tmp/bin;touch /tmp/finished;rm /tmp/bin/test_for_remote;/bin/sleep 600"
>
/dev/null 2>&1
...
...
cluster/kubectl.sh
View file @
881e21c2
...
@@ -85,6 +85,7 @@ esac
...
@@ -85,6 +85,7 @@ esac
# to find the latest one.
# to find the latest one.
if
[[
-z
"
${
KUBECTL_PATH
:-}
"
]]
;
then
if
[[
-z
"
${
KUBECTL_PATH
:-}
"
]]
;
then
locations
=(
locations
=(
"
${
KUBE_ROOT
}
/_output/bin/kubectl"
"
${
KUBE_ROOT
}
/_output/dockerized/bin/
${
host_os
}
/
${
host_arch
}
/kubectl"
"
${
KUBE_ROOT
}
/_output/dockerized/bin/
${
host_os
}
/
${
host_arch
}
/kubectl"
"
${
KUBE_ROOT
}
/_output/local/bin/
${
host_os
}
/
${
host_arch
}
/kubectl"
"
${
KUBE_ROOT
}
/_output/local/bin/
${
host_os
}
/
${
host_arch
}
/kubectl"
"
${
KUBE_ROOT
}
/platforms/
${
host_os
}
/
${
host_arch
}
/kubectl"
"
${
KUBE_ROOT
}
/platforms/
${
host_os
}
/
${
host_arch
}
/kubectl"
...
...
hack/lib/golang.sh
View file @
881e21c2
...
@@ -375,6 +375,8 @@ kube::golang::place_bins() {
...
@@ -375,6 +375,8 @@ kube::golang::place_bins() {
local
platform_src
=
"/
${
platform
//\//_
}
"
local
platform_src
=
"/
${
platform
//\//_
}
"
if
[[
$platform
==
$host_platform
]]
;
then
if
[[
$platform
==
$host_platform
]]
;
then
platform_src
=
""
platform_src
=
""
rm
-f
"
${
THIS_PLATFORM_BIN
}
"
ln
-s
"
${
KUBE_OUTPUT_BINPATH
}
/
${
platform
}
"
"
${
THIS_PLATFORM_BIN
}
"
fi
fi
local
full_binpath_src
=
"
${
KUBE_GOPATH
}
/bin
${
platform_src
}
"
local
full_binpath_src
=
"
${
KUBE_GOPATH
}
/bin
${
platform_src
}
"
...
...
hack/lib/init.sh
View file @
881e21c2
...
@@ -29,6 +29,9 @@ KUBE_OUTPUT_BINPATH="${KUBE_OUTPUT}/bin"
...
@@ -29,6 +29,9 @@ KUBE_OUTPUT_BINPATH="${KUBE_OUTPUT}/bin"
# the connections to localhost in scripts will time out
# the connections to localhost in scripts will time out
export
no_proxy
=
127.0.0.1,localhost
export
no_proxy
=
127.0.0.1,localhost
# This is a symlink to binaries for "this platform", e.g. build tools.
THIS_PLATFORM_BIN
=
"
${
KUBE_ROOT
}
/_output/bin"
source
"
${
KUBE_ROOT
}
/hack/lib/util.sh"
source
"
${
KUBE_ROOT
}
/hack/lib/util.sh"
source
"
${
KUBE_ROOT
}
/cluster/lib/util.sh"
source
"
${
KUBE_ROOT
}
/cluster/lib/util.sh"
source
"
${
KUBE_ROOT
}
/cluster/lib/logging.sh"
source
"
${
KUBE_ROOT
}
/cluster/lib/logging.sh"
...
...
hack/lib/util.sh
View file @
881e21c2
...
@@ -168,6 +168,7 @@ kube::util::find-binary() {
...
@@ -168,6 +168,7 @@ kube::util::find-binary() {
local
lookfor
=
"
${
1
}
"
local
lookfor
=
"
${
1
}
"
local
host_platform
=
"
$(
kube::util::host_platform
)
"
local
host_platform
=
"
$(
kube::util::host_platform
)
"
local
locations
=(
local
locations
=(
"
${
KUBE_ROOT
}
/_output/bin/
${
lookfor
}
"
"
${
KUBE_ROOT
}
/_output/dockerized/bin/
${
host_platform
}
/
${
lookfor
}
"
"
${
KUBE_ROOT
}
/_output/dockerized/bin/
${
host_platform
}
/
${
lookfor
}
"
"
${
KUBE_ROOT
}
/_output/local/bin/
${
host_platform
}
/
${
lookfor
}
"
"
${
KUBE_ROOT
}
/_output/local/bin/
${
host_platform
}
/
${
lookfor
}
"
"
${
KUBE_ROOT
}
/platforms/
${
host_platform
}
/
${
lookfor
}
"
"
${
KUBE_ROOT
}
/platforms/
${
host_platform
}
/
${
lookfor
}
"
...
...
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