Add support for checking incoming RabbitMQ version

Will be used to check if the current RabbitMQ version is high enough
before upgrading to the new one.

Change-Id: Ie133d6efc2e4c00002b8f0724e0183eaab35d1c5
This commit is contained in:
Matt Crees 2024-08-12 16:08:43 +01:00
parent 3c130f290e
commit 36a7cd053d
2 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,6 @@
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" version_check=true
{% endblock %}
{% block rabbitmq_header %}{% endblock %}

View File

@ -24,3 +24,8 @@ fi
if [[ $(stat -c %a ${RABBITMQ_LOG_DIR}) != "755" ]]; then
chmod 755 ${RABBITMQ_LOG_DIR}
fi
if [[ "${!KOLLA_RABBITMQ_VERSION_CHECK[@]}" ]]; then
rabbitmqctl --version
exit 0
fi