blob: dfa975b712a13cbb0c6e2aaf2453e618d7dd19c9 [file] [log] [blame]
Matteo Scandoloecbd6a12019-10-21 10:51:03 -07001/*
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 {
21 label "${params.executorNode}"
22 }
23
24 stages {
Matteo Scandoloba342de2019-10-22 10:41:33 -070025 stage('Download BBR') {
Matteo Scandoloecbd6a12019-10-21 10:51:03 -070026 steps {
27 sh """
Matteo Scandoloba342de2019-10-22 10:41:33 -070028 wget https://github.com/opencord/bbsim/releases/download/v0.0.2/bbr-linux-amd64
29 mv bbr-linux-amd64 bbr
30 chmod a+x bbr
Matteo Scandoloecbd6a12019-10-21 10:51:03 -070031 """
32 }
33 }
34 stage('64 ONUs (16 ONU x 4 PONs)') {
35 steps {
36 timeout(1) {
37 sh """
Matteo Scandoloba342de2019-10-22 10:41:33 -070038 docker rm -f bbsim
39 DOCKER_REPOSITORY=voltha/ DOCKER_TAG=master DOCKER_RUN_ARGS="-pon 4 -onu 16" make docker-run
40 sleep 5
Matteo Scandoloecbd6a12019-10-21 10:51:03 -070041 ./bbr -pon 4 -onu 16 2>&1 | tee bbr_16_4.logs
42 docker logs bbsim 2>&1 | tee bbsim_16_4.logs
43 """
44 }
45 }
46 }
47 stage('128 ONUs (32 ONU x 4 PONs)') {
48 steps {
49 timeout(1) {
50 sh """
51 docker rm -f bbsim
Matteo Scandoloba342de2019-10-22 10:41:33 -070052 DOCKER_REPOSITORY=voltha/ DOCKER_TAG=master DOCKER_RUN_ARGS="-pon 4 -onu 32" make docker-run
53 sleep 5
Matteo Scandoloecbd6a12019-10-21 10:51:03 -070054 ./bbr -pon 4 -onu 32 2>&1 | tee bbr_32_4.logs
55 docker logs bbsim 2>&1 | tee bbsim_32_4.logs
56 """
57 }
58 }
59 }
60 stage('256 ONUs (32 ONU x 8 PONs)') {
61 steps {
62 timeout(1) {
63 sh """
64 docker rm -f bbsim
Matteo Scandoloba342de2019-10-22 10:41:33 -070065 DOCKER_REPOSITORY=voltha/ DOCKER_TAG=master DOCKER_RUN_ARGS="-pon 8 -onu 32" make docker-run
66 sleep 5
Matteo Scandoloecbd6a12019-10-21 10:51:03 -070067 ./bbr -pon 8 -onu 32 2>&1 | tee bbr_32_8.logs
68 docker logs bbsim 2>&1 | tee bbsim_32_8.logs
69 """
70 }
71 }
72 }
Matteo Scandolo0dfee532019-10-21 16:20:12 -070073 }
74 post {
75 always {
76 archiveArtifacts artifacts: '*.logs'
77 step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "teo@opennetworking.org", sendToIndividuals: false])
78 }
79 failure {
80 sh '''
81 docker logs bbsim 2>&1 | tee bbsim_failed.logs
82 docker cp bbsim:/app/dhcp.logs dhcp_failed.logs
83 docker cp bbsim:/var/lib/dhcp/dhcpd.leases dhcpd_leases_failed.logs
84 docker cp bbsim:/app/tcpdump.logs tcpdump_failed.logs
85 docker exec bbsim bbsimctl onu list > onu_list.logs
86 '''
Matteo Scandoloecbd6a12019-10-21 10:51:03 -070087 }
88 }
89}