Skip to content

Add support for pre- and post- hooks in scripts  #1198

@AlexSkrypnyk

Description

@AlexSkrypnyk

Allow to run custom scripts before and after scripts operations.

  1. Need to assess and identify which DrevOps scripts needs this.
  2. Need to come up with a short code snippet to handle this. Desirably to make the inclusion script to use the current script name as a base.
  3. The hook script should be able to suspend the main script execution

Examples:

sctipts/drevops/provision.sh would automatically discover:

scripts/hooks/pre-provision.sh
scripts/hooks/pre-provision-10.sh
scripts/hooks/pre-provision-20.sh
scripts/hooks/pre-provision-30.sh

and

scripts/hooks/post-provision.sh
scripts/hooks/post-provision-10.sh
scripts/hooks/post-provision-20.sh
scripts/hooks/post-provision-30.sh

The scripts/hooks directory may be something different:
scripts/hooks
scripts/custom
scripts

Metadata

Metadata

Assignees

Labels

ConfirmedThe issue was triaged and confirmed for development

Projects

Status

Next release

Relationships

None yet

Development

No branches or pull requests

Issue actions