diff --git a/charts/notification/charts/common-0.1.0.tgz b/charts/notification/charts/common-0.1.0.tgz index 857b8d8..3434a43 100644 Binary files a/charts/notification/charts/common-0.1.0.tgz and b/charts/notification/charts/common-0.1.0.tgz differ diff --git a/common/templates/_pipeline.yaml b/common/templates/_pipeline.yaml index ecd6e65..268279a 100644 --- a/common/templates/_pipeline.yaml +++ b/common/templates/_pipeline.yaml @@ -194,16 +194,32 @@ spec: curl --retry 6 --retry-connrefused --retry-delay 5 -O http://${RABBITHOST}:15672/cli/rabbitmqadmin chmod +x rabbitmqadmin - ./rabbitmqadmin -H ${RABBITHOST} -u ${RABBITUSER} -p ${RABBITPASS} declare exchange name=conversion type=topic - ./rabbitmqadmin -H ${RABBITHOST} -u ${RABBITUSER} -p ${RABBITPASS} declare queue name=transcode durable=true queue_type=quorum - ./rabbitmqadmin -H ${RABBITHOST} -u ${RABBITUSER} -p ${RABBITPASS} declare queue name=notification durable=true queue_type=quorum - ./rabbitmqadmin -H ${RABBITHOST} -u ${RABBITUSER} -p ${RABBITPASS} declare queue name=upload-nextcloud durable=true queue_type=quorum - ./rabbitmqadmin -H ${RABBITHOST} -u ${RABBITUSER} -p ${RABBITPASS} declare queue name=complete durable=true queue_type=quorum + x=0; until [[ -n $( ./rabbitmqadmin -H ${RABBITHOST} -u ${RABBITUSER} -p ${RABBITPASS} declare exchange name=conversion type=topic 2>/dev/null ) || $x -eq 10 ]]; do echo "waiting for exchange to be created" && sleep 5 && ((x++)); done + if [[ "${x}" -eq 10 ]]; then exit 1; fi - ./rabbitmqadmin -H ${RABBITHOST} -u ${RABBITUSER} -p ${RABBITPASS} declare binding source="conversion" destination_type="queue" destination="transcode" routing_key="transcode" - ./rabbitmqadmin -H ${RABBITHOST} -u ${RABBITUSER} -p ${RABBITPASS} declare binding source="conversion" destination_type="queue" destination="notification" routing_key="notification" - ./rabbitmqadmin -H ${RABBITHOST} -u ${RABBITUSER} -p ${RABBITPASS} declare binding source="conversion" destination_type="queue" destination="upload-nextcloud" routing_key="upload-nextcloud" - ./rabbitmqadmin -H ${RABBITHOST} -u ${RABBITUSER} -p ${RABBITPASS} declare binding source="conversion" destination_type="queue" destination="complete" routing_key="complete" + x=0; until [[ -n $( ./rabbitmqadmin -H ${RABBITHOST} -u ${RABBITUSER} -p ${RABBITPASS} declare queue name=transcode durable=true queue_type=quorum ) || $x -eq 10 ]]; do echo "waiting for exchange to be created" && sleep 5 && ((x++)); done + if [[ "${x}" -eq 10 ]]; then exit 1; fi + + x=0; until [[ -n $( ./rabbitmqadmin -H ${RABBITHOST} -u ${RABBITUSER} -p ${RABBITPASS} declare queue name=notification durable=true queue_type=quorum ) || $x -eq 10 ]]; do echo "waiting for exchange to be created" && sleep 5 && ((x++)); done + if [[ "${x}" -eq 10 ]]; then exit 1; fi + + x=0; until [[ -n $( ./rabbitmqadmin -H ${RABBITHOST} -u ${RABBITUSER} -p ${RABBITPASS} declare queue name=upload-nextcloud durable=true queue_type=quorum ) || $x -eq 10 ]]; do echo "waiting for exchange to be created" && sleep 5 && ((x++)); done + if [[ "${x}" -eq 10 ]]; then exit 1; fi + + x=0; until [[ -n $( ./rabbitmqadmin -H ${RABBITHOST} -u ${RABBITUSER} -p ${RABBITPASS} declare queue name=complete durable=true queue_type=quorum ) || $x -eq 10 ]]; do echo "waiting for exchange to be created" && sleep 5 && ((x++)); done + if [[ "${x}" -eq 10 ]]; then exit 1; fi + + x=0; until [[ -n $( ./rabbitmqadmin -H ${RABBITHOST} -u ${RABBITUSER} -p ${RABBITPASS} declare binding source="conversion" destination_type="queue" destination="transcode" routing_key="transcode" ) || $x -eq 10 ]]; do echo "waiting for exchange to be created" && sleep 5 && ((x++)); done + if [[ "${x}" -eq 10 ]]; then exit 1; fi + + x=0; until [[ -n $( ./rabbitmqadmin -H ${RABBITHOST} -u ${RABBITUSER} -p ${RABBITPASS} declare binding source="conversion" destination_type="queue" destination="notification" routing_key="notification" ) || $x -eq 10 ]]; do echo "waiting for exchange to be created" && sleep 5 && ((x++)); done + if [[ "${x}" -eq 10 ]]; then exit 1; fi + + x=0; until [[ -n $( ./rabbitmqadmin -H ${RABBITHOST} -u ${RABBITUSER} -p ${RABBITPASS} declare binding source="conversion" destination_type="queue" destination="upload-nextcloud" routing_key="upload-nextcloud" ) || $x -eq 10 ]]; do echo "waiting for exchange to be created" && sleep 5 && ((x++)); done + if [[ "${x}" -eq 10 ]]; then exit 1; fi + + x=0; until [[ -n $( ./rabbitmqadmin -H ${RABBITHOST} -u ${RABBITUSER} -p ${RABBITPASS} declare binding source="conversion" destination_type="queue" destination="complete" routing_key="complete" ) || $x -eq 10 ]]; do echo "waiting for exchange to be created" && sleep 5 && ((x++)); done + if [[ "${x}" -eq 10 ]]; then exit 1; fi echo -n "goghvideo-test-${RANDOMID}" > $(results.namespace.path) runAfter: