Fuel plugin for NSX-T integration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pre_build_hook 1.2KB

1234567891011121314151617181920212223242526272829
  1. #!/bin/bash
  2. # Add here any the actions which are required before plugin build
  3. # like packages building, packages downloading from mirrors and so on.
  4. # The script should return 0 if there were no errors.
  5. set -eux
  6. ROOT="$(dirname $(readlink -f $0))"
  7. PLUGIN_MOD_DIR="$ROOT/deployment_scripts/puppet/modules/upstream"
  8. MODULE_NAME='nsxt'
  9. # Download upstream puppet modules that are not in fuel-library/
  10. find "$ROOT/deployment_scripts/puppet/modules" -maxdepth 1 -mindepth 1 -type d ! -name $MODULE_NAME -prune -exec rm -fr {} \;
  11. "$ROOT"/update_modules.sh -d "$PLUGIN_MOD_DIR"
  12. # Remove .git directory
  13. rm -fr $(find "${PLUGIN_MOD_DIR:?}" -name '.git' )
  14. mv "$PLUGIN_MOD_DIR"/* "$(dirname $PLUGIN_MOD_DIR)"
  15. # Download puppet modules that are in fuel-library/
  16. TARBALL_VERSION='stable/mitaka'
  17. REPO_PATH="https://github.com/openstack/fuel-library/tarball/${TARBALL_VERSION}"
  18. #
  19. wget -qO- "$REPO_PATH" | tar --wildcards -C "$PLUGIN_MOD_DIR" --strip-components=3 -zxvf - "openstack-fuel-library-*/deployment/puppet/"
  20. mv "$PLUGIN_MOD_DIR"/osnailyfacter/lib/puppet/parser/functions/get_ssl_property.rb "$(dirname $PLUGIN_MOD_DIR)"/$MODULE_NAME/lib/puppet/parser/functions
  21. # clean
  22. rm -fr "$PLUGIN_MOD_DIR"