Commit Graph

29 Commits

Author SHA1 Message Date
Brian Cain fc4e6e624f
Simplify if-statement in trigger parser 2019-02-01 13:34:15 -08:00
Brian Cain fefb702359
Introduce `type` and `command` triggers
This commit introduces some basic functionality for typed triggers:

- command
- action

Command triggers are triggers that will run before or after a given
sub-command.

Action triggers are for running triggers before or after internal
actions for Vagrant. This could be before or after a provision step,
before or after synced folders, or networking, etc.
2019-02-01 13:34:15 -08:00
Brian Cain 0054c5aae6
Raise error if incomplete trigger block is defined 2018-04-20 10:51:38 -07:00
Brian Cain ca672eb8e6
Trigger plugin cleanup 2018-04-20 10:51:38 -07:00
Brian Cain eac2fcf71e
Filter triggers based on only_on restraint 2018-04-20 10:51:38 -07:00
Brian Cain 372a6a7911
Initial trigger plugin scaffolding 2018-04-20 10:51:38 -07:00
Brian Cain a5d8cc1caa
Update trigger classes with comments 2018-04-20 10:51:38 -07:00
Brian Cain 956ed004bb
Update trigger config merge function 2018-04-20 10:51:38 -07:00
Brian Cain 42419bbd49
Fix rspec tests 2018-04-20 10:51:38 -07:00
Brian Cain d3dde739fe
Update trigger code docs 2018-04-20 10:51:38 -07:00
Brian Cain f0ec7c750b
Potential solution for trigger validation when guest is defined
Send the defined before and or after triggers in the merge function if
triggers exist already
2018-04-20 10:51:38 -07:00
Brian Cain 51e4118cc2
Debug commit 2018-04-20 10:51:38 -07:00
Brian Cain 607368a66c
Introduce merge function to preserve internal state 2018-04-20 10:51:38 -07:00
Brian Cain 5ca1d1ab64
Finalize config in plugins finalize, improve docs 2018-04-20 10:51:38 -07:00
Brian Cain a96baad0d7
Add comments for later dev 2018-04-20 10:51:38 -07:00
Brian Cain 8e72ae5bd6
Add basic validation for trigger config objects 2018-04-20 10:51:38 -07:00
Brian Cain 375e8d7153
Remove old comments 2018-04-20 10:51:38 -07:00
Brian Cain 3c5e4b2464
Fix variable doc 2018-04-20 10:51:38 -07:00
Brian Cain 50ecf45d50
Add more doc to create_trigger function 2018-04-20 10:51:38 -07:00
Brian Cain c10ae070b6
Store correct command for trigger 2018-04-20 10:51:38 -07:00
Brian Cain e0a5b1d647
Parse block trigger configs 2018-04-20 10:51:38 -07:00
Brian Cain 6f00eb5679
Move trigger options into own plugin class 2018-04-20 10:51:38 -07:00
Brian Cain fdf1b58570
Introduce ids for trigger blocks 2018-04-20 10:51:38 -07:00
Brian Cain bb2f3b35b9
Add basic unit test 2018-04-20 10:51:38 -07:00
Brian Cain 7cccddc009
Add basic scaffolding for command parsing 2018-04-20 10:51:38 -07:00
Brian Cain 01b904061d
Use proper command reference for command whitelist params 2018-04-20 10:51:38 -07:00
Brian Cain 0142722787
Add run and run_remote scaffolding 2018-04-20 10:51:38 -07:00
Brian Cain 813ffd06ec
Add more trigger config options 2018-04-20 10:51:38 -07:00
Brian Cain a194057fc0
Add trigger config plugin 2018-04-20 10:51:38 -07:00