Fix automated job to properly create the bridge 87/23487/2
authorYolanda Robla Mota <yroblamo@redhat.com>
Fri, 21 Oct 2016 04:59:51 +0000 (06:59 +0200)
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>
Wed, 2 Nov 2016 08:43:49 +0000 (08:43 +0000)
The element that creates the bridge was moved from file
to template. But in the case of VMs we are not running puppet
to install bifrost, so that is not applied. Manually place the
file in the right path, and replace the bridge name with the
expected br_opnfv.

Change-Id: I22b2213b529343b24c358b3c80fd1849ec40979c
Signed-Off-By: Yolanda Robla <yroblamo@redhat.com>
jjb/infra/bifrost-verify.sh

index f7920a3..a782904 100755 (executable)
@@ -46,6 +46,13 @@ sudo git fetch $PROJECT_REPO $GERRIT_REFSPEC && sudo git checkout FETCH_HEAD
 # combine opnfv and upstream scripts/playbooks
 sudo /bin/cp -rf /opt/releng/prototypes/bifrost/* /opt/bifrost/
 
+# place bridge creation file on the right path
+mkdir -p /opt/puppet-infracloud/files/elements/infra-cloud-bridge/static/opt
+cp /opt/puppet-infracloud/templates/bifrost/create_bridge.py.erb /opt/puppet-infracloud/files/elements/infra-cloud-bridge/static/opt/create_bridge.py
+
+# replace bridge name
+sed -i .bak s/<%= @bridge_name -%>/br_opnfv/g /opt/puppet-infracloud/files/elements/infra-cloud-bridge/static/opt/create_bridge.py
+
 # cleanup remnants of previous deployment
 cd /opt/bifrost
 sudo -E ./scripts/destroy-env.sh