mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -04:00
Cleanup Makefile and .travis.yml (#305)
This fix updates .travis.yml and Makefile for several places: - Remove unneeded `docker pull gcr.io/google_containers/hyperkube-amd64:v1.2.4` (only v1.3.7 was used) - Use docker to deploy etcd (insteadof downloading etcd binary). - Merge `make testk8s` and `make testk8s-setup` (no need to have multiple targets for a couple of tests) - Set version of etcd and kubernetes in .travis.yml (so that it is easy to update new version in the future) Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
21
.travis.yml
21
.travis.yml
@@ -11,6 +11,9 @@ go:
|
||||
|
||||
go_import_path: github.com/miekg/coredns
|
||||
|
||||
env:
|
||||
- ETCD_VERSION=2.3.1 K8S_VERSION=1.3.7
|
||||
|
||||
# In the Travis VM-based build environment, IPv6 networking is not
|
||||
# enabled by default. The sysctl operations below enable IPv6.
|
||||
# IPv6 is needed by some of the CoreDNS test cases. The VM environment
|
||||
@@ -26,22 +29,12 @@ before_install:
|
||||
- env
|
||||
|
||||
before_script:
|
||||
# Download etcd, unpack and launch
|
||||
- curl -L https://github.com/coreos/etcd/releases/download/v2.3.1/etcd-v2.3.1-linux-amd64.tar.gz -o etcd-v2.3.1-linux-amd64.tar.gz
|
||||
- tar xzvf etcd-v2.3.1-linux-amd64.tar.gz
|
||||
- ./etcd-v2.3.1-linux-amd64/etcd &
|
||||
# If docker is available, pull the kubernetes hyperkube image down and launch kubernetes.
|
||||
- if which docker &>/dev/null ; then docker pull gcr.io/google_containers/hyperkube-amd64:v1.2.4 ; docker ps -a ; fi
|
||||
- if which docker &>/dev/null ; then ./contrib/kubernetes/testscripts/start_k8s_with_services.sh ; docker ps -a ; fi
|
||||
# Get golang dependencies, and build coredns binary
|
||||
- go get -v -d ./...
|
||||
- go get github.com/coreos/go-etcd/etcd
|
||||
#- go build -v -ldflags="-s -w"
|
||||
- docker run -d --net=host --name=etcd quay.io/coreos/etcd:v$ETCD_VERSION
|
||||
- ./contrib/kubernetes/testscripts/start_k8s_with_services.sh
|
||||
|
||||
script:
|
||||
- go test -tags etcd -race -bench=. ./...
|
||||
# Run kubernetes integration tests only if kubectl is available. i.e. If kubernetes was launched
|
||||
- ./contrib/kubernetes/testscripts/kubectl version && go test -v -tags k8s -race -bench=. -run 'TestK8sIntegration' ./test
|
||||
- docker ps -a
|
||||
- ./contrib/kubernetes/testscripts/kubectl version
|
||||
- make coverage
|
||||
|
||||
after_success:
|
||||
|
||||
Reference in New Issue
Block a user