[ONOS-7756] Fix Jenkins triggers for onos-1.13 and 1.12 branches
Change-Id: I524fbaada20a10585eb5042280d703e4048a4e74
diff --git a/TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy b/TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy
index 01bec60..affba09 100644
--- a/TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy
+++ b/TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy
@@ -573,4 +573,14 @@
return ( ( branch != "master" ) ? "onos-" : "" ) + branch
}
+def testBranchWithPrefix( branch ){
+ // get TestON branch with the prefix ( "onos-" )
+ if ( branch == "1.13" )
+ return "onos-1.13"
+ else if ( branch == "1.12" )
+ return "onos-1.13"
+ else
+ return "master"
+}
+
return this
diff --git a/TestON/JenkinsFile/dependencies/TriggerFuncs.groovy b/TestON/JenkinsFile/dependencies/TriggerFuncs.groovy
index a557fb4..ffaa2b6 100644
--- a/TestON/JenkinsFile/dependencies/TriggerFuncs.groovy
+++ b/TestON/JenkinsFile/dependencies/TriggerFuncs.groovy
@@ -103,7 +103,7 @@
println jobOn + "-pipeline-" + manuallyRun ? "manually" : branch
def wiki = branch
branch = funcs.branchWithPrefix( branch )
- test_branch = "master"
+ test_branch = funcs.testBranchWithPrefix( branch )
node( "TestStation-" + nodeName + "s" ) {
envSetup( branch, test_branch, onosTag, jobOn, manuallyRun )
exportEnvProperty( branch, test_branch, wiki, tests, post_result, manuallyRun, onosTag, isOldFlow )