blob: a86bc528e32e8a944312c6f90a26cc777d9c810d [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 {
25 stage('Build BBSim') {
26 steps {
27 sh """
Matteo Scandoloef04c562019-10-22 09:42:46 -070028 docker pull voltha/bbsim:master
Matteo Scandoloecbd6a12019-10-21 10:51:03 -070029 make docker-build
30 """
31 }
32 }
33 stage('Build BBR') {
34 steps {
35 sh """
Matteo Scandoloef04c562019-10-22 09:42:46 -070036 export PATH=$PATH:/usr/lib/go-1.12/bin:/usr/local/go/bin:$GOPATH/bin
Matteo Scandoloecbd6a12019-10-21 10:51:03 -070037 make build-bbr
38 """
39 }
40 }
41 stage('64 ONUs (16 ONU x 4 PONs)') {
42 steps {
43 timeout(1) {
44 sh """
45 DOCKER_RUN_ARGS="-pon 4 -onu 16" make docker-run
46 ./bbr -pon 4 -onu 16 2>&1 | tee bbr_16_4.logs
47 docker logs bbsim 2>&1 | tee bbsim_16_4.logs
48 """
49 }
50 }
51 }
52 stage('128 ONUs (32 ONU x 4 PONs)') {
53 steps {
54 timeout(1) {
55 sh """
56 docker rm -f bbsim
57 DOCKER_RUN_ARGS="-pon 4 -onu 32" make docker-run
58 ./bbr -pon 4 -onu 32 2>&1 | tee bbr_32_4.logs
59 docker logs bbsim 2>&1 | tee bbsim_32_4.logs
60 """
61 }
62 }
63 }
64 stage('256 ONUs (32 ONU x 8 PONs)') {
65 steps {
66 timeout(1) {
67 sh """
68 docker rm -f bbsim
69 DOCKER_RUN_ARGS="-pon 8 -onu 32" make docker-run
70 ./bbr -pon 8 -onu 32 2>&1 | tee bbr_32_8.logs
71 docker logs bbsim 2>&1 | tee bbsim_32_8.logs
72 """
73 }
74 }
75 }
Matteo Scandolo0dfee532019-10-21 16:20:12 -070076 }
77 post {
78 always {
79 archiveArtifacts artifacts: '*.logs'
80 step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "teo@opennetworking.org", sendToIndividuals: false])
81 }
82 failure {
83 sh '''
84 docker logs bbsim 2>&1 | tee bbsim_failed.logs
85 docker cp bbsim:/app/dhcp.logs dhcp_failed.logs
86 docker cp bbsim:/var/lib/dhcp/dhcpd.leases dhcpd_leases_failed.logs
87 docker cp bbsim:/app/tcpdump.logs tcpdump_failed.logs
88 docker exec bbsim bbsimctl onu list > onu_list.logs
89 '''
Matteo Scandoloecbd6a12019-10-21 10:51:03 -070090 }
91 }
92}