From 21841bf4381558a898b440e77fe1d20149d142c5 Mon Sep 17 00:00:00 2001 From: jeeva-duplo <50436466+jeeva-duplo@users.noreply.github.com> Date: Fri, 6 Jun 2025 23:33:38 +0530 Subject: [PATCH 1/3] skipping GCP build --- .github/workflows/build-image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-image.yaml b/.github/workflows/build-image.yaml index 72e5c9c..7001d67 100644 --- a/.github/workflows/build-image.yaml +++ b/.github/workflows/build-image.yaml @@ -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 From 0f8bf914b7afa4b2e8fcf9a51e33d4ab7c3d76ca Mon Sep 17 00:00:00 2001 From: jeeva-duplo <50436466+jeeva-duplo@users.noreply.github.com> Date: Sun, 8 Jun 2025 14:16:57 +0530 Subject: [PATCH 2/3] Skipping ubuntu18 in commercial also --- .github/workflows/build-image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-image.yaml b/.github/workflows/build-image.yaml index 7001d67..7af1374 100644 --- a/.github/workflows/build-image.yaml +++ b/.github/workflows/build-image.yaml @@ -73,7 +73,7 @@ jobs: # Parse build options. if [ "$ONLY_BUILDERS" = "all" ]; then - ONLY_BUILDERS="-except=googlecompute.ubuntu-20,googlecompute.ubuntu-22" + ONLY_BUILDERS="-except=amazon-ebs.ubuntu-18,googlecompute.ubuntu-20,googlecompute.ubuntu-22" elif [ -n "$ONLY_BUILDERS" ]; then ONLY_BUILDERS="-only=$ONLY_BUILDERS" fi From f5b9ebc0f97f81fe36cc973aea23739c773dcc8c Mon Sep 17 00:00:00 2001 From: jeeva-duplo <50436466+jeeva-duplo@users.noreply.github.com> Date: Sun, 8 Jun 2025 15:20:13 +0530 Subject: [PATCH 3/3] Removing ubuntu 18 as it got deprecated --- .github/workflows/build-image.yaml | 4 +-- packer/aws.pkr.hcl | 58 ------------------------------ packer/main.pkr.hcl | 15 ++------ 3 files changed, 4 insertions(+), 73 deletions(-) diff --git a/.github/workflows/build-image.yaml b/.github/workflows/build-image.yaml index 7af1374..389f36e 100644 --- a/.github/workflows/build-image.yaml +++ b/.github/workflows/build-image.yaml @@ -73,7 +73,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 @@ -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 diff --git a/packer/aws.pkr.hcl b/packer/aws.pkr.hcl index c299b18..a6ee3d7 100644 --- a/packer/aws.pkr.hcl +++ b/packer/aws.pkr.hcl @@ -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)" diff --git a/packer/main.pkr.hcl b/packer/main.pkr.hcl index 8e23de9..07e0ef2 100644 --- a/packer/main.pkr.hcl +++ b/packer/main.pkr.hcl @@ -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", @@ -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" ] @@ -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" @@ -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" ]