Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 1 | /* |
Joey Armstrong | 14628cd | 2023-01-10 08:38:31 -0500 | [diff] [blame] | 2 | * Copyright 2018-2023 Open Networking Foundation (ONF) and the ONF Contributors |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 3 | |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | pipeline { |
| 18 | |
| 19 | /* no label, executor is determined by JJB */ |
| 20 | agent { |
Zack Williams | ce46e7e | 2019-10-29 11:27:40 -0700 | [diff] [blame] | 21 | label "${params.buildNode}" |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 22 | } |
| 23 | |
| 24 | stages { |
Matteo Scandolo | 68cd107 | 2019-11-06 10:21:10 -0800 | [diff] [blame] | 25 | stage('Download BBR') { |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 26 | steps { |
| 27 | sh """ |
Matteo Scandolo | 68cd107 | 2019-11-06 10:21:10 -0800 | [diff] [blame] | 28 | curl -s https://api.github.com/repos/opencord/bbsim/releases/latest | grep "browser_download_url.*bbr-linux-amd" | cut -d : -f 2,3 | tr -d \\" | wget -qi - |
| 29 | mv bbr-linux-amd64 bbr |
| 30 | chmod a+x bbr |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 31 | """ |
| 32 | } |
| 33 | } |
Matteo Scandolo | 68cd107 | 2019-11-06 10:21:10 -0800 | [diff] [blame] | 34 | stage('Download BBSim') { |
Matteo Scandolo | d3415f6 | 2019-10-25 15:58:18 -0700 | [diff] [blame] | 35 | steps { |
| 36 | sh """ |
| 37 | docker pull voltha/bbsim:master |
| 38 | """ |
| 39 | } |
| 40 | } |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 41 | stage('64 ONUs (16 ONU x 4 PONs)') { |
| 42 | steps { |
Matteo Scandolo | 3129e3a | 2020-09-17 08:58:49 -0700 | [diff] [blame] | 43 | sh """ |
| 44 | docker rm -f bbsim || true |
| 45 | """ |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 46 | timeout(1) { |
| 47 | sh """ |
Matteo Scandolo | 76b7774 | 2020-09-16 11:14:04 -0700 | [diff] [blame] | 48 | DOCKER_REPOSITORY=voltha/ DOCKER_TAG=master DOCKER_RUN_ARGS="-logLevel warn -enableperf -pon 4 -onu 16" make docker-run |
Matteo Scandolo | ba342de | 2019-10-22 10:41:33 -0700 | [diff] [blame] | 49 | sleep 5 |
Matteo Scandolo | f5c537e | 2019-10-28 16:45:57 -0700 | [diff] [blame] | 50 | ./bbr -pon 4 -onu 16 -logfile bbr_16_4.logs |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 51 | docker logs bbsim 2>&1 | tee bbsim_16_4.logs |
Matteo Scandolo | 226dcce | 2019-11-01 13:20:20 -0700 | [diff] [blame] | 52 | res=\$(cat bbr_16_4.logs | grep Duration | awk '{print \$5}' ); printf "Runtime\n\${res:9:10}" > bbr_16_4.txt |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 53 | """ |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 | stage('128 ONUs (32 ONU x 4 PONs)') { |
| 58 | steps { |
Matteo Scandolo | 3129e3a | 2020-09-17 08:58:49 -0700 | [diff] [blame] | 59 | sh """ |
| 60 | docker rm -f bbsim || true |
| 61 | """ |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 62 | timeout(1) { |
| 63 | sh """ |
Matteo Scandolo | 76b7774 | 2020-09-16 11:14:04 -0700 | [diff] [blame] | 64 | DOCKER_REPOSITORY=voltha/ DOCKER_TAG=master DOCKER_RUN_ARGS="-logLevel warn -enableperf -pon 4 -onu 32" make docker-run |
Matteo Scandolo | ba342de | 2019-10-22 10:41:33 -0700 | [diff] [blame] | 65 | sleep 5 |
Matteo Scandolo | f5c537e | 2019-10-28 16:45:57 -0700 | [diff] [blame] | 66 | ./bbr -pon 4 -onu 32 -logfile bbr_32_4.logs |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 67 | docker logs bbsim 2>&1 | tee bbsim_32_4.logs |
Matteo Scandolo | 226dcce | 2019-11-01 13:20:20 -0700 | [diff] [blame] | 68 | res=\$(cat bbr_32_4.logs | grep Duration | awk '{print \$5}' ); printf "Runtime\n\${res:9:10}" > bbr_32_4.txt |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 69 | """ |
| 70 | } |
| 71 | } |
| 72 | } |
| 73 | stage('256 ONUs (32 ONU x 8 PONs)') { |
| 74 | steps { |
Matteo Scandolo | 3129e3a | 2020-09-17 08:58:49 -0700 | [diff] [blame] | 75 | sh """ |
| 76 | docker rm -f bbsim || true |
| 77 | """ |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 78 | timeout(1) { |
| 79 | sh """ |
Matteo Scandolo | 76b7774 | 2020-09-16 11:14:04 -0700 | [diff] [blame] | 80 | DOCKER_REPOSITORY=voltha/ DOCKER_TAG=master DOCKER_RUN_ARGS="-logLevel warn -enableperf -pon 8 -onu 32" make docker-run |
Matteo Scandolo | ba342de | 2019-10-22 10:41:33 -0700 | [diff] [blame] | 81 | sleep 5 |
Matteo Scandolo | f5c537e | 2019-10-28 16:45:57 -0700 | [diff] [blame] | 82 | ./bbr -pon 8 -onu 32 -logfile bbr_32_8.logs |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 83 | docker logs bbsim 2>&1 | tee bbsim_32_8.logs |
Matteo Scandolo | 226dcce | 2019-11-01 13:20:20 -0700 | [diff] [blame] | 84 | res=\$(cat bbr_32_8.logs | grep Duration | awk '{print \$5}' ); printf "Runtime\n\${res:9:10}" > bbr_32_8.txt |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 85 | """ |
| 86 | } |
| 87 | } |
| 88 | } |
Matteo Scandolo | cae57b5 | 2019-11-12 10:52:53 -0800 | [diff] [blame] | 89 | stage('512 ONUs (64 ONU x 8 PONs)') { |
| 90 | steps { |
Matteo Scandolo | 3129e3a | 2020-09-17 08:58:49 -0700 | [diff] [blame] | 91 | sh """ |
| 92 | docker rm -f bbsim || true |
| 93 | """ |
Matteo Scandolo | cae57b5 | 2019-11-12 10:52:53 -0800 | [diff] [blame] | 94 | timeout(1) { |
| 95 | sh """ |
Matteo Scandolo | 76b7774 | 2020-09-16 11:14:04 -0700 | [diff] [blame] | 96 | DOCKER_REPOSITORY=voltha/ DOCKER_TAG=master DOCKER_RUN_ARGS="-logLevel warn -enableperf -pon 8 -onu 64" make docker-run |
Matteo Scandolo | cae57b5 | 2019-11-12 10:52:53 -0800 | [diff] [blame] | 97 | sleep 5 |
| 98 | ./bbr -pon 8 -onu 64 -logfile bbr_64_8.logs |
| 99 | docker logs bbsim 2>&1 | tee bbsim_64_8.logs |
| 100 | res=\$(cat bbr_64_8.logs | grep Duration | awk '{print \$5}' ); printf "Runtime\n\${res:9:10}" > bbr_64_8.txt |
| 101 | """ |
| 102 | } |
| 103 | } |
| 104 | } |
| 105 | stage('960 ONUs (64 ONU x 15 PONs)') { |
| 106 | steps { |
Matteo Scandolo | 3129e3a | 2020-09-17 08:58:49 -0700 | [diff] [blame] | 107 | sh """ |
| 108 | docker rm -f bbsim || true |
| 109 | """ |
Matteo Scandolo | cae57b5 | 2019-11-12 10:52:53 -0800 | [diff] [blame] | 110 | timeout(1) { |
| 111 | sh """ |
Matteo Scandolo | 76b7774 | 2020-09-16 11:14:04 -0700 | [diff] [blame] | 112 | DOCKER_REPOSITORY=voltha/ DOCKER_TAG=master DOCKER_RUN_ARGS="-logLevel warn -enableperf -pon 15 -onu 64" make docker-run |
Matteo Scandolo | cae57b5 | 2019-11-12 10:52:53 -0800 | [diff] [blame] | 113 | sleep 5 |
| 114 | ./bbr -pon 15 -onu 64 -logfile bbr_64_15.logs |
| 115 | docker logs bbsim 2>&1 | tee bbsim_64_15.logs |
| 116 | res=\$(cat bbr_64_15.logs | grep Duration | awk '{print \$5}' ); printf "Runtime\n\${res:9:10}" > bbr_64_15.txt |
| 117 | """ |
| 118 | } |
| 119 | } |
| 120 | } |
Matteo Scandolo | 0dfee53 | 2019-10-21 16:20:12 -0700 | [diff] [blame] | 121 | } |
| 122 | post { |
| 123 | always { |
| 124 | archiveArtifacts artifacts: '*.logs' |
Joey Armstrong | 93ffa2e | 2022-08-22 14:24:52 -0400 | [diff] [blame] | 125 | step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "joey@opennetworking.org", sendToIndividuals: false]) |
Matteo Scandolo | 0dfee53 | 2019-10-21 16:20:12 -0700 | [diff] [blame] | 126 | } |
Matteo Scandolo | 0208caa | 2019-10-29 14:31:22 -0700 | [diff] [blame] | 127 | success { |
| 128 | plot([ |
| 129 | csvFileName: 'plot-bbr_16_4.csv', |
| 130 | csvSeries: [[file: 'bbr_16_4.txt']], |
| 131 | group: 'BBSim', |
| 132 | title: '64 ONUs (16 ONUs x 4 PONs)', |
| 133 | style: 'line' |
| 134 | ]) |
| 135 | plot([ |
| 136 | csvFileName: 'plot-bbr_32_4.csv', |
| 137 | csvSeries: [[file: 'bbr_32_4.txt']], |
| 138 | group: 'BBSim', |
| 139 | title: '128 ONUs (32 ONUs x 4 PONs)', |
| 140 | style: 'line' |
| 141 | ]) |
| 142 | plot([ |
| 143 | csvFileName: 'plot-bbr_32_8.csv', |
| 144 | csvSeries: [[file: 'bbr_32_8.txt']], |
| 145 | group: 'BBSim', |
| 146 | title: '256 ONUs (32 ONUs x 8 PONs)', |
| 147 | style: 'line' |
| 148 | ]) |
Matteo Scandolo | cae57b5 | 2019-11-12 10:52:53 -0800 | [diff] [blame] | 149 | plot([ |
| 150 | csvFileName: 'plot-bbr_64_8.csv', |
| 151 | csvSeries: [[file: 'bbr_64_8.txt']], |
| 152 | group: 'BBSim', |
| 153 | title: '512 ONUs (64 ONUs x 8 PONs)', |
| 154 | style: 'line' |
| 155 | ]) |
| 156 | plot([ |
| 157 | csvFileName: 'plot-bbr_64_15.csv', |
| 158 | csvSeries: [[file: 'bbr_64_15.txt']], |
| 159 | group: 'BBSim', |
| 160 | title: '960 ONUs (64 ONUs x 15 PONs)', |
| 161 | style: 'line' |
| 162 | ]) |
Matteo Scandolo | 0208caa | 2019-10-29 14:31:22 -0700 | [diff] [blame] | 163 | } |
Matteo Scandolo | 0dfee53 | 2019-10-21 16:20:12 -0700 | [diff] [blame] | 164 | failure { |
| 165 | sh ''' |
| 166 | docker logs bbsim 2>&1 | tee bbsim_failed.logs |
Matteo Scandolo | 76b7774 | 2020-09-16 11:14:04 -0700 | [diff] [blame] | 167 | docker cp bbsim:/var/lib/dhcp/dhcpd.leases dhcpd_leases_failed.logs || true |
| 168 | docker exec bbsim bbsimctl onu list > onu_list.logs || true |
Matteo Scandolo | 0dfee53 | 2019-10-21 16:20:12 -0700 | [diff] [blame] | 169 | ''' |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 170 | } |
| 171 | } |
| 172 | } |