|
|
|
|
@ -73,3 +73,62 @@ can be configured for this builder.
|
|
|
|
|
### Optional:
|
|
|
|
|
|
|
|
|
|
@include 'builder/yandex/Config-not-required.mdx'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Build template data
|
|
|
|
|
|
|
|
|
|
In configuration directives the following variables are available:
|
|
|
|
|
|
|
|
|
|
- `ImageID` - ID of the built image.
|
|
|
|
|
- `ImageName` - Name of the built image.
|
|
|
|
|
- `ImageFamily` - Family of the built image.
|
|
|
|
|
- `ImageDescription` - Description of the built image.
|
|
|
|
|
- `ImageFolderID` - Folder ID where the built image is stored.
|
|
|
|
|
- `SourceImageID` - The source image ID (for example `fd8fjtn3mj2kfe7h6f0r`) used to build the image.
|
|
|
|
|
- `SourceImageName` - The source image name (for example `ubuntu-1604-lts-1579200746`) used to build the image.
|
|
|
|
|
- `SourceImageDescription` - The source image description (for example `ubuntu 16.04 lts`).
|
|
|
|
|
- `SourceImageFamily` - The source image family (for example `ubuntu-1604-lts`).
|
|
|
|
|
- `SourceImageFolderID` - The folder ID where source image located (for example `standard-images`).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Build Shared Information Variables
|
|
|
|
|
|
|
|
|
|
This builder generates data that are shared with provisioner and post-processor via build function of
|
|
|
|
|
[template engine](/docs/templates/engine) for JSON and [contextual variables](/docs/from-1.5/contextual-variables)
|
|
|
|
|
for HCL2.
|
|
|
|
|
|
|
|
|
|
The generated variables available for this builder see above
|
|
|
|
|
|
|
|
|
|
Usage example:
|
|
|
|
|
|
|
|
|
|
<Tabs>
|
|
|
|
|
<Tab heading="JSON">
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
"post-processors": [
|
|
|
|
|
{
|
|
|
|
|
"type": "manifest",
|
|
|
|
|
"output": "manifest.json",
|
|
|
|
|
"strip_path": true,
|
|
|
|
|
"custom_data": {
|
|
|
|
|
"source_image_id": "{{ build `SourceImageID` }}"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</Tab>
|
|
|
|
|
<Tab heading="HCL2">
|
|
|
|
|
|
|
|
|
|
```hcl
|
|
|
|
|
post-processor "manifest" {
|
|
|
|
|
output = "manifest.json"
|
|
|
|
|
strip_path = true
|
|
|
|
|
custom_data = {
|
|
|
|
|
source_image_id = "${build.SourceImageID}"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</Tab>
|
|
|
|
|
</Tabs>
|
|
|
|
|
|