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
e4952581
Commit
e4952581
authored
Aug 18, 2016
by
Daniel Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
e2e-runner: Get GCI builtin k8s version from GCS
Instead of parsing unstructured image description.
parent
9d2a5fe5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
e2e-runner.sh
hack/jenkins/e2e-runner.sh
+4
-8
No files found.
hack/jenkins/e2e-runner.sh
View file @
e4952581
...
@@ -173,17 +173,13 @@ function install_google_cloud_sdk_tarball() {
...
@@ -173,17 +173,13 @@ function install_google_cloud_sdk_tarball() {
}
}
# Figures out the builtin k8s version of a GCI image.
# Figures out the builtin k8s version of a GCI image.
# Assumes: JENKINS_GCI_IMAGE_FAMILY and KUBE_GCE_MASTER_IMAGE
function
get_gci_k8s_version
()
{
function
get_gci_k8s_version
()
{
local
-r
image_description
=
$(
gcloud compute images describe
${
KUBE_GCE_MASTER_IMAGE
}
--project
=
${
KUBE_GCE_MASTER_PROJECT
})
if
[[
-z
"
${
JENKINS_GCI_IMAGE_FAMILY
:-}
"
]]
||
[[
-z
"
${
KUBE_GCE_MASTER_IMAGE
:-}
"
]]
;
then
# Staged GCI images all include versions in their image descriptions so we
echo
"JENKINS_GCI_IMAGE_FAMILY and KUBE_GCE_MASTER_IMAGE must be set."
# extract builtin Kubernetes version from them.
local
-r
k8s_version_re
=
'.*Kubernetes: ([0-9a-z.-]+),.*'
if
[[
${
image_description
}
=
~
${
k8s_version_re
}
]]
;
then
local
-r
gci_k8s_version
=
"v
${
BASH_REMATCH
[1]
}
"
else
echo
"Failed to determine builtin k8s version for image
${
image_name
}
:
${
image_description
}
"
exit
1
exit
1
fi
fi
local
-r
gci_k8s_version
=
"v
$(
gsutil
cat
gs://container-vm-image-staging/k8s-version-map/
${
KUBE_GCE_MASTER_IMAGE
})
"
echo
"
${
gci_k8s_version
}
"
echo
"
${
gci_k8s_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