mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-16 22:53:22 +00:00
Modify jenkins unit/integration scripts to work on branches
Also add a makefile. This will need a cherrypick onto 1.0,1.1 with edits to hack/jenkins/test-dockerized.sh to run branch-specific test scripts. Also had to modify hack/verify-api-reference.sh to handle volume mount path peculiarity when doing `docker run -v` inside a container started with `docker run -v`. See associated comment in hack/jenkins/test-dockerized.sh
This commit is contained in:
@@ -16,16 +16,17 @@
|
||||
# unit and integration tests
|
||||
|
||||
FROM golang:1.4
|
||||
MAINTAINER jeff lowdermilk <jeffml@google.com>
|
||||
MAINTAINER Jeff Lowdermilk <jeffml@google.com>
|
||||
|
||||
ENV KUBE_TEST_API_VERSIONS v1,extensions/v1beta1
|
||||
ENV KUBE_TEST_ETCD_PREFIXES registry
|
||||
ENV WORKSPACE /workspace
|
||||
ENV TERM xterm
|
||||
|
||||
WORKDIR /workspace
|
||||
ADD run.sh ./
|
||||
|
||||
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
|
||||
|
||||
|
13
hack/jenkins/test-image/Makefile
Normal file
13
hack/jenkins/test-image/Makefile
Normal file
@@ -0,0 +1,13 @@
|
||||
all: push
|
||||
|
||||
TAG = 0.1
|
||||
|
||||
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:
|
@@ -1,61 +0,0 @@
|
||||
#!/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 PATH=${GOPATH}/bin:${PWD}/third_party/etcd:/usr/local/go/bin:${PATH}
|
||||
|
||||
./hack/install-etcd.sh
|
||||
go get -u github.com/jstemmer/go-junit-report
|
||||
go get golang.org/x/tools/cmd/cover
|
||||
go get github.com/mattn/goveralls
|
||||
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_GOVERALLS_BIN="${GOPATH}/bin/goveralls"
|
||||
export KUBE_TIMEOUT='-timeout 300s'
|
||||
export KUBE_COVERPROCS=8
|
||||
export KUBE_INTEGRATION_TEST_MAX_CONCURRENCY=4
|
||||
export LOG_LEVEL=4
|
||||
|
||||
./hack/verify-gofmt.sh
|
||||
./hack/verify-boilerplate.sh
|
||||
./hack/verify-description.sh
|
||||
./hack/verify-flags-underscore.py
|
||||
./hack/verify-generated-conversions.sh
|
||||
./hack/verify-generated-deep-copies.sh
|
||||
./hack/verify-generated-docs.sh
|
||||
./hack/verify-generated-swagger-docs.sh
|
||||
./hack/verify-swagger-spec.sh
|
||||
./hack/verify-linkcheck.sh
|
||||
|
||||
./hack/test-go.sh -- -p=2
|
||||
./hack/test-cmd.sh
|
||||
./hack/test-integration.sh
|
||||
./hack/test-update-storage-objects.sh
|
||||
|
||||
|
Reference in New Issue
Block a user