Move #!groovy location to be the top of the file.
Change-Id: I93a900ff907bedd6af26cd35bbaa670714e1a372
diff --git a/TestON/JenkinsFile/CHO_Graph_Generator b/TestON/JenkinsFile/CHO_Graph_Generator
index da81c04..04a6f74 100644
--- a/TestON/JenkinsFile/CHO_Graph_Generator
+++ b/TestON/JenkinsFile/CHO_Graph_Generator
@@ -1,3 +1,4 @@
+#!groovy
// Copyright 2017 Open Networking Foundation (ONF)
//
// Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
@@ -19,7 +20,6 @@
// This is the Jenkins script for graph-generator-CHO jenkins job.
-#!groovy
// Read the files that has the dependencies
fileRelated = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsPathAndFiles.groovy' )
diff --git a/TestON/JenkinsFile/FUNCJenkinsFile b/TestON/JenkinsFile/FUNCJenkinsFile
index 24c5f71..613dbf5 100644
--- a/TestON/JenkinsFile/FUNCJenkinsFile
+++ b/TestON/JenkinsFile/FUNCJenkinsFile
@@ -1,3 +1,4 @@
+#!groovy
// Copyright 2017 Open Networking Foundation (ONF)
//
// Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
@@ -19,8 +20,6 @@
// This is the Jenkins script for FUNC-pipeline-<branch>
-#!groovy
-
// read the dependency files
funcs = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy' )
test_lists = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsTestONTests.groovy' )
diff --git a/TestON/JenkinsFile/FabricJenkinsfileTrigger b/TestON/JenkinsFile/FabricJenkinsfileTrigger
index b5d09bd..6507fc1 100644
--- a/TestON/JenkinsFile/FabricJenkinsfileTrigger
+++ b/TestON/JenkinsFile/FabricJenkinsfileTrigger
@@ -1,3 +1,4 @@
+#!groovy
// Copyright 2017 Open Networking Foundation (ONF)
//
// Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
@@ -19,8 +20,6 @@
// This is the Jenkins script for the fabric-pipeline-trigger
-#!groovy
-
// init dependencies functions
funcs = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy' )
test_lists = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsTestONTests.groovy' )
diff --git a/TestON/JenkinsFile/HAJenkinsFile b/TestON/JenkinsFile/HAJenkinsFile
index 7c9bafd..c1bd8bf 100644
--- a/TestON/JenkinsFile/HAJenkinsFile
+++ b/TestON/JenkinsFile/HAJenkinsFile
@@ -1,3 +1,4 @@
+#!groovy
// Copyright 2017 Open Networking Foundation (ONF)
//
// Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
@@ -19,8 +20,6 @@
// This is the Jenkins script for HA-pipeline-<branch>
-#!groovy
-
// read the dependency files
funcs = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy' )
test_lists = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsTestONTests.groovy' )
diff --git a/TestON/JenkinsFile/JenkinsfileTrigger b/TestON/JenkinsFile/JenkinsfileTrigger
index 2523a1c..a2996df 100644
--- a/TestON/JenkinsFile/JenkinsfileTrigger
+++ b/TestON/JenkinsFile/JenkinsfileTrigger
@@ -1,3 +1,4 @@
+#!groovy
// Copyright 2017 Open Networking Foundation (ONF)
//
// Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
@@ -19,8 +20,6 @@
// This is the Jenkins script for all-pipeline-trigger
-#!groovy
-
// read the dependency functions
funcs = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy' )
diff --git a/TestON/JenkinsFile/Overall_Graph_Generator b/TestON/JenkinsFile/Overall_Graph_Generator
index e96a65f..41b1ccb 100644
--- a/TestON/JenkinsFile/Overall_Graph_Generator
+++ b/TestON/JenkinsFile/Overall_Graph_Generator
@@ -1,3 +1,4 @@
+#!groovy
// Copyright 2017 Open Networking Foundation (ONF)
//
// Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
@@ -19,8 +20,6 @@
// This is the Jenkins script for manual-graph-generator-overall
-#!groovy
-
// read the dependency functions.
funcs = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy' )
test_lists = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsTestONTests.groovy' )
diff --git a/TestON/JenkinsFile/SCPFJenkinsFile b/TestON/JenkinsFile/SCPFJenkinsFile
index a890608..ee242e1 100644
--- a/TestON/JenkinsFile/SCPFJenkinsFile
+++ b/TestON/JenkinsFile/SCPFJenkinsFile
@@ -1,3 +1,4 @@
+#!groovy
// Copyright 2017 Open Networking Foundation (ONF)
//
// Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
@@ -19,8 +20,6 @@
// This is the Jenkins script for SCPF-pipeline-<branch>
-#!groovy
-
// read the dependency files
SCPFfuncs = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/PerformanceFuncs.groovy' )
SCPFfuncs.init()
diff --git a/TestON/JenkinsFile/SCPF_Graph_Generator b/TestON/JenkinsFile/SCPF_Graph_Generator
index 146e72e..06e2db4 100644
--- a/TestON/JenkinsFile/SCPF_Graph_Generator
+++ b/TestON/JenkinsFile/SCPF_Graph_Generator
@@ -1,3 +1,4 @@
+#!groovy
// Copyright 2017 Open Networking Foundation (ONF)
//
// Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
@@ -19,8 +20,6 @@
// This is the Jenkins script for manual-graph-generator-SCPF
-#!groovy
-
// read and set the functions from dependcies.
SCPFfuncs = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/PerformanceFuncs.groovy' )
SCPFfuncs.init()
diff --git a/TestON/JenkinsFile/SRJenkinsFile b/TestON/JenkinsFile/SRJenkinsFile
index bc2ac39..fa3bb04 100644
--- a/TestON/JenkinsFile/SRJenkinsFile
+++ b/TestON/JenkinsFile/SRJenkinsFile
@@ -1,3 +1,4 @@
+#!groovy
// Copyright 2017 Open Networking Foundation (ONF)
//
// Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
@@ -19,8 +20,6 @@
// This is the Jenkins script for SR-pipeline-<branch>
-#!groovy
-
// read dependencies.
funcs = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy' )
test_lists = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsTestONTests.groovy' )
diff --git a/TestON/JenkinsFile/Trend_Graph_Generator b/TestON/JenkinsFile/Trend_Graph_Generator
index fbdd54b..1cd34ba 100644
--- a/TestON/JenkinsFile/Trend_Graph_Generator
+++ b/TestON/JenkinsFile/Trend_Graph_Generator
@@ -1,3 +1,4 @@
+#!groovy
// Copyright 2017 Open Networking Foundation (ONF)
//
// Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
@@ -19,8 +20,6 @@
// This is the Jenkins script for manual-graph-generator-trend
-#!groovy
-
// read the dependency functions
funcs = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy' )
fileRelated = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsPathAndFiles.groovy' )
diff --git a/TestON/JenkinsFile/USECASEJenkinsFile b/TestON/JenkinsFile/USECASEJenkinsFile
index 98b58da..dd5cf88 100644
--- a/TestON/JenkinsFile/USECASEJenkinsFile
+++ b/TestON/JenkinsFile/USECASEJenkinsFile
@@ -1,3 +1,4 @@
+#!groovy
// Copyright 2017 Open Networking Foundation (ONF)
//
// Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
@@ -19,8 +20,6 @@
// This is the Jenkins script for USECASE-pipeline-<branch>
-#!groovy
-
// set the dependencies.
funcs = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy' )
test_lists = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsTestONTests.groovy' )
diff --git a/TestON/JenkinsFile/VM_BMJenkinsfileTrigger b/TestON/JenkinsFile/VM_BMJenkinsfileTrigger
index ee7a5ed..729cb89 100644
--- a/TestON/JenkinsFile/VM_BMJenkinsfileTrigger
+++ b/TestON/JenkinsFile/VM_BMJenkinsfileTrigger
@@ -1,3 +1,4 @@
+#!groovy
// Copyright 2017 Open Networking Foundation (ONF)
//
// Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
@@ -19,8 +20,6 @@
// This is the Jenkins script for vm-pipeline-trigger or bm-pipeline-trigger
-#!groovy
-
// set the functions of the dependencies.
funcs = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy' )
test_lists = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsTestONTests.groovy' )
diff --git a/TestON/JenkinsFile/dependencies/GeneralFuncs.groovy b/TestON/JenkinsFile/dependencies/GeneralFuncs.groovy
index 7618fe0..cae7f6f 100644
--- a/TestON/JenkinsFile/dependencies/GeneralFuncs.groovy
+++ b/TestON/JenkinsFile/dependencies/GeneralFuncs.groovy
@@ -1,3 +1,4 @@
+#!groovy
// Copyright 2017 Open Networking Foundation (ONF)
//
// Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
@@ -20,8 +21,6 @@
// This is the dependency Jenkins script.
// it has some general functionality of making database command, basic graph part, and get list of the test
-#!groovy
-
// make the init part of the database command
def database_command_create( pass, host, port, user ){
return pass + "|psql --host=" + host + " --port=" + port + " --username=" + user + " --password --dbname onostest -c "
diff --git a/TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy b/TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy
index 2b3a23a..0b03c69 100644
--- a/TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy
+++ b/TestON/JenkinsFile/dependencies/JenkinsCommonFuncs.groovy
@@ -1,3 +1,4 @@
+#!groovy
// Copyright 2017 Open Networking Foundation (ONF)
//
// Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
@@ -20,7 +21,6 @@
// This is the dependency Jenkins script.
// it has some common functions that runs test and generate graph.
-#!groovy
import groovy.time.*
generalFuncs = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/GeneralFuncs.groovy' )
fileRelated = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsPathAndFiles.groovy' )
diff --git a/TestON/JenkinsFile/dependencies/JenkinsPathAndFiles.groovy b/TestON/JenkinsFile/dependencies/JenkinsPathAndFiles.groovy
index b2c30c5..f8700c9 100644
--- a/TestON/JenkinsFile/dependencies/JenkinsPathAndFiles.groovy
+++ b/TestON/JenkinsFile/dependencies/JenkinsPathAndFiles.groovy
@@ -1,3 +1,5 @@
+#!groovy
+
// Copyright 2017 Open Networking Foundation (ONF)
//
// Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
@@ -20,8 +22,6 @@
// This is the dependency Jenkins script.
// This will initialize the paths of the jenkins file and paths.
-#!groovy
-
// init the paths for the directory
def initLocation(){
jenkinsFolder = "~/OnosSystemTest/TestON/JenkinsFile/"
diff --git a/TestON/JenkinsFile/dependencies/JenkinsTestONTests.groovy b/TestON/JenkinsFile/dependencies/JenkinsTestONTests.groovy
index a47e4c0..b23591b 100644
--- a/TestON/JenkinsFile/dependencies/JenkinsTestONTests.groovy
+++ b/TestON/JenkinsFile/dependencies/JenkinsTestONTests.groovy
@@ -1,3 +1,5 @@
+#!groovy
+
// Copyright 2017 Open Networking Foundation (ONF)
//
// Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
@@ -21,7 +23,6 @@
// This will provide the basic information for the tests for scheduling.
// Any new test to be added should be added here.
-#!groovy
def getAllTheTests( wikiPrefix ){
// This contains the dictionary of the test and the category of them
diff --git a/TestON/JenkinsFile/dependencies/PerformanceFuncs.groovy b/TestON/JenkinsFile/dependencies/PerformanceFuncs.groovy
index 65f9cb5..c2dfc5d 100644
--- a/TestON/JenkinsFile/dependencies/PerformanceFuncs.groovy
+++ b/TestON/JenkinsFile/dependencies/PerformanceFuncs.groovy
@@ -1,3 +1,5 @@
+#!groovy
+
// Copyright 2017 Open Networking Foundation (ONF)
//
// Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
@@ -20,7 +22,6 @@
// This is the dependency Jenkins script.
// This will provide the SCPF specific functions
-#!groovy
fileRelated = evaluate readTrusted( 'TestON/JenkinsFile/dependencies/JenkinsPathAndFiles.groovy' )
fileRelated.init()
diff --git a/TestON/JenkinsFile/dependencies/TriggerFuncs.groovy b/TestON/JenkinsFile/dependencies/TriggerFuncs.groovy
index 9b290a6..238d7bc 100644
--- a/TestON/JenkinsFile/dependencies/TriggerFuncs.groovy
+++ b/TestON/JenkinsFile/dependencies/TriggerFuncs.groovy
@@ -1,3 +1,5 @@
+#!groovy
+
// Copyright 2017 Open Networking Foundation (ONF)
//
// Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
@@ -21,8 +23,6 @@
// This will provide the portion that will set up the environment of the machine
// and trigger the corresponding jobs.
-#!groovy
-
def init( commonFuncs ){
funcs = commonFuncs
}