Adding a script for building LBaaS package
* LBaaS_Library.zip (the reslt of the script) is added to gitignore in order to prevent adding it to git. Change-Id: I13295661c52da8d0387545c2f3c444ec49e85034
This commit is contained in:
parent
bd12b4fd1e
commit
155a3971a0
1
murano-apps/LBaaS-interface/.gitignore
vendored
Normal file
1
murano-apps/LBaaS-interface/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
LBaaS_Library.zip
|
34
murano-apps/LBaaS-interface/build_package.sh
Executable file
34
murano-apps/LBaaS-interface/build_package.sh
Executable file
@ -0,0 +1,34 @@
|
||||
# Stop the script if an error occurs.
|
||||
set -e
|
||||
|
||||
function cleanup {
|
||||
cd $SCRIPTPATH
|
||||
rm -rf tmp
|
||||
}
|
||||
|
||||
# In case if script is running not where it is located.
|
||||
cd $(dirname $0)
|
||||
SCRIPTPATH=`pwd`
|
||||
|
||||
# Cleanup tmp dir on script exit.
|
||||
trap 'cleanup' EXIT
|
||||
|
||||
mkdir tmp
|
||||
|
||||
cp -v -r Classes Resources manifest.yaml tmp/
|
||||
|
||||
archive_name=lbaas.tar.gz
|
||||
lbaas_directory_name=lbaas_api-0.1
|
||||
|
||||
# Pack python tarball.
|
||||
pushd tmp/Resources/scripts
|
||||
tar -czvf $archive_name $lbaas_directory_name/*
|
||||
base64 $archive_name > $archive_name.bs64
|
||||
rm -rf $lbaas_directory_name
|
||||
rm -rf $archive_name
|
||||
popd
|
||||
|
||||
# Make murano package.
|
||||
pushd tmp
|
||||
zip -r ../LBaaS_Library.zip .
|
||||
popd
|
Loading…
Reference in New Issue
Block a user