Add support for `testing` MCP version to Upgrade Drivetrain pipeline
Change-Id: Ie607c879d53748a3946fb9d9a3e04483e298cfc9
diff --git a/upgrade-mcp-release.groovy b/upgrade-mcp-release.groovy
index 08796c9..62e5622 100644
--- a/upgrade-mcp-release.groovy
+++ b/upgrade-mcp-release.groovy
@@ -67,12 +67,16 @@
timeout(time: 12, unit: 'HOURS') {
node("python") {
try {
+ def gitMcpVersion = MCP_VERSION
workspace = common.getWorkspace()
python.setupPepperVirtualenv(venvPepper, SALT_MASTER_URL, SALT_MASTER_CREDENTIALS)
if(MCP_VERSION == ""){
error("You must specify MCP version")
}
+ if(MCP_VERSION == "testing"){
+ gitMcpVersion = "master"
+ }
stage("Update Reclass"){
def cluster_name = salt.getPillar(venvPepper, 'I@salt:master', "_param:cluster_name").get("return")[0].values()[0]
@@ -92,7 +96,7 @@
catch(Exception ex){
error("You have unstaged changes in your Reclass system model repository. Please reset them and rerun the pipeline.")
}
- salt.cmdRun(venvPepper, 'I@salt:master', "cd /srv/salt/reclass/classes/system && git checkout $MCP_VERSION")
+ salt.cmdRun(venvPepper, 'I@salt:master', "cd /srv/salt/reclass/classes/system && git checkout $gitMcpVersion")
}
if(UPDATE_LOCAL_REPOS.toBoolean()){