Fix trigger function so that any errors can be handled when stc setup
Change-Id: I2fae608b58861a0745d7718b98b219966c0cdc62
diff --git a/TestON/JenkinsFile/TriggerFuncs.groovy b/TestON/JenkinsFile/TriggerFuncs.groovy
index 6d567a7..4b19f52 100644
--- a/TestON/JenkinsFile/TriggerFuncs.groovy
+++ b/TestON/JenkinsFile/TriggerFuncs.groovy
@@ -97,6 +97,7 @@
''' + preSetup( onos_branch, test_branch, onos_tag, manuallyRun ) + '''
''' + oldFlowCheck( jobOn, onos_branch ) + '''
''' + postSetup( onos_branch, test_branch, onos_tag, manuallyRun )
+ setSetup()
}
}
def tagCheck( onos_tag, onos_branch ){
@@ -170,11 +171,21 @@
kill $(ps -efw | grep karaf | grep -v grep | awk '{print $2}')
sleep 30
git branch
- stc setup
'''
}
return result
}
+def stcSetup(){
+ try{
+ sh '''
+ #!/bin/bash -l
+ set +e
+ . ~/.bashrc
+ env
+ stc setup
+ '''
+ }catch( all ){}
+}
def returnCell( nodeName ){
node( "TestStation-" + nodeName + "s" ){
sh '''#!/bin/bash -l