ceph-csi/.travis.yml
Madhu Rajanna 9bb23e4e32 code changes for E2E
update travis and makefile for functional test

skip docker pull if image is already present
on local machine.

if the image is not present locally  pull the
image from repo.

export kubeconfig in travis

build cephcsi image in travis job for
functional testing

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-06-04 11:39:40 +05:30

69 lines
1.7 KiB
YAML

---
# need for docker build
sudo: true
dist: xenial
addons:
apt:
packages:
- realpath
- ruby
services:
- docker
language: go
branches:
only:
- csi-v0.3
- master
go: 1.11.x
env:
global:
- GOLANGCI_VERSION="v1.15.0"
- TEST_COVERAGE=stdout
- GO_METALINTER_THREADS=1
- GO_COVER_DIR=_output
- VM_DRIVER=none
- KUBE_VERSION=v1.14.2
- MINIKUBE_VERSION=v1.1.0
- CHANGE_MINIKUBE_NONE_USER=true
- KUBECONFIG=$HOME/.kube/config
jobs:
include:
- name: static-check-make
install:
- gem install mdl
- pip install --user --upgrade pip
- pip install --user yamllint
# install golangci-lint
- curl -sf
"https://install.goreleaser.com/github.com/golangci/golangci-lint.sh"
| bash -s -- -b $GOPATH/bin "${GOLANGCI_VERSION}"
script:
- scripts/lint-text.sh --require-all
- scripts/lint-go.sh
- scripts/test-go.sh
- name: cephcsi
script:
- scripts/skip-doc-change.sh || travis_terminate 0;
- make cephcsi || travis_terminate 1;
- make image-cephcsi || travis_terminate 1;
- sudo scripts/minikube.sh up || travis_terminate 1;
# pull docker images to speed up e2e
- scripts/minikube.sh cephcsi
- scripts/minikube.sh k8s-sidecar
- "sudo chown -R travis: $HOME/.minikube /usr/local/bin/kubectl"
# functional tests
- make func-test TESTOPTIONS='--rook-version=v1.0.0 \
--deploy-rook=true --deploy-timeout=10 -timeout=20m -v'
deploy:
- provider: script
on: # yamllint disable-line rule:truthy
all_branches: true
script: ./deploy.sh