Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:

# Parse build options.
if [ "$ONLY_BUILDERS" = "all" ]; then
ONLY_BUILDERS=""
ONLY_BUILDERS="-except=googlecompute.ubuntu-20,googlecompute.ubuntu-22"
elif [ -n "$ONLY_BUILDERS" ]; then
ONLY_BUILDERS="-only=$ONLY_BUILDERS"
fi
Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:

# Parse build options.
if [ "$ONLY_BUILDERS" = "all" ]; then
ONLY_BUILDERS="-except=amazon-ebs.ubuntu-18,googlecompute.ubuntu-20,googlecompute.ubuntu-22"
ONLY_BUILDERS="-except=googlecompute.ubuntu-20,googlecompute.ubuntu-22"
elif [ -n "$ONLY_BUILDERS" ]; then
ONLY_BUILDERS="-only=$ONLY_BUILDERS"
fi
Expand Down
58 changes: 0 additions & 58 deletions packer/aws.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -32,64 +32,6 @@ locals {
]
}

source "amazon-ebs" "ubuntu-18" {
ami_name = "${local.image_family}-ubuntu18-${local.image_version}"
ami_description = "${local.image_description} (ubuntu18)"
instance_type = var.aws_instance_type
region = var.aws_region
vpc_id = var.aws_vpc_id
subnet_id = var.aws_subnet_id
security_group_id = var.aws_security_group_id
iam_instance_profile = var.aws_iam_instance_profile
associate_public_ip_address = true

temporary_key_pair_type = var.temporary_key_pair_type
ssh_username = "ubuntu"
ssh_interface = "session_manager"

source_ami_filter {
filters = {
name = "ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-*"
root-device-type = "ebs"
virtualization-type = "hvm"
}
most_recent = true
owners = local.ubuntu_owners
}

# Build a public AMI
encrypt_boot = false
ami_groups = local.is_public ? ["all"] : []
ami_regions = [for region in local.ami_regions: region if region != var.aws_region]

# Customize the volumes
launch_block_device_mappings {
device_name = "/dev/sda1"
encrypted = false
volume_size = 35
volume_type = "gp3"
delete_on_termination = true
}

# Source instance tags.
run_tags = {
Name = "Packer Builder: ${local.image_family}-ubuntu18-${local.image_version}"
Creator = "Packer"
}
run_volume_tags = {
Creator = "Packer"
}

# Target AMI tags.
tags = {
Name = "${local.image_family}-ubuntu18-${local.image_version}"
Creator = "Packer"
}
snapshot_tags = {
Creator = "Packer"
}
}

source "amazon-ebs" "ubuntu-20" {
ami_name = "${local.image_family}-ubuntu20-${local.image_version}"
ami_description = "${local.image_description} (ubuntu20)"
Expand Down
15 changes: 2 additions & 13 deletions packer/main.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ locals {

build {
sources = [
"sources.amazon-ebs.ubuntu-18",
"sources.amazon-ebs.ubuntu-20",
"sources.amazon-ebs.ubuntu-22",
"sources.amazon-ebs.ubuntu-20-arm64",
Expand Down Expand Up @@ -48,7 +47,7 @@ build {
]
environment_vars = [ "DEBIAN_FRONTEND=noninteractive" ]
only = [
"amazon-ebs.ubuntu-18", "amazon-ebs.ubuntu-20", "amazon-ebs.ubuntu-22",
"amazon-ebs.ubuntu-20", "amazon-ebs.ubuntu-22",
"amazon-ebs.ubuntu-20-arm64", "amazon-ebs.ubuntu-22-arm64",
"googlecompute.ubuntu-20", "googlecompute.ubuntu-22"
]
Expand All @@ -66,16 +65,6 @@ build {
]
}

// Install - Ubuntu 18
provisioner "shell" {
script = "${path.root}/../Agent/Setup_16.04.sh"
environment_vars = [
"DOWNLOAD_REF=${var.agent_git_ref}",
"DEBIAN_FRONTEND=noninteractive"
]
only = [ "amazon-ebs.ubuntu-18" ]
}

// Install - Ubuntu 20
provisioner "shell" {
script = "${path.root}/../AgentUbuntu20/Setup.sh"
Expand Down Expand Up @@ -113,7 +102,7 @@ build {
"sudo rm -rf /home/ubuntu/.history /home/ubuntu/authorized_keys", // user history and SSH authorized keys
]
only = [
"amazon-ebs.ubuntu-18", "amazon-ebs.ubuntu-20", "amazon-ebs.ubuntu-22",
"amazon-ebs.ubuntu-20", "amazon-ebs.ubuntu-22",
"amazon-ebs.ubuntu-20-arm64", "amazon-ebs.ubuntu-22-arm64",
"googlecompute.ubuntu-20", "googlecompute.ubuntu-22"
]
Expand Down