forked from kubernetes/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request kubernetes#16566 from jlowdermilk/automated-cherry…
…-pick-of-#16287-kubernetes#16546-kubernetes#16565-upstream-release-1.1 Automated cherry pick of kubernetes#16287 kubernetes#16546 kubernetes#16565
- Loading branch information
Showing
5 changed files
with
160 additions
and
4 deletions.
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
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,46 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2015 The Kubernetes Authors 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. | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
set -o xtrace | ||
|
||
export REPO_DIR=${REPO_DIR:-$(pwd)} | ||
|
||
# Produce a JUnit-style XML test report for Jenkins. | ||
export KUBE_JUNIT_REPORT_DIR=${WORKSPACE}/_artifacts | ||
|
||
# Run the kubekins container, mapping in docker (so we can launch containers), | ||
# the repo directory, and the artifacts output directory. | ||
# | ||
# Note: We pass in the absolute path to the repo on the host as an env var incase | ||
# any tests that get run need to launch containers that also map volumes. | ||
# This is required because if you do | ||
# | ||
# $ docker run -v $PATH:/container/path ... | ||
# | ||
# From _inside_ a container that has the host's docker mapped in, the $PATH | ||
# provided must be resolvable on the *HOST*, not the container. | ||
|
||
docker run --rm=true \ | ||
-v /var/run/docker.sock:/var/run/docker.sock \ | ||
-v "$(which docker)":/bin/docker \ | ||
-v "${REPO_DIR}":/go/src/k8s.io/kubernetes \ | ||
-v "${KUBE_JUNIT_REPORT_DIR}":/workspace/artifacts \ | ||
--env REPO_DIR="${REPO_DIR}" \ | ||
-i gcr.io/google_containers/kubekins-test:0.2 \ | ||
bash -c "cd kubernetes && ./hack/jenkins/test-dockerized.sh" |
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,57 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2015 The Kubernetes Authors 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. | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
set -o xtrace | ||
|
||
# Runs the unit and integration tests, producing JUnit-style XML test | ||
# reports in ${WORKSPACE}/artifacts. This script is intended to be run from | ||
# kubekins-test container with a kubernetes repo mapped in. See | ||
# hack/jenkins/gotest-dockerized.sh | ||
|
||
export PATH=${GOPATH}/bin:${PWD}/third_party/etcd:/usr/local/go/bin:${PATH} | ||
|
||
go get github.com/tools/godep | ||
go get github.com/jstemmer/go-junit-report | ||
|
||
# Enable the Go race detector. | ||
export KUBE_RACE=-race | ||
# Disable coverage report | ||
export KUBE_COVER="n" | ||
# Produce a JUnit-style XML test report for Jenkins. | ||
export KUBE_JUNIT_REPORT_DIR=${WORKSPACE}/artifacts | ||
# Save the verbose stdout as well. | ||
export KUBE_KEEP_VERBOSE_TEST_OUTPUT=y | ||
export KUBE_TIMEOUT='-timeout 300s' | ||
export KUBE_INTEGRATION_TEST_MAX_CONCURRENCY=4 | ||
export LOG_LEVEL=4 | ||
export KUBE_TEST_API_VERSIONS=v1,extensions/v1beta1 | ||
export KUBE_TEST_ETCD_PREFIXES=registry | ||
|
||
./hack/build-go.sh | ||
godep go install ./... | ||
./hack/travis/install-etcd.sh | ||
|
||
./hack/verify-all.sh -v | ||
|
||
./hack/test-go.sh -- -p=2 | ||
./hack/test-cmd.sh | ||
./hack/test-integration.sh | ||
./hack/test-update-storage-objects.sh | ||
|
||
|
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,31 @@ | ||
# Copyright 2015 The Kubernetes Authors 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. | ||
|
||
# This file creates a build environment for building and running kubernetes | ||
# unit and integration tests | ||
|
||
FROM golang:1.4 | ||
MAINTAINER Jeff Lowdermilk <jeffml@google.com> | ||
|
||
ENV WORKSPACE /workspace | ||
ENV TERM xterm | ||
|
||
WORKDIR /workspace | ||
|
||
RUN apt-get -o Acquire::Check-Valid-Until=false update && apt-get install -y rsync | ||
RUN apt-get install -y file | ||
RUN mkdir -p /go/src/k8s.io/kubernetes | ||
RUN ln -s /go/src/k8s.io/kubernetes /workspace/kubernetes | ||
|
||
RUN /bin/bash |
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,13 @@ | ||
all: push | ||
|
||
TAG = 0.2 | ||
|
||
container: | ||
docker build -t gcr.io/google_containers/kubekins-test . | ||
docker tag gcr.io/google_containers/kubekins-test gcr.io/google_containers/kubekins-test:$(TAG) | ||
|
||
push: container | ||
gcloud docker push gcr.io/google_containers/kubekins-test # Push image tagged as latest to repository | ||
gcloud docker push gcr.io/google_containers/kubekins-test:$(TAG) # Push version tagged image to repository (since this image is already pushed it will simply create or update version tag) | ||
|
||
clean: |