From a7fcf1fcdf92190699dfbbfba4d088ea06fbda7c Mon Sep 17 00:00:00 2001
From: Pierre Riteau <pierre@stackhpc.com>
Date: Tue, 20 Dec 2022 13:28:34 +0100
Subject: [PATCH] CI: Run validate-config at the end of deploy

Change-Id: I40021caf3f94e718ea42d9ef77e5d9c77c3133de
---
 tests/deploy.sh  | 4 ++++
 tests/run.yml    | 1 +
 tests/upgrade.sh | 2 ++
 3 files changed, 7 insertions(+)

diff --git a/tests/deploy.sh b/tests/deploy.sh
index bf326cf63..7405d43a3 100755
--- a/tests/deploy.sh
+++ b/tests/deploy.sh
@@ -23,6 +23,10 @@ function deploy {
     kolla-ansible -i ${RAW_INVENTORY} -vvv pull &> /tmp/logs/ansible/pull
     kolla-ansible -i ${RAW_INVENTORY} -vvv deploy &> /tmp/logs/ansible/deploy
     kolla-ansible -i ${RAW_INVENTORY} -vvv post-deploy &> /tmp/logs/ansible/post-deploy
+
+    if [[ $HAS_UPGRADE == 'no' ]]; then
+        kolla-ansible -i ${RAW_INVENTORY} -vvv validate-config &> /tmp/logs/ansible/validate-config
+    fi
 }
 
 
diff --git a/tests/run.yml b/tests/run.yml
index 139468812..b30d13a41 100644
--- a/tests/run.yml
+++ b/tests/run.yml
@@ -388,6 +388,7 @@
           environment:
             TLS_ENABLED: "{{ tls_enabled }}"
             KOLLA_ANSIBLE_VENV_PATH: "{{ kolla_ansible_venv_path }}"
+            HAS_UPGRADE: "{{ is_upgrade | bool | ternary('yes', 'no') }}"
 
         # NOTE(yoctozepto): this is nice as the first step after the deployment
         # because it waits for the services to stabilize well enough so that
diff --git a/tests/upgrade.sh b/tests/upgrade.sh
index d5902784c..23a77c9a9 100755
--- a/tests/upgrade.sh
+++ b/tests/upgrade.sh
@@ -20,6 +20,8 @@ function upgrade {
     # TODO(yoctozepto): Remove after Zed.
     kolla-ansible -i ${RAW_INVENTORY} -vvv deploy --tags keystone &> /tmp/logs/ansible/upgrade-deploy
     kolla-ansible -i ${RAW_INVENTORY} -vvv post-deploy &> /tmp/logs/ansible/upgrade-post-deploy
+
+    kolla-ansible -i ${RAW_INVENTORY} -vvv validate-config &> /tmp/logs/ansible/validate-config
 }
 
 
-- 
GitLab