Skip to content
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

Hooks refactor #557

Merged
merged 4 commits into from
Nov 27, 2019
Merged

Hooks refactor #557

merged 4 commits into from
Nov 27, 2019

Conversation

alessandro-fazzi
Copy link
Member

Problem and solution were analysed in #532

One more important feature is added here: hooks can be configured to not raise exception if their command fails. This is crucial when you have a deploy chain where some commands may fail (maybe due to external services? or just because they are not important?) and you want your deploy to continue.
The error is visibly logged by the way.

This is an example of a working new hooks structure inside movefile.yml

  hooks:
    push:
    pull:
      before:
        - command: 'exit 1'
          where: local
          raise: false
      after:
        - command: 'exit 1'
          where: remote

Hooks are always executed in order and are synchronous, so the configuration should be procedurally fully respected.

The initial goal is accomplished, since we can order before and after hooks with any regard to the environment where they'll be executed.

@alessandro-fazzi alessandro-fazzi self-assigned this Nov 27, 2019
@alessandro-fazzi
Copy link
Member Author

Documentation will be updated after the merge and before the release

@alessandro-fazzi alessandro-fazzi merged commit 23ad212 into master Nov 27, 2019
@alessandro-fazzi alessandro-fazzi deleted the hooks_refactor branch November 27, 2019 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant