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 | 01d41ce | 2019-10-28 15:42:47 -0700 | [diff] [blame] | 25 | stage('Build BBR') { |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 26 | steps { |
| 27 | sh """ |
Matteo Scandolo | 6866b8c | 2019-10-28 16:15:24 -0700 | [diff] [blame] | 28 | make build |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 29 | """ |
| 30 | } |
| 31 | } |
Matteo Scandolo | 01d41ce | 2019-10-28 15:42:47 -0700 | [diff] [blame] | 32 | stage('Build BBSim') { |
Matteo Scandolo | d3415f6 | 2019-10-25 15:58:18 -0700 | [diff] [blame] | 33 | steps { |
| 34 | sh """ |
| 35 | docker pull voltha/bbsim:master |
Matteo Scandolo | 01d41ce | 2019-10-28 15:42:47 -0700 | [diff] [blame] | 36 | DOCKER_REPOSITORY=voltha/ DOCKER_TAG=candidate make docker-build |
Matteo Scandolo | d3415f6 | 2019-10-25 15:58:18 -0700 | [diff] [blame] | 37 | """ |
| 38 | } |
| 39 | } |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 40 | stage('64 ONUs (16 ONU x 4 PONs)') { |
| 41 | steps { |
| 42 | timeout(1) { |
| 43 | sh """ |
Matteo Scandolo | 13f412d | 2019-10-25 13:37:27 -0700 | [diff] [blame] | 44 | docker rm -f bbsim || true |
Matteo Scandolo | 01d41ce | 2019-10-28 15:42:47 -0700 | [diff] [blame] | 45 | DOCKER_REPOSITORY=voltha/ DOCKER_TAG=candidate DOCKER_RUN_ARGS="-pon 4 -onu 16" make docker-run |
Matteo Scandolo | ba342de | 2019-10-22 10:41:33 -0700 | [diff] [blame] | 46 | sleep 5 |
Matteo Scandolo | f5c537e | 2019-10-28 16:45:57 -0700 | [diff] [blame] | 47 | ./bbr -pon 4 -onu 16 -logfile bbr_16_4.logs |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 48 | docker logs bbsim 2>&1 | tee bbsim_16_4.logs |
Matteo Scandolo | 0208caa | 2019-10-29 14:31:22 -0700 | [diff] [blame] | 49 | res=\$(cat bbr_16_4.logs | grep Duration | awk '{print \$5}' ); echo YVALUE=\${res:9:10} > bbr_16_4.txt |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 50 | """ |
| 51 | } |
| 52 | } |
| 53 | } |
| 54 | stage('128 ONUs (32 ONU x 4 PONs)') { |
| 55 | steps { |
| 56 | timeout(1) { |
| 57 | sh """ |
Matteo Scandolo | 13f412d | 2019-10-25 13:37:27 -0700 | [diff] [blame] | 58 | docker rm -f bbsim || true |
Matteo Scandolo | 01d41ce | 2019-10-28 15:42:47 -0700 | [diff] [blame] | 59 | DOCKER_REPOSITORY=voltha/ DOCKER_TAG=candidate DOCKER_RUN_ARGS="-pon 4 -onu 32" make docker-run |
Matteo Scandolo | ba342de | 2019-10-22 10:41:33 -0700 | [diff] [blame] | 60 | sleep 5 |
Matteo Scandolo | f5c537e | 2019-10-28 16:45:57 -0700 | [diff] [blame] | 61 | ./bbr -pon 4 -onu 32 -logfile bbr_32_4.logs |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 62 | docker logs bbsim 2>&1 | tee bbsim_32_4.logs |
Matteo Scandolo | 0208caa | 2019-10-29 14:31:22 -0700 | [diff] [blame] | 63 | res=\$(cat bbr_32_4.logs | grep Duration | awk '{print \$5}' ); echo YVALUE=\${res:9:10} > bbr_32_4.txt |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 64 | """ |
| 65 | } |
| 66 | } |
| 67 | } |
| 68 | stage('256 ONUs (32 ONU x 8 PONs)') { |
| 69 | steps { |
| 70 | timeout(1) { |
| 71 | sh """ |
Matteo Scandolo | 13f412d | 2019-10-25 13:37:27 -0700 | [diff] [blame] | 72 | docker rm -f bbsim || true |
Matteo Scandolo | 01d41ce | 2019-10-28 15:42:47 -0700 | [diff] [blame] | 73 | DOCKER_REPOSITORY=voltha/ DOCKER_TAG=candidate DOCKER_RUN_ARGS="-pon 8 -onu 32" make docker-run |
Matteo Scandolo | ba342de | 2019-10-22 10:41:33 -0700 | [diff] [blame] | 74 | sleep 5 |
Matteo Scandolo | f5c537e | 2019-10-28 16:45:57 -0700 | [diff] [blame] | 75 | ./bbr -pon 8 -onu 32 -logfile bbr_32_8.logs |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 76 | docker logs bbsim 2>&1 | tee bbsim_32_8.logs |
Matteo Scandolo | 0208caa | 2019-10-29 14:31:22 -0700 | [diff] [blame] | 77 | res=\$(cat bbr_32_8.logs | grep Duration | awk '{print \$5}' ); echo YVALUE=\${res:9:10} > bbr_32_8.txt |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 78 | """ |
| 79 | } |
| 80 | } |
| 81 | } |
Matteo Scandolo | 0dfee53 | 2019-10-21 16:20:12 -0700 | [diff] [blame] | 82 | } |
| 83 | post { |
| 84 | always { |
| 85 | archiveArtifacts artifacts: '*.logs' |
| 86 | step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "teo@opennetworking.org", sendToIndividuals: false]) |
| 87 | } |
Matteo Scandolo | 0208caa | 2019-10-29 14:31:22 -0700 | [diff] [blame] | 88 | success { |
| 89 | plot([ |
| 90 | csvFileName: 'plot-bbr_16_4.csv', |
| 91 | csvSeries: [[file: 'bbr_16_4.txt']], |
| 92 | group: 'BBSim', |
| 93 | title: '64 ONUs (16 ONUs x 4 PONs)', |
| 94 | style: 'line' |
| 95 | ]) |
| 96 | plot([ |
| 97 | csvFileName: 'plot-bbr_32_4.csv', |
| 98 | csvSeries: [[file: 'bbr_32_4.txt']], |
| 99 | group: 'BBSim', |
| 100 | title: '128 ONUs (32 ONUs x 4 PONs)', |
| 101 | style: 'line' |
| 102 | ]) |
| 103 | plot([ |
| 104 | csvFileName: 'plot-bbr_32_8.csv', |
| 105 | csvSeries: [[file: 'bbr_32_8.txt']], |
| 106 | group: 'BBSim', |
| 107 | title: '256 ONUs (32 ONUs x 8 PONs)', |
| 108 | style: 'line' |
| 109 | ]) |
| 110 | } |
Matteo Scandolo | 0dfee53 | 2019-10-21 16:20:12 -0700 | [diff] [blame] | 111 | failure { |
| 112 | sh ''' |
| 113 | docker logs bbsim 2>&1 | tee bbsim_failed.logs |
| 114 | docker cp bbsim:/app/dhcp.logs dhcp_failed.logs |
| 115 | docker cp bbsim:/var/lib/dhcp/dhcpd.leases dhcpd_leases_failed.logs |
| 116 | docker cp bbsim:/app/tcpdump.logs tcpdump_failed.logs |
| 117 | docker exec bbsim bbsimctl onu list > onu_list.logs |
| 118 | ''' |
Matteo Scandolo | ecbd6a1 | 2019-10-21 10:51:03 -0700 | [diff] [blame] | 119 | } |
| 120 | } |
| 121 | } |