Devin Lim | 767c983 | 2018-05-15 16:21:52 -0700 | [diff] [blame] | 1 | Jenkins script for Jenkins Pipeline jobs ** |
| 2 | ******************************************* |
| 3 | |
| 4 | All the Jenkins files are under the dependencies folders are the dependencies of the Jenkins file. |
| 5 | |
| 6 | Some tips for the Jenkins File: |
| 7 | |
| 8 | |
| 9 | 1. If you want to change the branch to be run on weekdays and weekends (VM, BM) : |
| 10 | |
| 11 | 1) go to VM_BMJenkinsfileTrigger |
| 12 | 2) change the portion on line 31 : |
| 13 | current_version = "master" |
You Wang | 8f12d7d | 2018-11-09 13:47:23 -0800 | [diff] [blame] | 14 | previous_version = "1.15" |
You Wang | f043d0a | 2019-04-22 16:30:40 -0700 | [diff] [blame] | 15 | before_previous_version = "2.1" |
Devin Lim | 767c983 | 2018-05-15 16:21:52 -0700 | [diff] [blame] | 16 | |
| 17 | |
| 18 | 2. If you want to change the branch to be run for the Segment Routing tests : |
| 19 | |
| 20 | 1) go to the FabricJenkinsfileTrigger |
| 21 | 2) change the variable values on line 32: |
| 22 | current_version = "master" |
You Wang | 8f12d7d | 2018-11-09 13:47:23 -0800 | [diff] [blame] | 23 | previous_version = "1.15" |
You Wang | f043d0a | 2019-04-22 16:30:40 -0700 | [diff] [blame] | 24 | before_previous_version = "2.1" |
Devin Lim | 767c983 | 2018-05-15 16:21:52 -0700 | [diff] [blame] | 25 | 3) If you want certain branch to be run on different machine then change |
You Wang | 96b98ad | 2018-05-25 12:14:45 -0700 | [diff] [blame] | 26 | a) line 155 - 157: |
| 27 | testcases[ "SR" ][ "nodeName" ][ <node you want> ] 0: Fabric2, 1: Fabric3, 2: Fabric4 |
Devin Lim | 767c983 | 2018-05-15 16:21:52 -0700 | [diff] [blame] | 28 | b) Then, go to dependencies/JenkinsCommonFuncs.groovy |
| 29 | change def fabricOn( branch ) on line 86. |
You Wang | f043d0a | 2019-04-22 16:30:40 -0700 | [diff] [blame] | 30 | Currently, master, 2.1 and 1.15 run on Fabric4, 3 and 2 respectively. |
You Wang | dba6c9f | 2018-12-21 11:58:55 -0800 | [diff] [blame] | 31 | c) Make sure to change the URLs on Wiki as well. If 1.15 runs on Fabric2 instead of Fabric3, then you |
Devin Lim | 767c983 | 2018-05-15 16:21:52 -0700 | [diff] [blame] | 32 | have to update the URL from |
You Wang | dba6c9f | 2018-12-21 11:58:55 -0800 | [diff] [blame] | 33 | https://jenkins.onosproject.org/view/QA/job/postjob-Fabric3/lastSuccessfulBuild/artifact/SRBridging_onos-1.15_20-builds_graph.jpg |
Devin Lim | 767c983 | 2018-05-15 16:21:52 -0700 | [diff] [blame] | 34 | to |
You Wang | dba6c9f | 2018-12-21 11:58:55 -0800 | [diff] [blame] | 35 | https://jenkins.onosproject.org/view/QA/job/postjob-Fabric2/lastSuccessfulBuild/artifact/SRBridging_onos-1.15_20-builds_graph.jpg |
Devin Lim | 767c983 | 2018-05-15 16:21:52 -0700 | [diff] [blame] | 36 | |
| 37 | |
| 38 | 3. If you want to upload additional logs for the Segment Routing tests: |
| 39 | |
| 40 | 1) go to dependencies/JenkinsCommonFuncs.groovy, |
| 41 | 2) change def copyLogs( testName ) on line 174. |
| 42 | 3) you may change/add/remove files from there. |
| 43 | |
| 44 | |
| 45 | 4. If you want to add a new test. ( non-SCPF tests like FUNC,HA,USECASE, and SR ): |
| 46 | |
| 47 | 1) go to dependencies/JenkinsTestONTests.groovy. |
| 48 | 2) Add the new test on the list. |
| 49 | 3) Make sure to also create a new wiki page for wiki link before running the test. |
| 50 | Since publish to confluence does not make new page, it has to be there before gets published. |
| 51 | 4) If your new test's category is not scheduled : |
| 52 | a) For non-Segment Routing test : |
| 53 | i) go to VM_BMJenkinsFileTrigger |
| 54 | ii) add your new category on any days you want it to be run after line 223. |
| 55 | b) For Segment Routing test: |
| 56 | i) go to FabricJenkinsfileTrigger |
| 57 | ii) add your new category after line 113. |
| 58 | 5) add your new graph to the wiki page. |
| 59 | |
| 60 | 5. If you want to add a new test ( SCPF ): |
| 61 | 1) Outside the Jenkins file requirement : need to add new table, function, view and its rule to the database first. |
| 62 | 2) go to dependencies/JenkinsTestONTests.groovy and follow the 4 steps procedure for scheduling. |
| 63 | 3) go to dependencies/PerformanceFuncs.groovy and add a new test in the dictionary. |
| 64 | 4) It explains details about which to add in the file. |
| 65 | 5) Make a Rscript for that test. |
You Wang | 96b98ad | 2018-05-25 12:14:45 -0700 | [diff] [blame] | 66 | 6) add your new graph to the wiki page. |