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
853bfdcb
Commit
853bfdcb
authored
Aug 09, 2016
by
Kubernetes Submit Queue
Committed by
GitHub
Aug 09, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #30324 from david-mcmahon/fix-cache
Automatic merge from submit-queue Figure out where kubernetes is in the various scopes this is called from. cc @spxtr
parents
64af5b07
2a06a8f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
upload-to-gcs.sh
hack/jenkins/upload-to-gcs.sh
+21
-2
No files found.
hack/jenkins/upload-to-gcs.sh
View file @
853bfdcb
...
@@ -64,19 +64,38 @@ readonly results_url=${gcs_build_path//"gs:/"/"https://console.cloud.google.com/
...
@@ -64,19 +64,38 @@ readonly results_url=${gcs_build_path//"gs:/"/"https://console.cloud.google.com/
readonly
timestamp
=
$(
date
+%s
)
readonly
timestamp
=
$(
date
+%s
)
#########################################################################
#########################################################################
# $0 is called from different contexts so figure out where kubernetes is.
# Sets non-exported global kubernetes_base_path and defaults to "."
function
set_kubernetes_base_path
()
{
for
kubernetes_base_path
in
kubernetes go/src/k8s.io/kubernetes .
;
do
# Pick a canonical item to find in a kubernetes tree which could be a
# raw source tree or an expanded tarball.
[[
-f
${
kubernetes_base_path
}
/cluster/common.sh
]]
&&
break
done
}
#########################################################################
# Try to discover the kubernetes version.
# Try to discover the kubernetes version.
# prints version
# prints version
function
find_version
()
{
function
find_version
()
{
(
# Where are we?
# This could be set in the global scope at some point if we need to
# discover the kubernetes path elsewhere.
set_kubernetes_base_path
cd
${
kubernetes_base_path
}
if
[[
-e
"version"
]]
;
then
if
[[
-e
"version"
]]
;
then
cat
version
cat
version
elif
[[
-e
"hack/lib/version.sh"
]]
;
then
elif
[[
-e
"hack/lib/version.sh"
]]
;
then
(
export
KUBE_ROOT
=
"."
export
KUBE_ROOT
=
"."
source
"hack/lib/version.sh"
source
"hack/lib/version.sh"
kube::version::get_version_vars
kube::version::get_version_vars
echo
"
${
KUBE_GIT_VERSION
-
}
"
echo
"
${
KUBE_GIT_VERSION
-
}
"
)
fi
fi
)
}
}
function
upload_version
()
{
function
upload_version
()
{
...
...
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