Zack Williams | 477ba09 | 2018-10-17 10:50:06 -0700 | [diff] [blame] | 1 | // Copyright 2017-present Open Networking Foundation |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | node ('openolt_deb_onf_agent') { |
| 16 | timeout (time: 240) { |
| 17 | try { |
| 18 | dir ('openolt') { |
| 19 | stage ('Pull latest code') { |
| 20 | sh returnStdout: true, script: 'git pull' |
| 21 | } |
| 22 | stage ('Copy over SDK, BAL, patch files and DEB generators') { |
| 23 | sh returnStdout: true, script: 'cp ../../build-files/SW-BCM68620_2_4_3_6.zip download' |
| 24 | sh returnStdout: true, script: 'cp ../../build-files/sdk-all-6.5.7.tar.gz download' |
| 25 | sh returnStdout: true, script: 'cp ../../build-files/ACCTON_BAL_2.4.3.6-V201710131639.patch download' |
| 26 | sh returnStdout: true, script: 'cp ../../build-files/OPENOLT_BAL_2.4.3.6.patch download' |
| 27 | } |
| 28 | stage ('Build packages and libraries') { |
| 29 | sh returnStdout: true, script: '/bin/bash -c ./configure && make DEVICE=asfvolt16' |
| 30 | } |
| 31 | stage ('Create Debian file') { |
| 32 | sh returnStdout: true, script: '/bin/bash -c "make DEVICE=asfvolt16 deb"' |
| 33 | } |
| 34 | } |
| 35 | currentBuild.result = 'SUCCESS' |
| 36 | } catch (err) { |
| 37 | currentBuild.result = 'FAILURE' |
| 38 | step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "${notificationEmail}", sendToIndividuals: false]) |
| 39 | } finally { |
| 40 | echo "RESULT: ${currentBuild.result}" |
| 41 | } |
| 42 | } |
| 43 | } |