Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018-present Open Networking Foundation |
| 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 { |
| 43 | timeout(1) { |
| 44 | sh """ |
Matteo Scandolo | 13f412d | 2019-10-25 13:37:27 -0700 | [diff] [blame] | 45 | docker rm -f bbsim || true |
Matteo Scandolo | 68cd107 | 2019-11-06 10:21:10 -0800 | [diff] [blame] | 46 | DOCKER_REPOSITORY=voltha/ DOCKER_TAG=master DOCKER_RUN_ARGS="-auth -dhcp -pon 4 -onu 16" make docker-run |
Matteo Scandolo | ba342de | 2019-10-22 10:41:33 -0700 | [diff] [blame] | 47 | sleep 5 |
Matteo Scandolo | f5c537e | 2019-10-28 16:45:57 -0700 | [diff] [blame] | 48 | ./bbr -pon 4 -onu 16 -logfile bbr_16_4.logs |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 49 | docker logs bbsim 2>&1 | tee bbsim_16_4.logs |
Matteo Scandolo | 226dcce | 2019-11-01 13:20:20 -0700 | [diff] [blame] | 50 | 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] | 51 | """ |
| 52 | } |
| 53 | } |
| 54 | } |
| 55 | stage('128 ONUs (32 ONU x 4 PONs)') { |
| 56 | steps { |
| 57 | timeout(1) { |
| 58 | sh """ |
Matteo Scandolo | 13f412d | 2019-10-25 13:37:27 -0700 | [diff] [blame] | 59 | docker rm -f bbsim || true |
Matteo Scandolo | 68cd107 | 2019-11-06 10:21:10 -0800 | [diff] [blame] | 60 | DOCKER_REPOSITORY=voltha/ DOCKER_TAG=master DOCKER_RUN_ARGS="-auth -dhcp -pon 4 -onu 32" make docker-run |
Matteo Scandolo | ba342de | 2019-10-22 10:41:33 -0700 | [diff] [blame] | 61 | sleep 5 |
Matteo Scandolo | f5c537e | 2019-10-28 16:45:57 -0700 | [diff] [blame] | 62 | ./bbr -pon 4 -onu 32 -logfile bbr_32_4.logs |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 63 | docker logs bbsim 2>&1 | tee bbsim_32_4.logs |
Matteo Scandolo | 226dcce | 2019-11-01 13:20:20 -0700 | [diff] [blame] | 64 | 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] | 65 | """ |
| 66 | } |
| 67 | } |
| 68 | } |
| 69 | stage('256 ONUs (32 ONU x 8 PONs)') { |
| 70 | steps { |
| 71 | timeout(1) { |
| 72 | sh """ |
Matteo Scandolo | 13f412d | 2019-10-25 13:37:27 -0700 | [diff] [blame] | 73 | docker rm -f bbsim || true |
Matteo Scandolo | 68cd107 | 2019-11-06 10:21:10 -0800 | [diff] [blame] | 74 | DOCKER_REPOSITORY=voltha/ DOCKER_TAG=master DOCKER_RUN_ARGS="-auth -dhcp -pon 8 -onu 32" make docker-run |
Matteo Scandolo | ba342de | 2019-10-22 10:41:33 -0700 | [diff] [blame] | 75 | sleep 5 |
Matteo Scandolo | f5c537e | 2019-10-28 16:45:57 -0700 | [diff] [blame] | 76 | ./bbr -pon 8 -onu 32 -logfile bbr_32_8.logs |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 77 | docker logs bbsim 2>&1 | tee bbsim_32_8.logs |
Matteo Scandolo | 226dcce | 2019-11-01 13:20:20 -0700 | [diff] [blame] | 78 | 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] | 79 | """ |
| 80 | } |
| 81 | } |
| 82 | } |
Matteo Scandolo | cae57b5 | 2019-11-12 10:52:53 -0800 | [diff] [blame] | 83 | stage('512 ONUs (64 ONU x 8 PONs)') { |
| 84 | steps { |
| 85 | timeout(1) { |
| 86 | sh """ |
| 87 | docker rm -f bbsim || true |
| 88 | DOCKER_REPOSITORY=voltha/ DOCKER_TAG=master DOCKER_RUN_ARGS="-auth -dhcp -pon 8 -onu 64" make docker-run |
| 89 | sleep 5 |
| 90 | ./bbr -pon 8 -onu 64 -logfile bbr_64_8.logs |
| 91 | docker logs bbsim 2>&1 | tee bbsim_64_8.logs |
| 92 | res=\$(cat bbr_64_8.logs | grep Duration | awk '{print \$5}' ); printf "Runtime\n\${res:9:10}" > bbr_64_8.txt |
| 93 | """ |
| 94 | } |
| 95 | } |
| 96 | } |
| 97 | stage('960 ONUs (64 ONU x 15 PONs)') { |
| 98 | steps { |
| 99 | timeout(1) { |
| 100 | sh """ |
| 101 | docker rm -f bbsim || true |
| 102 | DOCKER_REPOSITORY=voltha/ DOCKER_TAG=master DOCKER_RUN_ARGS="-auth -dhcp -pon 15 -onu 64" make docker-run |
| 103 | sleep 5 |
| 104 | ./bbr -pon 15 -onu 64 -logfile bbr_64_15.logs |
| 105 | docker logs bbsim 2>&1 | tee bbsim_64_15.logs |
| 106 | res=\$(cat bbr_64_15.logs | grep Duration | awk '{print \$5}' ); printf "Runtime\n\${res:9:10}" > bbr_64_15.txt |
| 107 | """ |
| 108 | } |
| 109 | } |
| 110 | } |
Matteo Scandolo | 0dfee53 | 2019-10-21 16:20:12 -0700 | [diff] [blame] | 111 | } |
| 112 | post { |
| 113 | always { |
| 114 | archiveArtifacts artifacts: '*.logs' |
| 115 | step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "teo@opennetworking.org", sendToIndividuals: false]) |
| 116 | } |
Matteo Scandolo | 0208caa | 2019-10-29 14:31:22 -0700 | [diff] [blame] | 117 | success { |
| 118 | plot([ |
| 119 | csvFileName: 'plot-bbr_16_4.csv', |
| 120 | csvSeries: [[file: 'bbr_16_4.txt']], |
| 121 | group: 'BBSim', |
| 122 | title: '64 ONUs (16 ONUs x 4 PONs)', |
| 123 | style: 'line' |
| 124 | ]) |
| 125 | plot([ |
| 126 | csvFileName: 'plot-bbr_32_4.csv', |
| 127 | csvSeries: [[file: 'bbr_32_4.txt']], |
| 128 | group: 'BBSim', |
| 129 | title: '128 ONUs (32 ONUs x 4 PONs)', |
| 130 | style: 'line' |
| 131 | ]) |
| 132 | plot([ |
| 133 | csvFileName: 'plot-bbr_32_8.csv', |
| 134 | csvSeries: [[file: 'bbr_32_8.txt']], |
| 135 | group: 'BBSim', |
| 136 | title: '256 ONUs (32 ONUs x 8 PONs)', |
| 137 | style: 'line' |
| 138 | ]) |
Matteo Scandolo | cae57b5 | 2019-11-12 10:52:53 -0800 | [diff] [blame] | 139 | plot([ |
| 140 | csvFileName: 'plot-bbr_64_8.csv', |
| 141 | csvSeries: [[file: 'bbr_64_8.txt']], |
| 142 | group: 'BBSim', |
| 143 | title: '512 ONUs (64 ONUs x 8 PONs)', |
| 144 | style: 'line' |
| 145 | ]) |
| 146 | plot([ |
| 147 | csvFileName: 'plot-bbr_64_15.csv', |
| 148 | csvSeries: [[file: 'bbr_64_15.txt']], |
| 149 | group: 'BBSim', |
| 150 | title: '960 ONUs (64 ONUs x 15 PONs)', |
| 151 | style: 'line' |
| 152 | ]) |
Matteo Scandolo | 0208caa | 2019-10-29 14:31:22 -0700 | [diff] [blame] | 153 | } |
Matteo Scandolo | 0dfee53 | 2019-10-21 16:20:12 -0700 | [diff] [blame] | 154 | failure { |
| 155 | sh ''' |
| 156 | docker logs bbsim 2>&1 | tee bbsim_failed.logs |
Matteo Scandolo | 0dfee53 | 2019-10-21 16:20:12 -0700 | [diff] [blame] | 157 | docker cp bbsim:/var/lib/dhcp/dhcpd.leases dhcpd_leases_failed.logs |
Matteo Scandolo | 0dfee53 | 2019-10-21 16:20:12 -0700 | [diff] [blame] | 158 | docker exec bbsim bbsimctl onu list > onu_list.logs |
| 159 | ''' |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 160 | } |
| 161 | } |
| 162 | } |