Merge "Parallelize helm test run for compute-kit"
This commit is contained in:
commit
c1365308e6
22
tools/deployment/common/run-helm-tests.sh
Executable file
22
tools/deployment/common/run-helm-tests.sh
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -x
|
||||||
|
|
||||||
|
APPLICATION=$1
|
||||||
|
RELEASE_GROUP=${2:-${APPLICATION}}
|
||||||
|
NAMESPACE=${3:-openstack}
|
||||||
|
: ${HELM_TESTS_TRIES:=2}
|
||||||
|
timeout=${OSH_TEST_TIMEOUT:-900}
|
||||||
|
|
||||||
|
run_tests() {
|
||||||
|
# Delete the test pod if it still exists
|
||||||
|
kubectl delete pods -l application=${APPLICATION},release_group=${RELEASE_GROUP},component=test --namespace=${NAMESPACE} --ignore-not-found
|
||||||
|
helm test ${APPLICATION} --timeout $timeout
|
||||||
|
}
|
||||||
|
|
||||||
|
for i in $(seq 1 ${HELM_TESTS_TRIES}); do
|
||||||
|
echo "Run helm tests for ${APPLICATION}. Try #${i}"
|
||||||
|
run_tests
|
||||||
|
RC=$?
|
||||||
|
[ ${RC} -eq "0" ] && break
|
||||||
|
done
|
||||||
|
exit ${RC}
|
@ -148,10 +148,5 @@ if [ "x${RUN_HELM_TESTS}" == "xno" ]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Delete the test pods if they still exist
|
./tools/deployment/common/run-helm-tests.sh nova
|
||||||
kubectl delete pods -l application=nova,release_group=nova,component=test --namespace=openstack --ignore-not-found
|
./tools/deployment/common/run-helm-tests.sh neutron
|
||||||
kubectl delete pods -l application=neutron,release_group=neutron,component=test --namespace=openstack --ignore-not-found
|
|
||||||
|
|
||||||
timeout=${OSH_TEST_TIMEOUT:-900}
|
|
||||||
helm test nova --timeout $timeout
|
|
||||||
helm test neutron --timeout $timeout
|
|
||||||
|
@ -16,6 +16,7 @@ set -xe
|
|||||||
|
|
||||||
#NOTE: Get the over-rides to use
|
#NOTE: Get the over-rides to use
|
||||||
: ${OSH_EXTRA_HELM_ARGS_GLANCE:="$(./tools/deployment/common/get-values-overrides.sh glance)"}
|
: ${OSH_EXTRA_HELM_ARGS_GLANCE:="$(./tools/deployment/common/get-values-overrides.sh glance)"}
|
||||||
|
: ${RUN_HELM_TESTS:="yes"}
|
||||||
|
|
||||||
#NOTE: Lint and package chart
|
#NOTE: Lint and package chart
|
||||||
make glance
|
make glance
|
||||||
@ -60,4 +61,8 @@ sleep 30 #NOTE(portdirect): Wait for ingress controller to update rules and rest
|
|||||||
openstack image list
|
openstack image list
|
||||||
openstack image show 'Cirros 0.3.5 64-bit'
|
openstack image show 'Cirros 0.3.5 64-bit'
|
||||||
|
|
||||||
helm test glance --timeout 900
|
if [ "x${RUN_HELM_TESTS}" == "xno" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
./tools/deployment/common/run-helm-tests.sh glance
|
||||||
|
@ -16,6 +16,7 @@ set -xe
|
|||||||
|
|
||||||
#NOTE: Get the over-rides to use
|
#NOTE: Get the over-rides to use
|
||||||
: ${OSH_EXTRA_HELM_ARGS_KEYSTONE:="$(./tools/deployment/common/get-values-overrides.sh keystone)"}
|
: ${OSH_EXTRA_HELM_ARGS_KEYSTONE:="$(./tools/deployment/common/get-values-overrides.sh keystone)"}
|
||||||
|
: ${RUN_HELM_TESTS:="yes"}
|
||||||
|
|
||||||
#NOTE: Lint and package chart
|
#NOTE: Lint and package chart
|
||||||
make keystone
|
make keystone
|
||||||
@ -61,9 +62,9 @@ FEATURE_GATE="ldap"; if [[ ${FEATURE_GATES//,/ } =~ (^|[[:space:]])${FEATURE_GAT
|
|||||||
http://keystone.openstack.svc.cluster.local/v3/domains/${domainId}/config
|
http://keystone.openstack.svc.cluster.local/v3/domains/${domainId}/config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Delete the test pod if it still exists
|
if [ "x${RUN_HELM_TESTS}" != "xno" ]; then
|
||||||
kubectl delete pods -l application=keystone,release_group=keystone,component=test --namespace=openstack --ignore-not-found
|
./tools/deployment/common/run-helm-tests.sh keystone
|
||||||
helm test keystone --timeout 900
|
fi
|
||||||
|
|
||||||
FEATURE_GATE="tls"; if [[ ${FEATURE_GATES//,/ } =~ (^|[[:space:]])${FEATURE_GATE}($|[[:space:]]) ]]; then
|
FEATURE_GATE="tls"; if [[ ${FEATURE_GATES//,/ } =~ (^|[[:space:]])${FEATURE_GATE}($|[[:space:]]) ]]; then
|
||||||
curl --cacert /etc/openstack-helm/certs/ca/ca.pem -L https://keystone.openstack.svc.cluster.local
|
curl --cacert /etc/openstack-helm/certs/ca/ca.pem -L https://keystone.openstack.svc.cluster.local
|
||||||
|
@ -167,16 +167,17 @@
|
|||||||
openstack_release: stein
|
openstack_release: stein
|
||||||
container_distro_name: ubuntu
|
container_distro_name: ubuntu
|
||||||
container_distro_version: bionic
|
container_distro_version: bionic
|
||||||
|
run_helm_tests: "no"
|
||||||
gate_scripts_relative_path: ../openstack-helm
|
gate_scripts_relative_path: ../openstack-helm
|
||||||
gate_scripts:
|
gate_scripts:
|
||||||
- ./tools/deployment/common/install-packages.sh
|
- ./tools/deployment/common/install-packages.sh
|
||||||
- ./tools/deployment/common/deploy-k8s.sh
|
- ./tools/deployment/common/deploy-k8s.sh
|
||||||
- - ./tools/deployment/common/setup-client.sh
|
- - ./tools/deployment/common/setup-client.sh
|
||||||
- ./tools/scripts/tls/cert-manager.sh
|
- ./tools/scripts/tls/cert-manager.sh
|
||||||
- - ./tools/deployment/component/common/ingress.sh
|
- ./tools/deployment/component/common/ingress.sh
|
||||||
- - ./tools/deployment/component/common/mariadb.sh
|
- - ./tools/deployment/component/common/rabbitmq.sh
|
||||||
|
- ./tools/deployment/component/common/mariadb.sh
|
||||||
- ./tools/deployment/component/common/memcached.sh
|
- ./tools/deployment/component/common/memcached.sh
|
||||||
- ./tools/deployment/component/common/rabbitmq.sh
|
|
||||||
- - ./tools/deployment/component/nfs-provisioner/nfs-provisioner.sh
|
- - ./tools/deployment/component/nfs-provisioner/nfs-provisioner.sh
|
||||||
- ./tools/deployment/component/keystone/keystone.sh
|
- ./tools/deployment/component/keystone/keystone.sh
|
||||||
- - ./tools/deployment/component/heat/heat.sh
|
- - ./tools/deployment/component/heat/heat.sh
|
||||||
@ -184,8 +185,13 @@
|
|||||||
- ./tools/deployment/component/compute-kit/openvswitch.sh
|
- ./tools/deployment/component/compute-kit/openvswitch.sh
|
||||||
- ./tools/deployment/component/compute-kit/libvirt.sh
|
- ./tools/deployment/component/compute-kit/libvirt.sh
|
||||||
- ./tools/deployment/component/compute-kit/compute-kit.sh
|
- ./tools/deployment/component/compute-kit/compute-kit.sh
|
||||||
|
- - ./tools/deployment/common/run-helm-tests.sh neutron
|
||||||
|
- ./tools/deployment/common/run-helm-tests.sh nova
|
||||||
|
- ./tools/deployment/common/run-helm-tests.sh glance
|
||||||
|
- ./tools/deployment/common/run-helm-tests.sh keystone
|
||||||
- ./tools/deployment/developer/common/170-setup-gateway.sh
|
- ./tools/deployment/developer/common/170-setup-gateway.sh
|
||||||
- ./tools/deployment/developer/common/900-use-it.sh
|
- ./tools/deployment/developer/common/900-use-it.sh
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-helm-compute-kit-pike-ubuntu_xenial
|
name: openstack-helm-compute-kit-pike-ubuntu_xenial
|
||||||
parent: openstack-helm-compute-kit
|
parent: openstack-helm-compute-kit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user