jedi4ever / veewee

Easing the building of vagrant boxes
MIT License
4.29k stars 779 forks source link

Documentation for hooks seems incorrect #962

Closed rpomeroy closed 9 years ago

rpomeroy commented 10 years ago

We tried to use a build hook with:

Veewee::Definition.declare({
  hooks => {
      :before_postinstall => Proc.new { 
        definition.box.scp('/tmp/foo.txt', '/tmp/bar.txt') 
    }
  }
})

This yielded errors so we tried: :hooks instead. We eliminated the error but our hook never got called. Any advice for getting finer debug information greatly appreciated. We started with a really simple hook that just logged that got called as in

Veewee::Definition.declare({
  :hooks => {
      :before_postinstall => Proc.new { puts 'Hey I got called' }
  }
})

We're currently working around the issue by directly downloading the dependencies in install scripts from within the VM being built - would prefer to reduce our dependencies on external sites and capture dependencies locally and load them into the VM using the example build hook with scp. Any advice on how to troubleshoot is greatly appreciated.

I love veewee - it's such a critical part of our flow - hope this project's momentum continues.

Thanks,

Ron Pomeroy

jordant commented 9 years ago

The pull request above fixes the documentation. I tested before_postinstall/after_postinstall scripts against master and they seem to be working correctly.

mpapis commented 9 years ago

merged