-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy path.travis.yml
83 lines (71 loc) · 2.64 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
# Copyright © 2020 The OpenEBS Authors
#
# 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.
dist: bionic
language: go
go:
- 1.13.x
env:
global:
- ARCH=$(go env GOARCH)
- CHANGE_MINIKUBE_NONE_USER=true
- MINIKUBE_WANTUPDATENOTIFICATION=false
- MINIKUBE_WANTREPORTERRORPROMPT=false
- MINIKUBE_HOME=$HOME
- CHANGE_MINIKUBE_NONE_USER=true
- KUBECONFIG=$HOME/.kube/config
sudo: required
services:
- docker
jobs:
include:
- os: linux
arch: amd64
addons:
apt:
update: true
install:
- if [ "$TRAVIS_BUILD_DIR" != "$GOPATH/src/github.com/openebs/cstor-operators" ]; then
mkdir -p $GOPATH/src/github.com/openebs/;
mv $TRAVIS_BUILD_DIR $GOPATH/src/github.com/openebs;
cd $GOPATH/src/github.com/openebs/cstor-operators;
fi
- make deps
before_script: # TODO add golangci yaml config
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.25.0
- if [ "$TRAVIS_CPU_ARCH" == "amd64" ]; then
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.18.1/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/;
curl -Lo minikube https://storage.googleapis.com/minikube/releases/v1.8.1/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/;
mkdir -p $HOME/.kube $HOME/.minikube;
touch $KUBECONFIG;
sudo minikube start --vm-driver=none --kubernetes-version=v1.16.0;
sudo chown -R travis /home/travis/.minikube/;
JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'; until kubectl get nodes -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do sleep 1; done;
fi
script:
- make test
- if [ "$TRAVIS_CPU_ARCH" == "amd64" ]; then
make all.amd64 || exit 1;
fi
# Install openebs-operators, cstor-csi, ndm-operators and other
# dependencies.
- ./ci/sanity/install.sh
# Run the sanity integration test for cstor-operators
- ./ci/sanity/sanity.sh
after_success:
- make deploy-images
notifications:
email:
recipients: