forked from cloudfoundry-incubator/quarks-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
83 lines (74 loc) · 2.35 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
language: go
go:
- '1.13.7'
cache:
directories:
- $GOPATH/pkg/mod
services:
- docker
env:
global:
- GOPROXY="https://proxy.golang.org"
- DOCKER_IMAGE_TAG=dev
- CF_OPERATOR_WEBHOOK_SERVICE_HOST=172.17.0.1
- OPERATOR_TEST_STORAGE_CLASS=standard
jobs:
- KUBE=1.14.10
- KUBE=1.15.7
- KUBE=1.16.4
- KUBE=1.17.0
- KUBE=1.18.0
stages:
- lint
- unit
- test
install:
# Download ruby dev dependencies
- gem install bosh-template
# Download go dev dependencies
- export PATH=$PATH:$GOPATH/bin
- go install github.com/onsi/ginkgo/ginkgo
# speed up build?
- go mod vendor
# Avoid too many builds.
# Otherwise opening a PR from a local branch would trigger two builds.
if: tag IS blank AND (type = push OR (type = pull_request AND head_repo != repo))
before_script:
# Download and install helm
- curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 > get_helm.sh
- chmod 700 get_helm.sh
- sudo ./get_helm.sh
# Download and install kubectl
- curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
# Download and install KinD
- curl -Lo kind https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-linux-amd64 && chmod +x kind && sudo mv kind /usr/local/bin/
# Create a new Kubernetes cluster using KinD
- kind create cluster --image kindest/node:v$KUBE --name kind$KUBE --wait 240s
- kubectl version
script:
- bin/build-image
- kind load docker-image "cfcontainerization/cf-operator:dev" --name kind$KUBE
- bin/test-integration
- bin/test-integration storage
- bin/test-integration util
- bin/test-cli-e2e
- bin/test-helm-e2e
- bin/test-helm-e2e-storage
jobs:
include:
- stage: lint
services: []
before_script:
- curl -LO https://github.com/dominikh/go-tools/releases/download/2019.2.3/staticcheck_linux_amd64.tar.gz
- tar xfz staticcheck_linux_amd64.tar.gz --strip-component 1 -C $GOPATH/bin staticcheck/staticcheck
- go get -u golang.org/x/lint/golint
name: lint
script:
- bin/lint
- bin/vet
- bin/staticcheck
- script: bin/test-unit
name: unit
# don't inherit
services: []
before_script: []