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
a161800e
Commit
a161800e
authored
May 11, 2015
by
Max Forbes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow Jenkins to get the version from the GKE server.
parent
5a6b0795
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
1 deletion
+28
-1
e2e.sh
hack/jenkins/e2e.sh
+28
-1
No files found.
hack/jenkins/e2e.sh
View file @
a161800e
...
@@ -114,6 +114,30 @@ if [[ "${E2E_UP,,}" == "true" ]]; then
...
@@ -114,6 +114,30 @@ if [[ "${E2E_UP,,}" == "true" ]]; then
export
KUBE_SKIP_UPDATE
=
y
export
KUBE_SKIP_UPDATE
=
y
sudo
flock
-x
-n
/var/run/lock/gcloud-components.lock
-c
"gcloud components update -q"
||
true
sudo
flock
-x
-n
/var/run/lock/gcloud-components.lock
-c
"gcloud components update -q"
||
true
# For GKE, we can get the server-specified version.
if
[[
${
JENKINS_USE_SERVER_VERSION
:-}
=
~ ^[yY]
$
]]
;
then
# We'll pull our TARs for tests from the release bucket.
bucket
=
"release"
# Get the latest available API version from the GKE apiserver.
# Trim whitespace out of the error message. This gives us something
# like: ERROR:(gcloud.alpha.container.clusters.create)ResponseError:
# code=400,message=cluster.cluster_api_versionmustbeoneof:
# 0.15.0,0.16.0.
# The command should error, so we throw an || true on there.
msg
=
$(
gcloud alpha container clusters create this-wont-work
\
--cluster-api-version
=
0.0.0 2>&1 |
tr
-d
'[[:space:]]'
)
||
true
# Strip out everything before the final colon, which gives us just
# the allowed versions; something like "0.15.0,0.16.0." or "0.16.0."
msg
=
${
msg
##*
:
}
# Take off the final period, which gives us just comma-separated
# allowed versions; something like "0.15.0,0.16.0" or "0.16.0"
msg
=
${
msg
%%\.
}
# Split the version string by comma and read into an array, using
# the last element as the githash, which will be like "v0.16.0".
IFS
=
','
read
-a
varr
<<<
"
${
msg
}
"
githash
=
"v
${
varr
[
${#
varr
[@]
}
- 1]
}
"
else
# The "ci" bucket is for builds like "v0.15.0-468-gfa648c1"
# The "ci" bucket is for builds like "v0.15.0-468-gfa648c1"
bucket
=
"ci"
bucket
=
"ci"
# The "latest" version picks the most recent "ci" or "release" build.
# The "latest" version picks the most recent "ci" or "release" build.
...
@@ -126,8 +150,11 @@ if [[ "${E2E_UP,,}" == "true" ]]; then
...
@@ -126,8 +150,11 @@ if [[ "${E2E_UP,,}" == "true" ]]; then
version_file
=
"stable"
version_file
=
"stable"
fi
fi
fi
fi
githash
=
$(
gsutil
cat
gs://kubernetes-release/
${
bucket
}
/
${
version_file
}
.txt
)
githash
=
$(
gsutil
cat
gs://kubernetes-release/
${
bucket
}
/
${
version_file
}
.txt
)
fi
# At this point, we want to have the following vars set:
# - bucket
# - githash
gsutil
-m
cp
gs://kubernetes-release/
${
bucket
}
/
${
githash
}
/kubernetes.tar.gz gs://kubernetes-release/
${
bucket
}
/
${
githash
}
/kubernetes-test.tar.gz
.
gsutil
-m
cp
gs://kubernetes-release/
${
bucket
}
/
${
githash
}
/kubernetes.tar.gz gs://kubernetes-release/
${
bucket
}
/
${
githash
}
/kubernetes-test.tar.gz
.
fi
fi
...
...
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