-
Notifications
You must be signed in to change notification settings - Fork 665
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify sequences to run dependency first (#1739)
* DRY up sequence command execution Removes a lot of repeated boilerplate found in commands that run scenario sequences, centralizing it in the base command module. Aside from removing duplicated code, this should also help make it a little easier to do introspection during sequence execution and take actions for all sequences based on the config, as seen with the 'destroy==always' handling. That behavior could now be added to any sequence by adding support for the `--destroy` option to the decorated command function. * Scenarios can now prune themselves This decouples scenario pruning from the `destroy` command, allowing scenarios to be pruned in any context where a scenario instance is available. This slightly modifies the pruning behavior. Previously this would unconditionally prune whenever a 'destroy' sequence step was executed. Now, `prune` is only called at the end of a sequence if that sequence included a `destroy` sequence step. This prevents unexpected pruning during sequence execution. As an example, users attempting to use ansible galaxy roles in the `create` and `destroy` steps would need to very carefully ensure the `dependency` step is run before *and after* every destroy step. With this change, a single dependency call is needed. * Modify sequences to run dependency first In sequences where a playbook is run, run the `dependency` step first so roles can be declared in scenerio requirements and used in all playbook steps, particularly 'create', 'destroy', and 'cleanup'. Signed-off-by: Sean Myers <[email protected]>
- Loading branch information
Showing
30 changed files
with
339 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.