LizaTretyakova-zz / packer-post-processor-teamcity

Mozilla Public License 2.0
1 stars 0 forks source link

Builder produces multiple AMIs #4

Open mkuzmin opened 7 years ago

mkuzmin commented 7 years ago

Sample configuration where ami_regions causes producing multiple AMIs in a single builder:

{
  "builders": [
    {
      "name": "aws1",
      "type": "amazon-ebs",
      "access_key": "{{user `aws_access_key`}}",
      "secret_key": "{{user `aws_secret_key`}}",
      "region": "us-east-2",
      "source_ami": "ami-38f5d15d",
      "instance_type": "t2.micro",
      "ssh_username": "ubuntu",
      "ami_name": "1 {{timestamp}}",
      "ami_regions": "eu-central-1"
    }
  ],
  "post-processors": [
    "teamcity"
  ]
}

output:

==> aws1: Running post-processor: teamcity
    aws1 (teamcity): ##teamcity[setParameter name='packer.artifact.aws.region' value='eu-central-1']
    aws1 (teamcity): ##teamcity[setParameter name='packer.artifact.aws.ami' value='ami-8fee3de0']
    aws1 (teamcity): ##teamcity[setParameter name='packer.artifact.aws.ami' value='us-east-2']
Build 'aws1' finished.

Like in #3, A parameter with the same name is reported twice.

mkuzmin commented 7 years ago

I think we can revert related code, and wait till real customer requests.