a2f565a122a31392bc8b30250c5b259fef01d843
[osm/RO.git] / devops-stages / stage-build.sh
1 #!/bin/bash
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
12 # implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 set -ex
17
18 rm -rf deb_dist/*
19 mkdir -p deb_dist
20
21 # main RO module
22 make -C RO clean package
23 cp RO/deb_dist/python3-osm-ro_*.deb deb_dist/
24
25 # RO client
26 make -C RO-client clean package
27 cp RO-client/deb_dist/python3-osm-roclient_*.deb deb_dist/
28
29 # RO plugin
30 make -C RO-plugin clean package
31 cp RO-plugin/deb_dist/python3-osm-ro-plugin_*.deb deb_dist/
32
33 # NG-RO
34 make -C NG-RO clean package
35 cp NG-RO/deb_dist/python3-osm-ng-ro_*.deb deb_dist/
36
37 # VIM plugings: vmware, openstack, AWS, fos, azure, Opennebula,
38 for vim_plugin in RO-VIM-*
39 do
40 make -C $vim_plugin clean package
41 cp ${vim_plugin}/deb_dist/python3-osm-rovim*.deb deb_dist/
42 done
43
44 # SDN plugins: DynPac, Ietfl2vpn, Onosof Floodlightof
45 for sdn_plugin in RO-SDN-*
46 do
47 [[ "$sdn_plugin" == RO-SDN-tapi ]] && continue # tapi folder appears at Jenkins due to container reuse
48 [[ "$sdn_plugin" == RO-SDN-arista ]] && continue # arista folder appears at Jenkins due to container reuse
49 make -C $sdn_plugin clean package
50 cp ${sdn_plugin}/deb_dist/python3-osm-rosdn*.deb deb_dist/
51 done
52