Revert "Removing OpenNebula code"
[osm/RO.git] / devops-stages / stage-build.sh
1 #!/bin/bash
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at
5 #
6 # http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
11 # implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 set -ex
16
17 rm -rf deb_dist/*
18 mkdir -p deb_dist
19
20 # Building packages
21 tox -e dist_ro_plugin &
22 tox -e dist_ng_ro &
23 tox -e dist_ro_sdn_arista_cloudvision &
24 tox -e dist_ro_sdn_dpb &
25 tox -e dist_ro_sdn_dynpac &
26 tox -e dist_ro_sdn_floodlight_of &
27 tox -e dist_ro_sdn_ietfl2vpn &
28 tox -e dist_ro_sdn_juniper_contrail &
29 tox -e dist_ro_sdn_odl_of &
30 tox -e dist_ro_sdn_onos_of &
31 tox -e dist_ro_sdn_onos_vpls &
32 tox -e dist_ro_vim_aws &
33 tox -e dist_ro_vim_azure &
34 tox -e dist_ro_vim_fos &
35 #tox -e dist_ro_vim_opennebula &
36 tox -e dist_ro_vim_openstack &
37 tox -e dist_ro_vim_openvim &
38 tox -e dist_ro_vim_vmware &
39 tox -e dist_ro_vim_gcp &
40
41 while true; do
42 wait -n || {
43 code="$?"
44 ([[ $code = "127" ]] && exit 0 || exit "$code")
45 break
46 }
47 done;
48 # Copying packages
49 # RO plugin
50 cp RO-plugin/deb_dist/python3-osm-ro-plugin_*.deb deb_dist/
51
52 # NG-RO
53 cp NG-RO/deb_dist/python3-osm-ng-ro_*.deb deb_dist/
54
55 # VIM plugins: vmware, openstack, AWS, fos, azure, Opennebula, GCP
56 for vim_plugin in RO-VIM-*
57 do
58 if [ "$vim_plugin" != "RO-VIM-opennebula" ]; then
59 cp ${vim_plugin}/deb_dist/python3-osm-rovim*.deb deb_dist/
60 fi
61 done
62
63 # SDN plugins: DynPac, Ietfl2vpn, Onosof Floodlightof
64 for sdn_plugin in RO-SDN-*
65 do
66 cp ${sdn_plugin}/deb_dist/python3-osm-rosdn*.deb deb_dist/
67 done