You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-1Lines changed: 31 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,6 +115,22 @@ steps:
115
115
mount-checkout: false
116
116
```
117
117
118
+
You can enable custom logging drivers and logging options with the use of `log-driver` and `log-opt`:
119
+
120
+
```yml
121
+
steps:
122
+
- command: "npm run start"
123
+
plugins:
124
+
- docker#v5.12.0:
125
+
image: "node:7"
126
+
log-driver: "awslogs"
127
+
log-opt:
128
+
- "awslogs-group=my-buildkite-logs"
129
+
- "awslogs-region=us-east-1"
130
+
- "awslogs-stream-prefix=buildkite"
131
+
- "awslogs-create-group=true"
132
+
```
133
+
118
134
Variable interpolation can be tricky due to the 3 layers involved (Buildkite, agent VM, and docker). For example, if you want to use [ECR Buildkite plugin](https://github.com/buildkite-plugins/ecr-buildkite-plugin), you will need to use the following syntax. Note the `$$` prefix for variables that would otherwise resolve at pipeline upload time, not runtime:
119
135
120
136
```yml
@@ -307,6 +323,20 @@ Whether or not to leave the container after the run, or immediately remove it wi
307
323
308
324
Default: `false`
309
325
326
+
### `log-driver` (optional, string)
327
+
328
+
The logging driver for the container. This allows you to configure how Docker handles logs for the container.
:information_source: As a default, Docker uses the [json-file logging driver](https://docs.docker.com/engine/logging/drivers/json-file/)
333
+
334
+
See [Docker's logging documentation](https://docs.docker.com/config/containers/logging/) for complete details.
335
+
336
+
### `log-opt` (optional, array)
337
+
338
+
Options for the logging driver. These are key-value pairs that configure the behavior of the selected logging driver.
339
+
310
340
### `load` (optional, string)
311
341
312
342
Specify a file to load a docker image from. If omitted no load will be done.
@@ -315,7 +345,7 @@ Specify a file to load a docker image from. If omitted no load will be done.
315
345
316
346
Whether to automatically mount the current working directory which contains your checked out codebase. Mounts onto `/workdir`, unless `workdir` is set, in which case that will be used.
317
347
318
-
If there's a git mirror path and `mount-checkout` is enabled, the (mirror path)[https://buildkite.com/docs/pipelines/environment-variables#BUILDKITE_REPO_MIRROR] is mounted into the docker container as an added volume. Otherwise, the git mirror path will have to be explicitly added as an extra volume to mount into the container.
348
+
If there's a git mirror path and `mount-checkout` is enabled, the (mirror path)[https://buildkite.com/docs/pipelines/environment-variables#BUILDKITE_REPO_MIRROR] is mounted into the docker container as an added volume. Otherwise, the git mirror path will have to be explicitly added as an extra volume to mount into the container.
0 commit comments