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