Skip to content

Commit

Permalink
Merge pull request #1700 from smerle33/pr/nopublish
Browse files Browse the repository at this point in the history
chore(publish): skip image/ami creation if not on production
  • Loading branch information
dduportal authored Jan 30, 2025
2 parents 1f70e7d + de88f0f commit 24d576c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sources.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This source defines all the common settings for any AWS AMI (whatever Operating System)
source "amazon-ebs" "base" {
skip_create_ami = var.build_type == "dev" ? true : false # skip ami creation on PRs and local developement
ami_name = "${local.image_name}-${var.architecture}-${local.now_unix_timestamp}"
instance_type = local.aws_instance_types[var.architecture]

Expand Down Expand Up @@ -44,7 +45,7 @@ source "amazon-ebs" "base" {
# This source defines all the common settings for any Azure image (whatever Operating System)
source "azure-arm" "base" {
managed_image_resource_group_name = local.azure_destination_resource_group

skip_create_image = var.build_type == "dev" ? true : false # skip ami creation on PRs and local developement
vm_size = local.azure_vm_size[var.architecture]

# network defined in https://github.com/jenkins-infra/azure-net/blob/a396b20f676602703c0dbdf4cee977eae2669cd7/vnets.tf#L535
Expand Down

0 comments on commit 24d576c

Please sign in to comment.