epam / hubctl

Hub CTL is stack composition and lifecycle tool
https://hubctl.io
Mozilla Public License 2.0
10 stars 3 forks source link

Parametrise working dir for hook #54

Open akranga opened 1 year ago

akranga commented 1 year ago

Related to #23. User wants to parametrise working directory for hook execution....

Proposing following format:

  1. When user defines as the following
components:
- name: authn
  # ...
  hooks:
  - file: bin/authn-post-deploy
    triggers: [post-deploy]

Then the bin/authn-post-deploy executed from the directory of authn component

  1. When user defines a workDir argument as the following
hooks:
- file: bin/authn-post-deploy
  triggers: [post-deploy]
  workDir: .

...then the bin/authn-post-deploy script is executed from the same directory as hub.yaml, same as the value of $HUB_BASE_DIR

  1. When user defines a worker argument as the following
hooks:
- file: bin/authn-post-deploy
  triggers: [post-deploy]
  workDir: bin

...then the bin/authn-post-deploy script is executed from the same directory as bin/authn-post-deploy, the same place as $HUB_BASE_DIR/bin

akranga commented 1 year ago

Moving to the todo section. Currently there is no progress here