diff --git a/.buildkite/hooks/post-command b/.buildkite/hooks/post-command index e89f08141d3df..13e0f4d795828 100755 --- a/.buildkite/hooks/post-command +++ b/.buildkite/hooks/post-command @@ -1,7 +1,7 @@ #!/usr/bin/env bash -if [ "$BUILDKITE_AGENT_META_DATA_AGENT_MANAGER" = "kibana" ]; then - .buildkite/scripts/lifecycle/post_command.sh -else +if [[ "$BUILDKITE_AGENT_NAME" =~ ^bk-agent ]]; then echo "Pipeline file triggered from outside the kibana executors, skipping post_command" +else + .buildkite/scripts/lifecycle/post_command.sh fi diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command index e6c4216da9147..95e2975d094c3 100644 --- a/.buildkite/hooks/pre-command +++ b/.buildkite/hooks/pre-command @@ -1,7 +1,7 @@ #!/usr/bin/env bash -if [ "$BUILDKITE_AGENT_META_DATA_AGENT_MANAGER" = "kibana" ]; then - source .buildkite/scripts/lifecycle/pre_command.sh -else +if [[ "$BUILDKITE_AGENT_NAME" =~ ^bk-agent ]]; then echo "Pipeline file triggered from outside the kibana executors, skipping pre_command" +else + source .buildkite/scripts/lifecycle/pre_command.sh fi