2017-07-19 23:13:59 -04:00
|
|
|
{
|
|
|
|
"variables": {
|
|
|
|
"access_key": "{{env `ALICLOUD_ACCESS_KEY`}}",
|
|
|
|
"secret_key": "{{env `ALICLOUD_SECRET_KEY`}}"
|
|
|
|
},
|
|
|
|
"builders": [{
|
|
|
|
"type":"alicloud-ecs",
|
|
|
|
"access_key":"{{user `access_key`}}",
|
|
|
|
"secret_key":"{{user `secret_key`}}",
|
|
|
|
"region":"cn-beijing",
|
|
|
|
"image_name":"packer_jenkins",
|
2019-03-05 03:14:59 -05:00
|
|
|
"source_image":"ubuntu_18_04_64_20G_alibase_20190223.vhd",
|
2017-07-19 23:13:59 -04:00
|
|
|
"ssh_username":"root",
|
|
|
|
"instance_type":"ecs.n1.medium",
|
|
|
|
"io_optimized":"true",
|
2017-08-03 21:56:04 -04:00
|
|
|
"internet_charge_type":"PayByTraffic",
|
2017-07-19 23:13:59 -04:00
|
|
|
"image_force_delete":"true",
|
|
|
|
"ssh_password":"Test12345"
|
|
|
|
}],
|
|
|
|
"provisioners": [{
|
|
|
|
"type": "file",
|
|
|
|
"source": "examples/alicloud/jenkins/jenkins.sh",
|
|
|
|
"destination": "/root/"
|
|
|
|
},{
|
|
|
|
"type": "shell",
|
|
|
|
"inline": [
|
|
|
|
"cd /root/",
|
|
|
|
"chmod 755 jenkins.sh",
|
|
|
|
"./jenkins.sh"
|
|
|
|
]
|
|
|
|
}]
|
|
|
|
}
|