Skip to content

Commit

Permalink
fix(ci): Use jsonpath to get the volume name for integration test
Browse files Browse the repository at this point in the history
Due to change in PV name, needs to read the volume name using CASType

Signed-off-by: Ashish Ranjan <[email protected]>
  • Loading branch information
ashishranjan738 authored and kmova committed Oct 16, 2018
1 parent 208817a commit 2126ad5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ci/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ export MAYACTL="$GOPATH/src/github.com/openebs/maya/bin/maya/mayactl"
export KUBECONFIG=$HOME/.kube/config

MAPIPOD=$(kubectl get pods -o jsonpath='{.items[?(@.spec.containers[0].name=="maya-apiserver")].metadata.name}' -n openebs)
CSTORVOL=$(kubectl get pv -o jsonpath='{range.items[0]}{.metadata.name}{"\n"}{end}')
JIVAVOL=$(kubectl get pv -o jsonpath='{range.items[1]}{.metadata.name}{"\n"}{end}')
CSTORVOL=$(kubectl get pv -o jsonpath='{.items[?(@.metadata.annotations.openebs\.io/cas-type=="cstor")].metadata.name}')
JIVAVOL=$(kubectl get pv -o jsonpath='{.items[?(@.metadata.annotations.openebs\.io/cas-type=="jiva")].metadata.name}')


echo "*************** Running mayactl volume list *******************************"
${MAYACTL} volume list
rc=$?;
Expand Down

0 comments on commit 2126ad5

Please sign in to comment.