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
b0ae0d07
Commit
b0ae0d07
authored
Apr 04, 2017
by
Jeff Grafton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make get-kube.sh work properly the "ci/latest" pointer
parent
3a3dc827
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
get-kube-binaries.sh
cluster/get-kube-binaries.sh
+1
-1
get-kube.sh
cluster/get-kube.sh
+13
-11
No files found.
cluster/get-kube-binaries.sh
View file @
b0ae0d07
...
...
@@ -41,7 +41,7 @@ set -o pipefail
KUBE_ROOT
=
$(
cd
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
&&
pwd
)
KUBERNETES_RELEASE_URL
=
"
${
KUBERNETES_RELEASE_URL
:-
https
://
storage.googleapis.com/kubernetes-release/release
}
"
KUBERNETES_RELEASE_URL
=
"
${
KUBERNETES_RELEASE_URL
:-
https
://
dl.k8s.io
}
"
function
detect_kube_release
()
{
if
[[
-n
"
${
KUBE_VERSION
:-}
"
]]
;
then
...
...
cluster/get-kube.sh
View file @
b0ae0d07
...
...
@@ -81,7 +81,7 @@ KUBE_CI_VERSION_REGEX="^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)-(be
# KUBE_VERSION
function
set_binary_version
()
{
if
[[
"
${
1
}
"
=
~
"/"
]]
;
then
export
KUBE_VERSION
=
$(
curl
-fL
"https://dl.k8s.io/
${
1
}
.txt"
)
export
KUBE_VERSION
=
$(
curl
-f
sS
L
"https://dl.k8s.io/
${
1
}
.txt"
)
else
export
KUBE_VERSION
=
${
1
}
fi
...
...
@@ -93,7 +93,9 @@ function download_kube_binaries {
(
cd
kubernetes
if
[[
-x
./cluster/get-kube-binaries.sh
]]
;
then
./cluster/get-kube-binaries.sh
# Make sure to use the same download URL in get-kube-binaries.sh
KUBERNETES_RELEASE_URL
=
"
${
KUBERNETES_RELEASE_URL
}
"
\
./cluster/get-kube-binaries.sh
fi
)
}
...
...
@@ -177,15 +179,15 @@ release=${KUBERNETES_RELEASE:-"release/stable"}
# Validate Kubernetes release version.
# Translate a published version <bucket>/<version> (e.g. "release/stable") to version number.
set_binary_version
"
${
release
}
"
if
[[
${
KUBE_VERSION
}
=
~
${
KUBE_
RELEASE
_VERSION_REGEX
}
]]
;
then
release_url
=
"
${
KUBERNETES_RELEASE_URL
}
/
${
KUBE_VERSION
}
/
${
file
}
"
elif
[[
${
KUBE_VERSION
}
=
~
${
KUBE_CI_VERSION_REGEX
}
]]
;
then
release_url
=
"
${
KUBERNETES_CI_RELEASE_URL
}
/
${
KUBE_VERSION
}
/
${
file
}
"
el
se
if
[[
${
KUBE_VERSION
}
=
~
${
KUBE_
CI
_VERSION_REGEX
}
]]
;
then
# Override KUBERNETES_RELEASE_URL to point to the CI bucket;
# this will be used by get-kube-binaries.sh.
KUBERNETES_RELEASE_URL
=
"
${
KUBERNETES_CI_RELEASE_URL
}
"
el
if
!
[[
${
KUBE_VERSION
}
=
~
${
KUBE_RELEASE_VERSION_REGEX
}
]]
;
then
echo
"Version doesn't match regexp"
>
&2
exit
1
fi
kubernetes_tar_url
=
"
${
KUBERNETES_RELEASE_URL
}
/
${
KUBE_VERSION
}
/
${
file
}
"
need_download
=
true
if
[[
-r
"
${
PWD
}
/
${
file
}
"
]]
;
then
...
...
@@ -199,7 +201,7 @@ fi
if
"
${
need_download
}
"
;
then
echo
"Downloading kubernetes release
${
KUBE_VERSION
}
"
echo
" from
${
release
_url
}
"
echo
" from
${
kubernetes_tar
_url
}
"
echo
" to
${
PWD
}
/
${
file
}
"
fi
...
...
@@ -225,9 +227,9 @@ fi
if
"
${
need_download
}
"
;
then
if
[[
$(
which curl
)
]]
;
then
curl
-fL
--retry
3
--keepalive-time
2
"
${
release
_url
}
"
-o
"
${
file
}
"
curl
-fL
--retry
3
--keepalive-time
2
"
${
kubernetes_tar
_url
}
"
-o
"
${
file
}
"
elif
[[
$(
which wget
)
]]
;
then
wget
"
${
release
_url
}
"
wget
"
${
kubernetes_tar
_url
}
"
else
echo
"Couldn't find curl or wget. Bailing out."
exit
1
...
...
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