Skip to content

Commit

Permalink
Merge pull request #85 from valkum/master
Browse files Browse the repository at this point in the history
Improve docs for adding agent hooks
  • Loading branch information
rimusz authored Jan 22, 2021
2 parents 25ab9b9 + 5bb2f2a commit 47a167b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/agent/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: Buildkite Agent Chart
name: agent
version: 0.5.0
version: 0.5.1
appVersion: 3.25.0
icon: https://buildkite.com/_next/static/assets/assets/images/brand-assets/buildkite-logo-portrait-on-light-61fc0230.png
keywords:
Expand Down
22 changes: 22 additions & 0 deletions stable/agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,25 @@ helm install --name bk-agent --namespace buildkite buildkite/agent -f values.yam
## Buildkite pipeline examples

Check for examples of `pipeline.yml` and `build/deploy` scripts [here](pipeline-examples).


## Adding agent hooks to agent pods

Adding your own hooks (e.g. environment hooks) depends on whether you use DinD or not.

#### Without Docker-in-Docker
Without using DinD, you can follow the lower part of the guide [here](https://buildkite.com/docs/agent/v3/docker#adding-hooks)

#### With Docker-in-Docker
As the hooks directory is set to a shared dir, currently the best way to add your own hooks while using DinD consists of two steps.
1. Follow the guide above for usage without DinD.
2. Add an entrypoint script to your values.yml that copies the hooks from the image to the shared dir. E.g:

```
entrypointd:
01-copy-hooks: |
#!/bin/sh
set -euo pipefail
mkdir -p /var/buildkite/hooks
cp /buildkite/hooks/* /var/buildkite/hooks/.
```

0 comments on commit 47a167b

Please sign in to comment.