44 lines
1.3 KiB
Bash
Executable File
44 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Add here any the actions which are required before plugin build
|
|
# like packages building, packages downloading from mirrors and so on.
|
|
# The script should return 0 if there were no errors.
|
|
set -eux
|
|
|
|
#git reposotory with source code
|
|
GIT_REPOSITORY_URL=https://git.openstack.org/openstack/murano-plugin-networking-sfc
|
|
|
|
#package information
|
|
VERSION_NUMBER=${VERSION_NUMBER:-0.0.1}
|
|
DESCRIPTION="Murano plugin for networking SFC support on Openstack"
|
|
MAINTAINERS="Alexander Saprykin, Krzysztof Szukiełojć, Sergey Slipushenko"
|
|
|
|
DIR="$(dirname `readlink -f $0`)"
|
|
TMP_DIR="${DIR}/tmp"
|
|
|
|
#Remove temporary files
|
|
CLEANUP=${CLEANUP:-true}
|
|
|
|
function cleanup {
|
|
rm -rf "${TMP_DIR}"
|
|
}
|
|
|
|
command -v fpm >/dev/null 2>&1 || { echo >&2 "fpm ruby gem required but it's not installed. Aborting."; exit 1; }
|
|
|
|
cleanup
|
|
mkdir -p "${TMP_DIR}"
|
|
pushd $TMP_DIR
|
|
|
|
git clone $GIT_REPOSITORY_URL murano-plugin-networking-sfc
|
|
pushd "murano-plugin-networking-sfc/networking_sfc_library"
|
|
zip -r "${DIR}/deployment_scripts/files/NetworkingSFC.zip" *
|
|
popd
|
|
|
|
pushd "${DIR}/repositories/ubuntu/"
|
|
fpm --prefix /usr --python-install-lib /lib/python2.7/dist-packages --architecture all --force -s python --no-python-dependencies -t deb -m "${MAINTAINERS}" ${TMP_DIR}/murano-plugin-networking-sfc/setup.py
|
|
popd
|
|
|
|
if [ "$CLEANUP" != false ];then
|
|
cleanup
|
|
fi
|