Add missed fetch for submodules for upgrade-mcp-release
Change-Id: I8c7b1e123a4feba042e8a109540f0ae1c6b921ea
Related-Prod: PROD-28587 (PROD:28587)
(cherry picked from commit 00897c554a1051a6d093eed1a992b961599f27b6)
diff --git a/upgrade-mcp-release.groovy b/upgrade-mcp-release.groovy
index 49f92c3..14ab3a0 100644
--- a/upgrade-mcp-release.groovy
+++ b/upgrade-mcp-release.groovy
@@ -172,7 +172,7 @@
if (updateClusterModel) {
common.infoMsg('Perform: UPDATE_CLUSTER_MODEL')
def dateTime = common.getDatetime()
- salt.cmdRun(venvPepper, 'I@salt:master', "cd /srv/salt/reclass/ && git submodule update")
+ salt.cmdRun(venvPepper, 'I@salt:master', "cd /srv/salt/reclass/ && git submodule foreach git fetch")
salt.cmdRun(venvPepper, 'I@salt:master', "cd /srv/salt/reclass/classes/cluster/$cluster_name && " +
"grep -r --exclude-dir=aptly -l 'mcp_version: .*' * | xargs --no-run-if-empty sed -i 's|mcp_version: .*|mcp_version: \"$targetMcpVersion\"|g'")
// Do the same, for deprecated variable-duplicate