Skip to content

Commit

Permalink
Merge pull request #16 from tiraboschi/travis_ci
Browse files Browse the repository at this point in the history
Setup Travis CI
  • Loading branch information
tiraboschi authored Nov 26, 2018
2 parents 5eca530 + b55bd50 commit 185d77c
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# remove once https://github.com/fabiand/traviskube/pull/26 got merged/fixed
openshift.local.clusterup
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "ci"]
path = ci
url = https://github.com/fabiand/traviskube
47 changes: 47 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
sudo: required
dist: xenial

branches:
only:
- master
- "/^v[0-9]/"

env:
global:
- KUBEVIRT_VER=0.9.1

jobs:
include:
# - stage: Tests
# name: "Default (minikube with latest k8s)"

# - name: "minikube (latest k8s)"
# env: CPLATFORM=minikube

- name: "oc cluster (latest okd)"
env: CPLATFORM=oc_cluster

- name: "minishift (latest okd)"
env: CPLATFORM=minishift

# - name: "minikube (K8s v1.10)"
# env: CPLATFORM=minikube CVER=1.10.7

cache:
directories:
- cache
- "~/.minishift/cache"
- "~/.minikube/cache"

before_script:
## FIXME Workaround for https://github.com/kubernetes/kubernetes/issues/61058
### And https://github.com/LiliC/travis-minikube/blob/e0f26f7b388057f51a0e2558afd5f990e07b6c49/.travis.yml#L11
- sudo mount --make-rshared /

- bash -x ci/prepare-host $CPLATFORM
#- bash -x ci/prepare-host virtctl
- bash -x ci/start-cluster $CPLATFORM $CVER
#- bash -x ci/deploy-kubevirt $CPLATFORM

script:
- timeout 10m bash -x test.sh
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,10 @@ build: role
push:
docker push $(REPO):$(TAG)

.PHONY: role build push undeploy deploy
##############
# Tests #
##############

test: ;

.PHONY: role build push undeploy deploy test
1 change: 1 addition & 0 deletions ci
Submodule ci added at ea8e64
10 changes: 10 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ci/wait-pods-ok
make test
make build
make deploy
# give everything time to come up - PLEASE FIX
sleep 120
# fetch operator logs
oc logs $(oc get pods --selector name=cdi-operator --output=name)
# check for CDI related pods in kube-system ns
oc get pod -o name --namespace=kube-system | grep cdi

0 comments on commit 185d77c

Please sign in to comment.