Skip to content

Commit 7eb0dcf

Browse files
committed
feat: provide commands within docs for pre-commit hooks setup
1 parent fc415ad commit 7eb0dcf

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

doc/source/contributor/pre-commit.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,19 @@ Currently the following hooks are provided:
2323

2424
Installation of `pre-commit` hooks is handled via the `install-pre-commit-hooks` playbook
2525
found within the Ansible directory.
26-
Either use `kayobe playbook run` or add the playbook as a hook within Kayobe config such as
26+
Either run the playbook manually or add the playbook as a hook within Kayobe config such as
2727
within `control-host-bootstrap/post.d`.
2828
Once done you should find `pre-commit` is available within the `kayobe` virtualenv.
2929

30+
To run the playbook using the following command
31+
32+
- ``kayobe playbook run ${KAYOBE_CONFIG_PATH}/ansible/install-pre-commit-hooks.yml``
33+
34+
Whereas to run the playbook when control host bootstrap runs ensure it registered as symlink using the following command
35+
36+
- ``mkdir -p ${KAYOBE_CONFIG_PATH}/hooks/control-host-bootstrap/post.d``
37+
- ``ln -s ${KAYOBE_CONFIG_PATH}/ansible/install-pre-commit-hooks.yml ${KAYOBE_CONFIG_PATH}/hooks/control-host-bootstrap/post.d/install-pre-commit-hooks.yml``
38+
3039
All that remains is the installation of the hooks themselves which can be accomplished either by
3140
running `pre-commit run` or using `git commit` when you have changes that need to be committed.
3241
This will trigger a brief installation process of the hooks which may take a few minutes.

0 commit comments

Comments
 (0)