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
10 changes: 5 additions & 5 deletions plugins/docker/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ plugins:
Run `docker build` to create Docker images.
#### Task options

| Property | Description | Type | Default |
| :---------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------ | :------ |
| `ssh` | whether to forward host's SSH agent, see https://docs.docker.com/reference/cli/docker/buildx/build/#ssh | `boolean` | `false` |
| `buildArgs` | An object of Docker [build variables](https://docs.docker.com/build/building/variables/) to include when building the image. To use values from Tool Kit's environment (since we usually build Docker images on CircleCI, this would be the CI environment), you can use the `!toolkit/env` tag, e.g. `buildArgs: { GIT_COMMIT: !toolkit/env "GIT_COMMIT" }` | `Record<string, string>` | `{}` |
| `secrets` | <br /> An array of Docker [secrets](https://docs.docker.com/build/building/secrets/) to include when building the image.<br /> Each item in the array will add `--secret id=[id],source=[source]` to the docker build script. Docker can embed<br /> secret environment variables such as `NPM_TOKEN` (type: env) and secret files such as `.npmrc` (type: file)`.<br /> You can also include a secret environment variable by adding an item with just the environment name.<br /> | `Array<string _or_ _Object with properties:_<ul><li>id: string</li><li>type: 'file' \| 'env'</li><li>source: string</li></ul>>` | `[]` |
| Property | Description | Type | Default |
| :---------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------- | :------ |
| `ssh` | whether to forward host's SSH agent, see https://docs.docker.com/reference/cli/docker/buildx/build/#ssh | `boolean` | `false` |
| `buildArgs` | An object of Docker [build variables](https://docs.docker.com/build/building/variables/) to include when building the image. To use values from Tool Kit's environment (since we usually build Docker images on CircleCI, this would be the CI environment), you can use the `!toolkit/env` tag, e.g. `buildArgs: { GIT_COMMIT: !toolkit/env "GIT_COMMIT" }` | `Record<string, string>` | `{}` |
| `secrets` | <br /> An array of Docker [secrets](https://docs.docker.com/build/building/secrets/) to include when building the image.<br /> Each item in the array will add `--secret id=[id],src=[src]` to the docker build script. Docker can embed<br /> secret environment variables such as `NPM_TOKEN` (type: env) and secret files such as `.npmrc` (type: file)`.<br /> You can also include a secret environment variable by adding an item with just the environment name.<br /> | `Array<string _or_ _Object with properties:_<ul><li>id: string</li><li>type: 'file' \| 'env'</li><li>src: string</li></ul>>` | `[]` |

_All properties are optional._

Expand Down
4 changes: 2 additions & 2 deletions plugins/docker/src/tasks/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ const DockerBuildSchema = z
z.object({
id: z.string(),
type: z.union([z.literal('file'), z.literal('env')]).optional(),
source: z.string().optional()
src: z.string().optional()
})
])
)
.default([])
.describe(
`
An array of Docker [secrets](https://docs.docker.com/build/building/secrets/) to include when building the image.
Each item in the array will add \`--secret id=[id],source=[source]\` to the docker build script. Docker can embed
Each item in the array will add \`--secret id=[id],src=[src]\` to the docker build script. Docker can embed
secret environment variables such as \`NPM_TOKEN\` (type: env) and secret files such as \`.npmrc\` (type: file)\`.
You can also include a secret environment variable by adding an item with just the environment name.
`
Expand Down
Loading