forked from operator-framework/operator-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (41 loc) · 1.38 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
language: go
go_import_path: github.com/operator-framework/operator-sdk
sudo: required
services:
- docker
go:
- 1.10.3
jobs:
include:
- before_script: hack/ci/setup-minikube.sh
env:
- CLUSTER=minikube
- CHANGE_MINIKUBE_NONE_USER=true
- before_script: hack/ci/setup-openshift.sh
env: CLUSTER=openshift
install:
- curl -Lo dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 && chmod +x dep && sudo mv dep /usr/local/bin/
- dep ensure
# Create example operator directory
- mkdir -p $GOPATH/src/github.com/example-inc
script:
- make install
- go test ./commands/...
- go test ./pkg/...
- go test ./test/e2e/...
- cd test/test-framework
# test framework with defaults
- operator-sdk test local .
# test operator-sdk test flags
- operator-sdk test local . --global-manifest deploy/crd.yaml --namespaced-manifest deploy/namespace-init.yaml --go-test-flags "-parallel 1" --kubeconfig $HOME/.kube/config
# go back to project root
- cd ../..
- go vet ./...
- ./hack/check_license.sh
- ./hack/check_error_case.sh
# Make sure repo is in clean state
- git diff --exit-code
after_success:
- echo 'Build succeeded, operator was generated, memcached operator is running on $CLUSTER, and unit/integration tests pass'
after_failure:
- echo 'Build failed, operator failed to generate, memcached operator is not running on $CLUSTER, or unit/integration tests failed'