packer: don't save the AMIs on PRs
This should save us a ton of resources as we don't use AMIs from PRs. Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
parent
ad15179faf
commit
72de1b3bbe
3 changed files with 15 additions and 0 deletions
|
|
@ -18,6 +18,12 @@ variable "region" {
|
|||
# Automatically set by environment variables
|
||||
variable "composer_commit" { type = string }
|
||||
|
||||
# Controls whether AMIs should be created. If you just need to test whether the image can be built, leave it as true
|
||||
variable "skip_create_ami" {
|
||||
type = bool
|
||||
default = true
|
||||
}
|
||||
|
||||
# The name of the resulting AMI and the underlying EBS snapshot
|
||||
variable "image_name" { type = string }
|
||||
# A list of users to share the AMI with
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ source "amazon-ebs" "image_builder" {
|
|||
# Network configuration for the instance building our image.
|
||||
associate_public_ip_address = true
|
||||
ssh_interface = "public_ip"
|
||||
|
||||
skip_create_ami=var.skip_create_ami
|
||||
}
|
||||
|
||||
build {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue