Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This implements proper hook files with Ansible tasks as discussed in #305.
This feature is heavily borrowed/stolen from https://github.com/f500/ansible-project_deploy with a few differences.
This PR separates outs the
main.yml
tasks file into multiple files. Each file represents a "step" in the deploy flow. And for each step we havebefore
andafter
hooks available.The steps are:
initialize
update
prepare
build
share
finalize
Also note that technically the
after
hook of one step and thebefore
hook of the following step are the same. However I wanted to include thebefore
/after
nomenclature for semantic reasons mostly. Also so it's more obvious when the hook is run. The f500 project uses hooks likeproject_deploy_hook_on_initialize
which, in my opinion, could be a little confusing as to where/when exactly it's happening.Hooks available:
deploy_initialize_before
deploy_initialize_after
deploy_update_before
deploy_update_after
deploy_prepare_before
deploy_prepare_after
deploy_build_before
deploy_build_after
deploy_share_before
deploy_share_after
deploy_finalize_before
deploy_finalize_after
Those are all variables which can be defined to override the default. Right now only
deploy_build_after
anddeploy_finalize_after
have corresponding hook files to replicate functionality we previously had in the commands.