| { |
| "variables": { |
| "vpc_region": "eu-west-1", |
| "ssh_username": "ubuntu", |
| "git_hash": "", |
| "vpc_id": "{{env `VPC_ID`}}", |
| "subnet_id": "{{env `SUBNET_ID`}}" |
| }, |
| "builders": [ |
| { |
| "type": "amazon-ebs", |
| "name": "ubuntu-20.04-mbedtls", |
| "vpc_id": "{{user `vpc_id`}}", |
| "subnet_id": "{{user `subnet_id`}}", |
| "region": "{{user `vpc_region`}}", |
| "source_ami_filter": { |
| "filters": { |
| "virtualization-type": "hvm", |
| "name": "ubuntu/images/*ubuntu-focal-20.04-arm64-server-*", |
| "root-device-type": "ebs" |
| }, |
| "owners": ["099720109477"], |
| "most_recent": true |
| }, |
| "instance_type": "t4g.large", |
| "ssh_username": "{{user `ssh_username`}}", |
| "ami_name": "jenkins-aarch64-{{isotime \"2006-01-02-1504\"}}", |
| "ami_regions": ["eu-west-1" ], |
| "launch_block_device_mappings": [ |
| { |
| "device_name": "/dev/sda1", |
| "volume_type": "gp3", |
| "volume_size": "50", |
| "delete_on_termination": true |
| } |
| ], |
| "run_tags": { |
| "Name": "packer_builder" |
| } |
| } |
| ], |
| "provisioners": [ |
| { |
| "type": "shell", |
| "inline": [ "sleep 60" ] |
| }, |
| { |
| "type": "shell", |
| "script": "ubuntu.sh", |
| "execute_command": "{{.Vars}} sudo -E sh -eux '{{.Path}}'" |
| } |
| ] |
| } |