30 lines
1.2 KiB
Bash
Executable File
30 lines
1.2 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
|
|
|
|
ROOT="$(dirname $(readlink -f $0))"
|
|
PLUGIN_MOD_DIR="$ROOT/deployment_scripts/puppet/modules/upstream"
|
|
MODULE_NAME='nsxt'
|
|
|
|
# Download upstream puppet modules that are not in fuel-library/
|
|
find "$ROOT/deployment_scripts/puppet/modules" -maxdepth 1 -mindepth 1 -type d ! -name $MODULE_NAME -prune -exec rm -fr {} \;
|
|
"$ROOT"/update_modules.sh -d "$PLUGIN_MOD_DIR"
|
|
|
|
# Remove .git directory
|
|
rm -fr $(find "${PLUGIN_MOD_DIR:?}" -name '.git' )
|
|
|
|
mv "$PLUGIN_MOD_DIR"/* "$(dirname $PLUGIN_MOD_DIR)"
|
|
|
|
# Download puppet modules that are in fuel-library/
|
|
TARBALL_VERSION='stable/mitaka'
|
|
REPO_PATH="https://github.com/openstack/fuel-library/tarball/${TARBALL_VERSION}"
|
|
#
|
|
wget -qO- "$REPO_PATH" | tar --wildcards -C "$PLUGIN_MOD_DIR" --strip-components=3 -zxvf - "openstack-fuel-library-*/deployment/puppet/"
|
|
mv "$PLUGIN_MOD_DIR"/osnailyfacter/lib/puppet/parser/functions/get_ssl_property.rb "$(dirname $PLUGIN_MOD_DIR)"/$MODULE_NAME/lib/puppet/parser/functions
|
|
|
|
# clean
|
|
rm -fr "$PLUGIN_MOD_DIR"
|