Skip to content

Commit

Permalink
Use minishift in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
machacekondra committed Mar 22, 2019
1 parent 11b6c07 commit 04cd320
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ install:
- sudo pip install -r requirements-dev.txt
jobs:
include:
- stage: Tests
name: "Default (minikube with latest k8s)"
- name: "minishift (operator)"
env: CPLATFORM=minishift USE_OPERATOR=true

cache:
- pip
- directories:
- cache
- "~/.minikube/cache"
- "~/.minishift/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
Expand Down
14 changes: 7 additions & 7 deletions test.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#!/bin/bash

echo "$(minikube ip) minikube" | sudo tee -a /etc/hosts
echo "$(minishift ip) minishift" | sudo tee -a /etc/hosts

## No HW virt
kubectl create configmap -n kubevirt kubevirt-config --from-literal debug.useEmulation=true
kubectl scale --replicas=0 deployment/virt-controller -n kubevirt
kubectl scale --replicas=2 deployment/virt-controller -n kubevirt
oc create configmap -n kubevirt kubevirt-config --from-literal debug.useEmulation=true --from-literal feature-gates=DataVolumes
oc scale --replicas=0 deployment/virt-controller -n kubevirt
oc scale --replicas=2 deployment/virt-controller -n kubevirt

## Prepare CDI
export CDI_VERSION=v1.5.0
kubectl apply -f https://github.com/kubevirt/containerized-data-importer/releases/download/$CDI_VERSION/cdi-controller.yaml
oc apply -f https://github.com/kubevirt/containerized-data-importer/releases/download/$CDI_VERSION/cdi-controller.yaml

get_remaining_pods() {
kubectl get pods \
oc get pods \
--all-namespaces \
--field-selector=status.phase!=Running,status.phase!=Succeeded ;
}
Expand All @@ -21,7 +21,7 @@ sleep 6;

while [[ "$( get_remaining_pods 2>&1 | wc -l)" -gt 2 ]];
do
kubectl get pods --all-namespaces
oc get pods --all-namespaces
sleep 6;
done

Expand Down
14 changes: 8 additions & 6 deletions tests/playbooks/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,14 @@
protocol: TCP
selector:
special: cirros-e2e-key
definition:
metadata:
labels:
kubevirt.io/vm: cirros-e2e-service
spec:
externalTrafficPolicy: Cluster

- name: Gather facts for {{ vm_name }} service
k8s_facts:
name: "{{ service_name }}"
kind: Service
register: svc

- name: Print info about

- name: Gather facts for {{ vm_name }} VMI in default namespace
k8s_facts:
Expand Down

0 comments on commit 04cd320

Please sign in to comment.