Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ steps:

## Configuration

| Option | Required | Type | Description | Default |
| --------- | :------: | --------------- | ----------------------------------------------- | ---------------- |
| container | **Yes** | string | Container image to run | n.a |
| cmd | No | string | Command to run in the container | `<empty string>` |
| flags | No | list of strings | List of flags for 'docker run' | `<empty list>` |
| network | No | string | Docker network to which to attach the container | `host` |

| Option | Required | Type | Description | Default |
| -------------- | :------: | --------------- | ----------------------------------------------- | ---------------- |
| container | **Yes** | string | Container image to run | n.a |
| cmd | No | string | Command to run in the container | `<empty string>` |
| flags | No | list of strings | List of flags for 'docker run' | `<empty list>` |
| network | No | string | Docker network to which to attach the container | `host` |
| lockfile-dir | No | string | Directory in which to create the lock file | `/var/lock` |
## Environment variables

The plugin will set the following environment variables which will be accessible to your build:
Expand Down
2 changes: 1 addition & 1 deletion hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if [[ "${BUILDKITE_PLUGIN_DOCKER_SERVICE_NETWORK:-host}" != "host" ]]; then
if [[ "$(docker network ls --filter="name=${BUILDKITE_PLUGIN_DOCKER_SERVICE_NETWORK}" --format="{{.Name}}")" != "${BUILDKITE_PLUGIN_DOCKER_SERVICE_NETWORK}" ]]; then
docker network create --driver=bridge "${BUILDKITE_PLUGIN_DOCKER_SERVICE_NETWORK}"
fi
) 9>/var/lock/docker-service-buildkite-plugin.lock
) 9>"${BUILDKITE_PLUGIN_DOCKER_SERVICE_LOCKFILE_DIR:-/var/lock}/docker-service-buildkite-plugin.lock"
fi

docker_cmd="${docker_cmd} --network=${BUILDKITE_PLUGIN_DOCKER_SERVICE_NETWORK:-host}"
Expand Down
3 changes: 3 additions & 0 deletions plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ configuration:
network:
description: "Docker network to which to attach the container."
type: string
lockfile-dir:
description: "Directory in which to create the lock file"
type: string