Refactor HelmChart/Tests/index.sh script

This commit is contained in:
Simon Larsen
2024-02-26 13:01:36 +00:00
parent dbc95aad55
commit ea53172b43

View File

@@ -21,24 +21,24 @@ sudo microk8s kubectl get pods
sudo microk8s helm install oneuptime ../../HelmChart/Public/oneuptime -f ../../HelmChart/Public/oneuptime/values.yaml -f ./ci-values.yaml
echo "OneUptime is installed. Waiting for it to be ready. Checking status in 20 mins once things settle down..."
sleep 20m
# echo "OneUptime is installed. Waiting for it to be ready. Checking status in 20 mins once things settle down..."
# sleep 20m
# Wait for OneUptime to be ready
timeout 30m bash -c '
endtime=$((SECONDS+600))
while [ $SECONDS -lt $endtime ]; do
if sudo microk8s kubectl wait pod --all --for=condition=Ready --namespace=default --timeout=5m; then
echo "All pods are ready"
exit 0
fi
echo "Some pods are not ready yet. Getting status of all the pods: "
sudo microk8s kubectl get pods --all-namespaces
sleep 1m
done
echo "Timeout reached. Some pods failed to start"
exit 1
'
# # Wait for OneUptime to be ready
# timeout 30m bash -c '
# endtime=$((SECONDS+600))
# while [ $SECONDS -lt $endtime ]; do
# if sudo microk8s kubectl wait pod --all --for=condition=Ready --namespace=default --timeout=5m; then
# echo "All pods are ready"
# exit 0
# fi
# echo "Some pods are not ready yet. Getting status of all the pods: "
# sudo microk8s kubectl get pods --all-namespaces
# sleep 1m
# done
# echo "Timeout reached. Some pods failed to start"
# exit 1
# '
# Once it's ready. Run helm test.
# sudo microk8s helm test oneuptime