blob: e96446d656bf4250f3762f015b8e00bce8f7133b [file] [log] [blame]
Kelley Spoonc2f86f52022-11-17 07:28:36 -06001{
2 "variables": {
Saheer Babu5013e9d2025-02-05 12:04:59 +00003 "vpc_region": "eu-west-1",
4 "ssh_username": "ubuntu",
5 "vpc_id": "{{env `VPC_ID`}}",
6 "subnet_id": "{{env `SUBNET_ID`}}"
Kelley Spoonc2f86f52022-11-17 07:28:36 -06007 },
8 "builders": [
9 {
10 "type": "amazon-ebs",
11 "name": "ubuntu-20.04-custom",
Saheer Babu5013e9d2025-02-05 12:04:59 +000012 "vpc_id": "{{user `vpc_id`}}",
13 "subnet_id": "{{user `subnet_id`}}",
Kelley Spoonc2f86f52022-11-17 07:28:36 -060014 "region": "{{user `vpc_region`}}",
15 "source_ami_filter": {
16 "filters": {
17 "virtualization-type": "hvm",
18 "name": "ubuntu/images/*ubuntu-focal-20.04-amd64-server-*",
19 "root-device-type": "ebs"
20 },
21 "owners": ["099720109477"],
22 "most_recent": true
23 },
24 "instance_type": "m5a.large",
25 "ssh_username": "{{user `ssh_username`}}",
26 "ami_name": "jenkins-custom-amd64-{{isotime \"2006-01-02-1504\"}}",
Saheer Babu5013e9d2025-02-05 12:04:59 +000027 "ami_regions": ["eu-west-1" ],
Kelley Spoonc2f86f52022-11-17 07:28:36 -060028 "launch_block_device_mappings": [
29 {
30 "device_name": "/dev/sda1",
31 "volume_type": "gp2",
Saheer Babu5013e9d2025-02-05 12:04:59 +000032 "volume_size": "80",
Kelley Spoonc2f86f52022-11-17 07:28:36 -060033 "delete_on_termination": true
34 }
Saheer Babu5013e9d2025-02-05 12:04:59 +000035 ],
36 "run_tags": {
37 "Name": "packer_builder"
38 }
Kelley Spoonc2f86f52022-11-17 07:28:36 -060039 }
40 ],
41 "provisioners": [
42 {
43 "type": "shell",
44 "inline": [ "sleep 60" ]
45 },
46 {
47 "type": "shell",
48 "script": "custom.sh",
49 "execute_command": "{{.Vars}} sudo -E sh -eux '{{.Path}}'"
50 }
51 ]
52}