-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
generate command does not execute hooks #874
Comments
Maybe worth a quick PoC: https://github.com/Sceptre/sceptre/blob/master/sceptre/plan/actions.py#L564 suggests that generate won't respond to hooks because it is not decorated with the Could you fire up a branch that has that change to see if it works without much hassle? |
This enables `before_generate` and `after_generate` hook actions to allow users to execute hooks when running the `generate` command.
This enables `before_generate` and `after_generate` hook actions to allow users to execute hooks when running the `generate` command.
thanks @ngfgrant, adding the decorator works. |
This enables `before_generate` and `after_generate` hook actions to allow users to execute hooks when running the `generate` command.
This enables `before_generate` and `after_generate` hook actions to allow users to execute hooks when running the `generate` command.
I use the
!cmd
hook in my main and dependent sceptre files to download shared templates. In my case the sceptre generate command fails because it does not run the hook to download the needed CFN template files for sceptre to process. Is there a way to force the generate command to execute hooks? Just a note that when I run thelaunch
command the hooks are executed.Here's a simple example:
in
templates/noop.yaml
in
config/prod/A.yaml
in
config/prod/main.yaml
execute generate:
*Note: the output does NOT contain
test before_create for A
andtest before_create for main
which means the hooks did not get executed.execute launch:
*Note: the hooks do get executed and the output does contain
test before_create for A
andtest before_create for main
The text was updated successfully, but these errors were encountered: