bake: add annotations field

Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
Justin Chadwell
2023-08-24 14:15:25 +01:00
parent a59058e8a5
commit 0138f2a00f
3 changed files with 66 additions and 0 deletions

View File

@@ -115,6 +115,7 @@ The following table shows the complete list of attributes that you can assign to
| Name | Type | Description |
| ----------------------------------------------- | ------- | -------------------------------------------------------------------- |
| [`args`](#targetargs) | Map | Build arguments |
| [`annotations`](#targetannotations) | List | Exporter annotations |
| [`attest`](#targetattest) | List | Build attestations |
| [`cache-from`](#targetcache-from) | List | External cache sources |
| [`cache-to`](#targetcache-to) | List | External cache destinations |
@@ -171,6 +172,26 @@ target "db" {
}
```
### `target.annotations`
The `annotations` attribute is a shortcut to allow you to easily set a list of
annotations on the target.
```hcl
target "default" {
output = ["type=image,name=foo"]
annotations = ["key=value"]
}
```
is the same as
```hcl
target "default" {
output = ["type=image,name=foo,annotation.key=value"]
}
```
### `target.attest`
The `attest` attribute lets you apply [build attestations][attestations] to the target.