Skip to content

Commit

Permalink
Script to start minikube on travis
Browse files Browse the repository at this point in the history
  • Loading branch information
prietyc123 committed Apr 3, 2020
1 parent 3587b9e commit b3c48d1
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 50 deletions.
128 changes: 78 additions & 50 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ env:
global:
- secure: "SSGPlBUXMb2F3ycFEvRKHoftYy0UkIprwgtfOKXU/Uc359Qct+IrF/b8GuTd64tedXtnQE4z4fxqT8wdYRdNwUysmOvRyzlNTRhs1gocx5iL5El8+7F4we7wElh6ckt2Z5AVI5g0JOwYeQNURFhgDumN14K8XsOu7a2LzRBVFRn55z79xgTL+JnTI89JIWjz1QCr8Z054CMaK0MHJRLkgPnbnx1Skra3Wt16g29wRZLqLWoU8lyrLy9Ao/yHw/AJMCNie8ah7nNiOEdgPTcr/onZ/v+eVyaTvzE9UrmdeqpUpASypAAUnmZ9Q6QsU31dVxwbfPB0r8TzrqinCOYMnHbU/3fIz49Q+yv7RyifYsTlnx7+J79LmCvs7X+iKkmOprWdBRwUUxzDhwgIGnmBlYf0nKj9H2U3XFCYDnbRSI9ZugGBprs3t09w15gwq/wLM6DhY87zNhM4Vfb34ZXVBCEhtUXKUVbVthiPOWlHtbs0YympG/QCV+27tVIszgek8FFt6/fJeEh/APNadK9fuU01ozB01aXj0xMl3PlvoWWeQXDnyttHEWRaiVpbPKGoV5a7LPCVpWk5EOX8YNgHEUnjKwfzVBUriXAd+8zp0sx6TRdt1ts7x04NP1yFF1SCXXBpz/geOsfa2bBQyJx6y7CODcmW7fbcJLxmwdGlm6E="
- secure: "Tr9KxWvfQS6BSF1qUqz1Q41le5k/c+L37Aq8wTPQcmXVu8nLv5T1QMarx64KfZ2qaQBRV+M6DwnJQM7HU/cWX9AKpdoAO2INqANfoFLh8XTR5ncHjaNTzi9aS7owxa+9t0yfKowq7s4dp96nqmwchYFtUxpzKo0TMOcQ1l1AGEu5liniXb9VOKgG8UAZsLgD6b2a80nn6NP1JehGGxcWsow0EzxalnJ8Cv78YTLmqGNowYh5UmkhjkxqE4TskQafRd2qtYMPvxnC2CFd8G3qMlbBzCxM02lGKwbr/Vi41hcSyD3uuyaKVHr/g5qLcp/HNyrUGTREL1UvWkWjlL6ovuh6uHYlnpVwQkX5fzUH7z2hlr9HjQ3Tu6Sbh1CX5QBR5PUkvoOfdx0BHTmTTw2xkvUDHarqZT1OkMuUplCY/VMnJaqa5ko126r8CyKYqRoT4HQuqa6szVawGiB211VCQXJRVyLYtKUGO6mmnMUoi5H676/sv6c9py8bieMoyEyrI87lS0AhQ6QLnTjNbEO5xt6vFi7rEgcctD5nuEBwb/X2bmM2OdZFYXrIbXaZfq7fRKyzCQthfceCmySExOGI9ndCE/mS68X6NNFBVsVwb7zt0zSY6oGlf0/N2CR5sf8gwKYG1scr5Jyqmuifvqv433zepA0Sxj6WqC3ixlssNd8="
- CHANGE_MINIKUBE_NONE_USER=true
- MINIKUBE_WANTUPDATENOTIFICATION=false
- MINIKUBE_WANTREPORTERRORPROMPT=false
- MINIKUBE_HOME=$HOME
- CHANGE_MINIKUBE_NONE_USER=true
- KUBECONFIG=$HOME/.kube/config

jobs:
include:
# YAML alias, for settings shared across the tests
Expand Down Expand Up @@ -76,64 +83,85 @@ jobs:
- travis_wait make test-cmd-cmp
- odo logout

- <<: *base-test
stage: test
name: "preference, config, url and debug command integration tests"
script:
- ./scripts/oc-cluster.sh
- make bin
- sudo cp odo /usr/bin
- odo login -u developer
- travis_wait make test-cmd-pref-config
- travis_wait make test-cmd-url
- travis_wait make test-cmd-debug
- odo logout
# - <<: *base-test
# stage: test
# name: "preference, config, url and debug command integration tests"
# script:
# - ./scripts/oc-cluster.sh
# - make bin
# - sudo cp odo /usr/bin
# - odo login -u developer
# - travis_wait make test-cmd-pref-config
# - travis_wait make test-cmd-url
# - travis_wait make test-cmd-debug
# - odo logout

# Run service-catalog e2e tests
- <<: *base-test
stage: test
name: "service, link, component sub-commands command integration tests"
script:
- ./scripts/oc-cluster.sh service-catalog
- make bin
- sudo cp odo /usr/bin
- odo login -u developer
- travis_wait make test-cmd-service
- make test-cmd-link-unlink
- travis_wait make test-cmd-cmp-sub
- odo logout
# # Run service-catalog e2e tests
# - <<: *base-test
# stage: test
# name: "service, link, component sub-commands command integration tests"
# script:
# - ./scripts/oc-cluster.sh service-catalog
# - make bin
# - sudo cp odo /usr/bin
# - odo login -u developer
# - travis_wait make test-cmd-service
# - make test-cmd-link-unlink
# - travis_wait make test-cmd-cmp-sub
# - odo logout

# - <<: *base-test
# stage: test
# name: "watch, storage, app, project, push, devfile catalog, devfile create, devfile push command integration tests"
# script:
# - ./scripts/oc-cluster.sh
# - make bin
# - sudo cp odo /usr/bin
# - odo login -u developer
# - travis_wait make test-cmd-watch
# - travis_wait make test-cmd-storage
# - travis_wait make test-cmd-app
# - travis_wait make test-cmd-push
# - travis_wait make test-cmd-project
# - travis_wait make test-cmd-devfile-catalog
# - travis_wait make test-cmd-devfile-create
# - travis_wait make test-cmd-devfile-push
# - travis_wait make test-cmd-devfile-watch
# - odo logout

# - <<: *base-test
# stage: test
# name: "core beta, java, source e2e tests"
# script:
# - ./scripts/oc-cluster.sh
# - make bin
# - sudo cp odo /usr/bin
# - odo login -u developer
# - travis_wait make test-e2e-beta
# - travis_wait make test-e2e-java
# - travis_wait make test-e2e-source
# - travis_wait make test-e2e-images
# - odo logout

# Run integration test on Kubernetes cluster
- <<: *base-test
stage: test
name: "watch, storage, app, project, push, devfile catalog, devfile create, devfile push command integration tests"
name: "devfile catalog, devfile create, devfile push, devfile watch command integration tests"
before_script:
# Download kubectl, which is a requirement for using minikube.
- curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.16.0/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
# Download minikube.
- curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
- mkdir -p $HOME/.kube $HOME/.minikube
- touch $KUBECONFIG
- sudo minikube start --vm-driver=none --bootstrapper=localkube --kubernetes-version=v1.16.0 --logtostderr
- "sudo chown -R travis: /home/travis/.minikube/"
script:
- ./scripts/oc-cluster.sh
- make bin
- sudo cp odo /usr/bin
- odo login -u developer
- travis_wait make test-cmd-watch
- travis_wait make test-cmd-storage
- travis_wait make test-cmd-app
- travis_wait make test-cmd-push
- travis_wait make test-cmd-project
#- ./scripts/minikube-cluster.sh
- kubectl cluster-info
- travis_wait make test-cmd-devfile-catalog
- travis_wait make test-cmd-devfile-create
- travis_wait make test-cmd-devfile-push
- travis_wait make test-cmd-devfile-watch
- odo logout

- <<: *base-test
stage: test
name: "core beta, java, source e2e tests"
script:
- ./scripts/oc-cluster.sh
- make bin
- sudo cp odo /usr/bin
- odo login -u developer
- travis_wait make test-e2e-beta
- travis_wait make test-e2e-java
- travis_wait make test-e2e-source
- travis_wait make test-e2e-images
- odo logout


8 changes: 8 additions & 0 deletions scripts/minikube-cluster.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Download kubectl, which is a requirement for using minikube.
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.16.0/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
# Download minikube.
curl -Lo minikube https://storage.googleapis.com/minikube/releases/v1.4.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
mkdir -p $HOME/.kube $HOME/.minikube
touch $KUBECONFIG
sudo minikube start --vm-driver=none
"sudo chown -R travis: /home/travis/.minikube/"

0 comments on commit b3c48d1

Please sign in to comment.