Merge "fixing tosca-e2e shell script"
diff --git a/jjb/xos-tosca-e2e.yaml b/jjb/xos-tosca-e2e.yaml
index f414f44..adaa6e7 100644
--- a/jjb/xos-tosca-e2e.yaml
+++ b/jjb/xos-tosca-e2e.yaml
@@ -49,23 +49,38 @@
export XOS_DIR=$WORKSPACE/cord/orchestration/xos
export TOSCA_DIR=$WORKSPACE/cord/orchestration/xos-tosca
- # build tosca container
- cd $TOSCA_DIR
- make build
+ #install minikube+helm
+ export MINIKUBE_WANTUPDATENOTIFICATION=false
+ export MINIKUBE_WANTREPORTERRORPROMPT=false
+ export CHANGE_MINIKUBE_NONE_USER=true
+ export MINIKUBE_HOME=$HOME
+ mkdir -p $HOME/.kube || true
+ touch $HOME/.kube/config
+ export KUBECONFIG=$HOME/.kube/config
+ sudo -E /usr/bin/minikube start --vm-driver=none
+ sleep 300
- #deploy xos core
- cd $WORKSPACE/cord/helm-charts
- helm dep update xos-core
- helm install --set images.xos_tosca.tag=candidate -f examples/imagePullPolicy-IfNotPresent.yaml -n xos-core xos-core
+ helm init
+ sleep 60
+ helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/
- #wait for xos-core and models to be loaded
- timeout 300 bash -c "until http -a admin@opencord.org:letmein GET http://127.0.0.1:30001/xosapi/v1/core/sites |jq '.items[0].name'|grep -q mysite; do echo 'Waiting for API To be up'; sleep 10; done"
+ # build tosca container
+ cd $TOSCA_DIR
+ make build
- #test apis
- http -a admin@opencord.org:letmein GET http://127.0.0.1:30001/xosapi/v1/core/sites | grep '200 OK'
- http -a wronguser@opencord.org:wrongpass GET http://127.0.0.1:30001/xosapi/v1/core/sites | grep '403 Forbidden'
- http -a admin@opencord.org:letmein GET http://127.0.0.1:30001/xosapi/v1/utility/auth_noop | grep '405 Method Not Allowed'
- http -a wronguser@opencord.org:wrongpass GET http://127.0.0.1:30001/xosapi/v1/utility/auth_noop | grep '405 Method Not Allowed'
- http -a wronguser@opencord.org:wrongpass GET http://127.0.0.1:30001/xosapi/v1/utility/noop | grep '405 Method Not Allowed'
- http GET http://127.0.0.1:30001/xosapi/v1/utility/noop | grep '405 Method Not Allowed'
+ #deploy xos core
+ cd $WORKSPACE/cord/helm-charts
+ helm dep update xos-core
+ helm install --set images.xos_tosca.tag=candidate -f examples/imagePullPolicy-IfNotPresent.yaml -n xos-core xos-core
+
+ #wait for xos-core and models to be loaded
+ timeout 300 bash -c "until http -a admin@opencord.org:letmein GET http://127.0.0.1:30001/xosapi/v1/core/sites |jq '.items[0].name'|grep -q mysite; do echo 'Waiting for API To be up'; sleep 10; done"
+
+ #test apis
+ http -a admin@opencord.org:letmein GET http://127.0.0.1:30001/xosapi/v1/core/sites | grep '200 OK'
+ http -a wronguser@opencord.org:wrongpass GET http://127.0.0.1:30001/xosapi/v1/core/sites | grep '403 Forbidden'
+ http -a admin@opencord.org:letmein GET http://127.0.0.1:30001/xosapi/v1/utility/auth_noop | grep '405 Method Not Allowed'
+ http -a wronguser@opencord.org:wrongpass GET http://127.0.0.1:30001/xosapi/v1/utility/auth_noop | grep '405 Method Not Allowed'
+ http -a wronguser@opencord.org:wrongpass GET http://127.0.0.1:30001/xosapi/v1/utility/noop | grep '405 Method Not Allowed'
+ http GET http://127.0.0.1:30001/xosapi/v1/utility/noop | grep '405 Method Not Allowed'