Devin Lim | 49200ec | 2018-01-19 16:17:41 -0800 | [diff] [blame^] | 1 | --- |
| 2 | # ONOS System Test Pipeline jobs |
| 3 | |
| 4 | # TODO: Change all the job names in Jenkins Pipeline script. |
| 5 | |
| 6 | - test-free-job-boiler-plate: &test-free-job-boiler-plate |
| 7 | name: test-free-job-boiler-plate |
| 8 | |
| 9 | project-type: freestyle |
| 10 | |
| 11 | - init-station-plate: &init-station-plate |
| 12 | name: init-station-plate |
| 13 | station-type: |
| 14 | - 'VM' |
| 15 | - 'BM' |
| 16 | |
| 17 | - test-free-init-procedure-plate: &test-free-init-procedure-plate |
| 18 | name: test-free-init-procedure-plate |
| 19 | project: OnosSystemTest |
| 20 | stream: 'master' |
| 21 | |
| 22 | - inject-env-variable-plate: &inject-env-variable-plate |
| 23 | name: inject-env-variable-plate |
| 24 | wrappers: |
| 25 | - inject: |
| 26 | properties-file: '/var/jenkins/TestONOS.property' |
| 27 | script-content: | |
| 28 | echo "ONOSBranch=$ONOSBranch" > /var/jenkins/TestONOS.property |
| 29 | echo "TestONBranch=$TestONBranch" >> /var/jenkins/TestONOS.property |
| 30 | echo "ONOSTag=$ONOSTag" >> /var/jenkins/TestONOS.property |
| 31 | echo "WikiPrefix=$WikiPrefix" >> /var/jenkins/TestONOS.property |
| 32 | override-build-parameters: true |
| 33 | |
| 34 | # post_Job |
| 35 | - job-template: |
| 36 | name: postjob-{station-type} |
| 37 | |
| 38 | <<: *test-free-job-boiler-plate |
| 39 | |
| 40 | properties: |
| 41 | |
| 42 | - build-discarder: |
| 43 | num-to-keep: 1 |
| 44 | |
| 45 | parameters: |
| 46 | |
| 47 | - lf-infra-parameters: |
| 48 | project: '{project}' |
| 49 | branch: '{stream}' |
| 50 | stream: '{stream}' |
| 51 | lftools-version: '{lftools-version}' |
| 52 | |
| 53 | node: 'TestStation-{station-type}s' |
| 54 | |
| 55 | publishers: |
| 56 | |
| 57 | # - image-gallery: |
| 58 | # - gallery-type: archived-images-gallery |
| 59 | # title: 'Test result' |
| 60 | # includes: '*.jpg' |
| 61 | |
| 62 | - archive: |
| 63 | artifacts: '*.jpg' |
| 64 | |
| 65 | # cleanup_stations - TDOO: need to add bash script. |
| 66 | - job-template: |
| 67 | name: test-station-log-cleanup-VM |
| 68 | |
| 69 | <<: *test-free-job-boiler-plate |
| 70 | <<: *inject-env-variable-plate |
| 71 | properties: |
| 72 | |
| 73 | - build-discarder: |
| 74 | num-to-keep: 30 |
| 75 | |
| 76 | parameters: |
| 77 | |
| 78 | - string: |
| 79 | name: 'DAYS_OLD' |
| 80 | default: '15' |
| 81 | |
| 82 | - lf-infra-parameters: |
| 83 | project: '{project}' |
| 84 | branch: '{stream}' |
| 85 | stream: '{stream}' |
| 86 | lftools-version: '{lftools-version}' |
| 87 | |
| 88 | node: 'TestStation-VMs' |
| 89 | |
| 90 | triggers: |
| 91 | - timed: '01 08 1,15 * *' |
| 92 | |
| 93 | builders: |
| 94 | |
| 95 | - shell: !include-raw-escape: vm-bm-clean-up.sh |
| 96 | |
| 97 | - job-template: |
| 98 | name: test-station-log-cleanup-BM |
| 99 | |
| 100 | <<: *test-free-job-boiler-plate |
| 101 | <<: *inject-env-variable-plate |
| 102 | properties: |
| 103 | |
| 104 | - build-discarder: |
| 105 | num-to-keep: 30 |
| 106 | |
| 107 | parameters: |
| 108 | |
| 109 | - string: |
| 110 | name: 'DAYS_OLD' |
| 111 | default: '30' |
| 112 | |
| 113 | - lf-infra-parameters: |
| 114 | project: '{project}' |
| 115 | branch: '{stream}' |
| 116 | stream: '{stream}' |
| 117 | lftools-version: '{lftools-version}' |
| 118 | |
| 119 | node: 'TestStation-BMs' |
| 120 | |
| 121 | triggers: |
| 122 | - timed: '01 08 1 * *' |
| 123 | |
| 124 | builders: |
| 125 | |
| 126 | - shell: !include-raw-escape: vm-bm-clean-up.sh |
| 127 | |
| 128 | - job-template: |
| 129 | name: test-station-log-cleanup-CHO |
| 130 | |
| 131 | <<: *test-free-job-boiler-plate |
| 132 | <<: *inject-env-variable-plate |
| 133 | properties: |
| 134 | |
| 135 | - build-discarder: |
| 136 | num-to-keep: 15 |
| 137 | |
| 138 | parameters: |
| 139 | |
| 140 | - string: |
| 141 | name: 'DAYS_OLD' |
| 142 | default: '15' |
| 143 | |
| 144 | - lf-infra-parameters: |
| 145 | project: '{project}' |
| 146 | branch: '{stream}' |
| 147 | stream: '{stream}' |
| 148 | lftools-version: '{lftools-version}' |
| 149 | |
| 150 | node: 'TestStation-CHOs' |
| 151 | |
| 152 | triggers: |
| 153 | - timed: '@daily' |
| 154 | |
| 155 | builders: |
| 156 | |
| 157 | - shell: !include-raw-escape: cho-clean-up.sh |
| 158 | |
| 159 | #TODO LIST : DELTA -> perhaps change into pipeline?? , CHO_jobs, Check_style, Personal stations : necessary? |
| 160 | |
| 161 | - project: |
| 162 | name: post-result-jobs |
| 163 | project-name: post-result-jobs |
| 164 | |
| 165 | <<: *test-free-init-procedure-plate |
| 166 | <<: *init-station-plate |
| 167 | jobs: |
| 168 | - 'postjob-{station-type}' |
| 169 | |
| 170 | - project: |
| 171 | name: cleanup-jobs |
| 172 | project-name: cleanup-jobs |
| 173 | |
| 174 | <<: *test-free-init-procedure-plate |
| 175 | <<: *init-station-plate |
| 176 | jobs: |
| 177 | - 'test-station-log-cleanup-VM' |
| 178 | - 'test-station-log-cleanup-BM' |
| 179 | - 'test-station-log-cleanup-CHO' |