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 8b55e9a commit 2d0e8e8
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 17 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
27 changes: 27 additions & 0 deletions ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
pick 8b55e9a Switch to 'wait: yes' for PVCs, part 2 (#215)

# Rebase 11b6c07..0034936 onto 11b6c07 (2 commands)
#
# Commands:
# p, pick <commit> = use commit
# r, reword <commit> = use commit, but edit the commit message
# e, edit <commit> = use commit, but stop for amending
# s, squash <commit> = use commit, but meld into previous commit
# f, fixup <commit> = like "squash", but discard this commit's log message
# x, exec <command> = run command (the rest of the line) using shell
# b, break = stop here (continue rebase later with 'git rebase --continue')
# d, drop <commit> = remove commit
# l, label <label> = label current HEAD with a name
# t, reset <label> = reset HEAD to a label
# m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]
# . create a merge commit using the original merge commit's
# . message (or the oneline, if no original merge commit was
# . specified). Use -c <commit> to reword the commit message.
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#
# Note that empty commits are commented out
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
6 changes: 0 additions & 6 deletions tests/playbooks/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,6 @@
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 }} VMI in default namespace
k8s_facts:
Expand Down

0 comments on commit 2d0e8e8

Please sign in to comment.