Skip to content

Commit

Permalink
Use propagate-environment in BK deep dive (#1422)
Browse files Browse the repository at this point in the history
  • Loading branch information
72636c committed Feb 6, 2024
1 parent 458f259 commit c4f96b4
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 18 deletions.
36 changes: 23 additions & 13 deletions docs/deep-dives/buildkite.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ steps:
- docker#v5.0.0:
environment:
- BUILDKITE_AGENT_ACCESS_TOKEN
# Enable Buildkite integrations.
propagate-environment: true
volumes:
# Mount agent for Buildkite annotations.
Expand All @@ -46,12 +45,6 @@ declare the environment variables and volume mounts in your [Compose file]:
```yaml
services:
app:
environment:
# Enable Buildkite integrations.
- BUILDKITE
- BUILDKITE_AGENT_ACCESS_TOKEN
- BUILDKITE_JOB_ID
- BUILDKITE_STEP_ID
volumes:
- ./:/workdir
# Mount agent for Buildkite annotations.
Expand All @@ -60,6 +53,22 @@ services:
- /workdir/node_modules
```
and the `environment` and `propagate-environment` options in the [Docker Compose Buildkite plugin]:

```yaml
steps:
- command: pnpm run lint
plugins:
- *aws-sm
- *private-npm
- *docker-ecr-cache
- docker-compose#v4.16.0:
environment:
- BUILDKITE_AGENT_ACCESS_TOKEN
propagate-environment: true
run: app
```

This feature is also planned for [`skuba test`] in future.

**skuba**'s development API includes a [Buildkite.annotate] function.
Expand Down Expand Up @@ -108,9 +117,10 @@ The agent may be tied up running a particularly compute- or memory-intensive ste
[`skuba build-package`]: ../cli/build.md#skuba-build-package
[`skuba lint`]: ../cli/lint.md#skuba-lint
[`skuba test`]: ../cli/test.md#skuba-test
[buildkite.annotate]: ../development-api/buildkite.md#annotate
[buildkite annotations]: https://buildkite.com/docs/agent/v3/cli-annotate
[builds at seek]: https://backstage.myseek.xyz/docs/default/component/builds-cicd-seek/
[ci/cd]: https://en.wikipedia.org/wiki/CI/CD
[compose file]: https://docs.docker.com/compose/compose-file
[docker buildkite plugin]: https://github.com/buildkite-plugins/docker-buildkite-plugin
[Buildkite annotations]: https://buildkite.com/docs/agent/v3/cli-annotate
[Buildkite.annotate]: ../development-api/buildkite.md#annotate
[Builds at SEEK]: https://backstage.myseek.xyz/docs/default/component/builds-cicd-seek/
[CI/CD]: https://en.wikipedia.org/wiki/CI/CD
[Compose file]: https://docs.docker.com/compose/compose-file
[Docker Buildkite plugin]: https://github.com/buildkite-plugins/docker-buildkite-plugin
[Docker Compose Buildkite plugin]: https://github.com/buildkite-plugins/docker-compose-buildkite-plugin
10 changes: 5 additions & 5 deletions docs/deep-dives/github.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ jobs:
[`skuba lint`]: ../cli/lint.md#skuba-lint
[`skuba test`]: ../cli/test.md#skuba-test
[actions/checkout]: https://github.com/actions/checkout
[compose file]: https://docs.docker.com/compose/compose-file
[docker buildkite plugin]: https://github.com/buildkite-plugins/docker-buildkite-plugin
[docker compose buildkite plugin]: https://github.com/buildkite-plugins/docker-compose-buildkite-plugin
[github checks api]: https://docs.github.com/en/rest/reference/checks/
[github.createcheckrun]: ../development-api/github.md#createcheckrun
[Compose file]: https://docs.docker.com/compose/compose-file
[Docker Buildkite plugin]: https://github.com/buildkite-plugins/docker-buildkite-plugin
[Docker Compose Buildkite plugin]: https://github.com/buildkite-plugins/docker-compose-buildkite-plugin
[GitHub Checks API]: https://docs.github.com/en/rest/reference/checks/
[GitHub.createCheckRun]: ../development-api/github.md#createcheckrun
[will not trigger workflows]: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow

0 comments on commit c4f96b4

Please sign in to comment.