epam / epam/hubctl

Parametrise working dir for hook

Open
#54 1 comment 0 reactions 1 assignee Claimed by @akranga View on GitHub
enhancement help wanted
Dominant language
Go
Stars
11
Forks
3
Avg merge
7d 47m
Merged PRs (30d)
1

Description

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

Proposing following format:

1. When user defines as the following

```yaml
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

2. When user defines a `workDir` argument as the following

```yaml
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`

3. When user defines a `worker` argument as the following

```yaml
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`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.