Add support for helm tests in multiple namespaces
Originally, the function to execute helm tests expected the helm release to be in the openstack namespace. This changes the function to get the namespace directly from the helm releases to allow for the gathering of logs and removal of resources from the namespace a release was installed to Change-Id: Ic9d1215f363a6251bcc33bead311aba1ba67a658
This commit is contained in:
parent
7ac9adb7ad
commit
9797750fd2
@ -85,10 +85,13 @@ function helm_test_deployment {
|
|||||||
TIMEOUT=$2
|
TIMEOUT=$2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Get the namespace of the chart via the Helm release
|
||||||
|
NAMESPACE=$(helm status ${DEPLOYMENT} | awk '/^NAMESPACE/ { print $NF }')
|
||||||
|
|
||||||
helm test --timeout ${TIMEOUT} ${DEPLOYMENT}
|
helm test --timeout ${TIMEOUT} ${DEPLOYMENT}
|
||||||
mkdir -p ${LOGS_DIR}/rally
|
mkdir -p ${LOGS_DIR}/rally
|
||||||
kubectl logs -n openstack ${DEPLOYMENT}-rally-test > ${LOGS_DIR}/rally/${DEPLOYMENT}
|
kubectl logs -n ${NAMESPACE} ${DEPLOYMENT}-rally-test > ${LOGS_DIR}/rally/${DEPLOYMENT}
|
||||||
kubectl delete -n openstack pod ${DEPLOYMENT}-rally-test
|
kubectl delete -n ${NAMESPACE} pod ${DEPLOYMENT}-rally-test
|
||||||
}
|
}
|
||||||
|
|
||||||
function helm_plugin_template_install {
|
function helm_plugin_template_install {
|
||||||
|
Loading…
Reference in New Issue
Block a user