Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
Use minishift in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
machacekondra committed Apr 23, 2019
1 parent 7ad5ccc commit d5026e8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 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"
env: CPLATFORM=minishift

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
17 changes: 9 additions & 8 deletions test.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
#!/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
export CDI_VERSION=$(curl https://github.com/kubevirt/containerized-data-importer/releases/latest | grep -o "v[0-9]\.[0-9]*\.[0-9]*")
oc create -f https://github.com/kubevirt/containerized-data-importer/releases/download/$CDI_VERSION/cdi-operator.yaml
oc create -f https://github.com/kubevirt/containerized-data-importer/releases/download/$CDI_VERSION/cdi-operator-cr.yaml

get_remaining_pods() {
kubectl get pods \
oc get pods \
--all-namespaces \
--field-selector=status.phase!=Running,status.phase!=Succeeded ;
}
Expand All @@ -21,7 +22,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

0 comments on commit d5026e8

Please sign in to comment.