Disable or Skip Global Hooks

Is it possible to skip global hooks like: post-command. ?

Even if i can override it with an empty script i would be okay with that.

Hey @benmllr86

Welcome to our community!

It seems you do not want to run the post-command hook defined in the agent hook(global hook).

You can just rename the file as seen below in the hooks folder, that way it just remains a sample

mv post-command post-command.sample

Hello Stephanie,

thank you for your reply. How or Where do i run that? is that somehow part of the pipeline.yml ?

Hey @benmllr86,

It is not part of the pipeline.yml, that is for the pipeline configuration only. The location of the Buildkite Agent hooks folder depends on the OS and Agent installation method you used to setup the agent. Here’s a quick reference of the Agent Hook Folders:

  • Linux: ~/.buildkite-agent/hooks
  • macOS (Silicon): /opt/homebrew/etc/buildkite-agent/hooks
  • macOS (Intel): /usr/local/etc/buildkite-agent/hooks
  • Windows: C:\buildkite-agent\hooks

Once you naivgate to the correct directory on your local machine, then you can use these commands:

ls
mv post-command post-command.sample

For other installer options, check the Buildkite Agent Installation guide. You can usually find the hook location under file locations on the installer page.

Ohh I see. I was mainly thinking of the agents that gets created and used during the CI run but i understand how they are all connected now.

Thank you for your help.