-
Notifications
You must be signed in to change notification settings - Fork 40k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Jenkins e2e script #3415
Merged
Merged
Add Jenkins e2e script #3415
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2015 Google Inc. All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# kubernetes-e2e-{gce, gke, gke-ci} jobs: This script is triggered by | ||
# the kubernetes-build job, or runs every half hour. We abort this job | ||
# if it takes more than 75m. As of initial commit, it typically runs | ||
# in about half an hour. | ||
# | ||
# The "Workspace Cleanup Plugin" is installed and in use for this job, | ||
# so the ${WORKSPACE} directory (the current directory) is currently | ||
# empty. | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
set -o xtrace | ||
|
||
if [[ $(find . | wc -l) != 1 ]]; then | ||
echo $PWD not empty, bailing! | ||
exit 1 | ||
fi | ||
|
||
# Unlike the kubernetes-build script, we expect some environment | ||
# variables to be set. We echo these immediately and presume "set -o | ||
# nounset" will force the caller to set them: (The first several are | ||
# Jenkins variables.) | ||
|
||
echo "JOB_NAME: ${JOB_NAME}" | ||
echo "BUILD_NUMBER: ${BUILD_NUMBER}" | ||
echo "WORKSPACE: ${WORKSPACE}" | ||
echo "KUBERNETES_PROVIDER: ${KUBERNETES_PROVIDER}" # Cloud provider | ||
echo "E2E_CLUSTER_NAME: ${E2E_CLUSTER_NAME}" # Name of the cluster (e.g. "e2e-test-jenkins") | ||
echo "E2E_NETWORK: ${E2E_NETWORK}" # Name of the network (e.g. "e2e") | ||
echo "E2E_ZONE: ${E2E_ZONE}" # Name of the GCE zone (e.g. "us-central1-f") | ||
echo "E2E_OPT: ${E2E_OPT}" # hack/e2e.go options | ||
echo "--------------------------------------------------------------------------------" | ||
|
||
# GCE variables | ||
export INSTANCE_PREFIX=${E2E_CLUSTER_NAME} | ||
export KUBE_GCE_ZONE=${E2E_ZONE} | ||
export KUBE_GCE_NETWORK=${E2E_NETWORK} | ||
|
||
# GKE variables | ||
export CLUSTER_NAME=${E2E_CLUSTER_NAME} | ||
export ZONE=${E2E_ZONE} | ||
export KUBE_GKE_NETWORK=${E2E_NETWORK} | ||
|
||
export PATH=${PATH}:/usr/local/go/bin | ||
export HOME=${WORKSPACE} # Nothing should want Jenkins $HOME | ||
export KUBE_SKIP_CONFIRMATIONS=y | ||
|
||
# sudo gcloud components update -q | ||
|
||
GITHASH=$(gsutil cat gs://kubernetes-release/ci/latest.txt) | ||
gsutil -m cp gs://kubernetes-release/ci/${GITHASH}/kubernetes.tar.gz gs://kubernetes-release/ci/${GITHASH}/kubernetes-test.tar.gz . | ||
md5sum kubernetes*.tar.gz | ||
tar -xzf kubernetes.tar.gz | ||
tar -xzf kubernetes-test.tar.gz | ||
cd kubernetes | ||
|
||
# This variable is only relevant on GKE-CI | ||
export CLUSTER_API_VERSION=$(echo ${GITHASH} | cut -c 2-) | ||
|
||
go run ./hack/e2e.go ${E2E_OPT} -v -down | ||
go run ./hack/e2e.go ${E2E_OPT} -v -up | ||
go run ./hack/e2e.go -v -ctl="version --match-server-version=false" | ||
go run ./hack/e2e.go ${E2E_OPT} --test -tap | tee ../e2e.${JOB_NAME}.${BUILD_NUMBER}.${GITHASH}.tap | ||
go run ./hack/e2e.go ${E2E_OPT} -v -down |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is "match-server-version=false" needed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
kubernetes-e2e-gke
job is version skewed, andhack/e2e.go
adds--match-server-version
before callingkubectl
, so this is basically counteracting it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this is testing a new client on an old cluster?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's one of the jobs, and it also has to explicitly change E2E_OPT. I'm
just logging the client/server versions here, so really just want something
that won't error out regardless.
On Mon, Jan 12, 2015, 14:54 Daniel Smith notifications@github.com wrote: