Install and execute packer as part of your build & release pipelines.
22-01-2020
- PackerTool: version optional, download latest version when not specified
02-02-2019
- Download
386
version on aia32
architecture system- Default version for packer tool updated:
1.3.4
(should auto resolve that sometime)18-01-2019
- Output variable for
DeploymentName
(so you can cleanup resources when Packer fails to do so).- Default version for packer tool updated:
1.3.3
03-12-2018
- Packer@V1 out of preview
- Disable color for
packer build
by default with-color=false
switch- Default version for packer tool updated:
1.3.2
23-10-2018
- Support for AWS in V1-peview.
- Default version for packer tool updated:
1.3.1
21-08-2018
- Added additional output variables for
OSDiskUriReadOnlySas
,TemplateUri
andTemplateUriReadOnlySas
(when building VHD's)- Write variables as output so they're also available in YAML builds.
24-07-2018
- Write the capture url of the VHD to the
OSDiskUri
output variable so it is accessible for downstream tasks.
Downloads & installs specified version of packer and adds it to the tool cache.
Execute packer commands. By selecting your Azure or AWS service connection, the authorization and values are resolved from that and provided as variables to your packer template.
Azure required variables:
data | variable name |
---|---|
service principal id | client_id |
serivice principal key | client_secret |
subscription id | subscription_id |
tenant id | tenant_id |
AWS required variables:
data | variable name |
---|---|
Access Key ID | access_key |
Secret Access Key | secret_key |
Note: The variable name is (currently) static and the template must therefor use this provided name. Luckily this matches the required input for the respective builders.
resources:
- repo: self
steps:
- task: riezebosch.Packer.PackerTool.PackerTool@0
- task: Packer@1
displayName: 'Packer build'
inputs:
connectedServiceType: azure #azure|aws|none
connectedServiceAzure: 'My Subscription'
#connectedServiceAWS: 'aws demo'
templatePath: linux.json
#force: true|false Force a build to continue if artifacts exist, deletes existing artifacts
variables: |+
resource_group=$(resource-group)
managed_image_name=small-linux
storage_account=$(storage-account)
#variables-file: JSON file containing user variables.
#options: Additional options, see Packer Commands (CLI) for more information.
See Packer Commands (CLI) for more information.
- OSDiskUri
- OSDiskUriReadOnlySas
- TemplateUri
- TemplateUriReadOnlySas
- DeploymentName