Upgrade cfg01 jenkins while upgrading drivetrain
New jenkins plugins for drivetrain is incomtapible with non-updated
cfg01 jenkins so we have to upgrade it.
PROD-37265
Change-Id: If45fe58f580b4059077f8daf3874e36e2425ee4a
diff --git a/upgrade-mcp-release.groovy b/upgrade-mcp-release.groovy
index 7f0c72d..60fb592 100644
--- a/upgrade-mcp-release.groovy
+++ b/upgrade-mcp-release.groovy
@@ -954,9 +954,9 @@
def wrongPluginJarName = "${gerritGlusterPath}/plugins/project-download-commands.jar"
salt.cmdRun(venvPepper, 'I@gerrit:client', "test -f ${wrongPluginJarName} && rm ${wrongPluginJarName} || true")
- salt.enforceStateWithTest(venvPepper, 'I@jenkins:client:security and not I@salt:master', 'jenkins.client.security', "", true, true, null, true, 60, 2)
- salt.enforceStateWithTest(venvPepper, 'I@jenkins:client and I@docker:client:images and not I@salt:master', 'docker.client.images', "", true, true, null, true, 60, 2)
- salt.cmdRun(venvPepper, "I@salt:master", "salt -C 'I@jenkins:client and I@docker:client and not I@salt:master' state.sls docker.client --async")
+ salt.enforceStateWithTest(venvPepper, 'I@jenkins:client:security', 'jenkins.client.security', "", true, true, null, true, 60, 2)
+ salt.enforceStateWithTest(venvPepper, 'I@jenkins:client and I@docker:client:images', 'docker.client.images', "", true, true, null, true, 60, 2)
+ salt.cmdRun(venvPepper, "I@salt:master", "salt -C 'I@jenkins:client and I@docker:client' state.sls docker.client --async")
}
}
// docker.client state may trigger change of jenkins master or jenkins slave services,
@@ -973,8 +973,8 @@
}
// Apply changes for HaProxy on CI/CD nodes
salt.enforceState(venvPepper, 'I@keepalived:cluster:instance:cicd_control_vip and I@haproxy:proxy', 'haproxy.proxy', true)
- salt.upgradePackageAndRestartSaltMinion(venvPepper, 'I@jenkins:client and not I@salt:master', 'python-jenkins')
- salt.cmdRun(venvPepper, "I@salt:master", "salt -C 'I@jenkins:client and not I@salt:master' state.sls jenkins.client --async")
+ salt.upgradePackageAndRestartSaltMinion(venvPepper, 'I@jenkins:client', 'python-jenkins')
+ salt.cmdRun(venvPepper, "I@salt:master", "salt -C 'I@jenkins:client' state.sls jenkins.client --async")
common.warningMsg("Jenkins update started in background in order to handle plugin post-install issues.")
common.warningMsg("Please wait until it finished. Jenkins could be restarted during this procedure.")