make sure not to change it to old flow unless it is on master branch
Change-Id: I41f3bde7c4543420e1c8cf8c893a2f58a88bb09e
diff --git a/TestON/JenkinsFile/JenkinsfileTrigger b/TestON/JenkinsFile/JenkinsfileTrigger
index c1d5f10..d0ce382 100644
--- a/TestON/JenkinsFile/JenkinsfileTrigger
+++ b/TestON/JenkinsFile/JenkinsfileTrigger
@@ -355,7 +355,7 @@
. ~/.bashrc
env
''' + preSetup( onos_branch, test_branch, onos_tag, manuallyRun ) + '''
- ''' + oldFlowCheck( jobOn ) + '''
+ ''' + oldFlowCheck( jobOn, onos_branch ) + '''
''' + postSetup( onos_branch, test_branch, onos_tag, manuallyRun )
}
}
@@ -420,9 +420,9 @@
}
return result
}
-def oldFlowCheck( jobOn ){
+def oldFlowCheck( jobOn, onos_branch ){
result = ""
- if( isOldFlow && jobOn == "SCPF" )
+ if( isOldFlow && jobOn == "SCPF" && onos_branch="master" )
result = '''sed -i -e 's/@Component(immediate = true)/@Component(enabled = false)/g' ~/onos/core/store/dist/src/main/java/org/onosproject/store/flow/impl/DistributedFlowRuleStore.java
sed -i -e 's/@Component(enabled = false)/@Component(immediate = true)/g' ~/onos/core/store/dist/src/main/java/org/onosproject/store/flow/impl/ECFlowRuleStore.java'''
return result