Add a simple Windows 2016 packer image
As far as I know right now this would not be viable as a Jenkins agent because it has none of the necessary JRE, Docker, or init script stuff. But at least it builds!
This commit is contained in:
parent
2a971c5f50
commit
874281e572
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
"builders": [{
|
||||
"type": "azure-arm",
|
||||
"subscription_id": "{{user `azure_subscription_id`}}",
|
||||
"client_id": "{{user `azure_client_id`}}",
|
||||
"client_secret": "{{user `azure_client_secret`}}",
|
||||
"tenant_id" : "{{user `azure_tenant_id`}}",
|
||||
"object_id" : "{{user `azure_object_id`}}",
|
||||
|
||||
"resource_group_name": "azureagents-for-codevalet",
|
||||
"storage_account": "codevaletimages",
|
||||
|
||||
"capture_container_name": "images",
|
||||
"capture_name_prefix": "packer",
|
||||
|
||||
"os_type": "Windows",
|
||||
"image_publisher": "MicrosoftWindowsServer",
|
||||
"image_offer": "WindowsServer",
|
||||
"image_sku": "2016-Datacenter",
|
||||
|
||||
"communicator": "winrm",
|
||||
"winrm_use_ssl": "true",
|
||||
"winrm_insecure": "true",
|
||||
"winrm_timeout": "3m",
|
||||
"winrm_username": "packer",
|
||||
|
||||
|
||||
"location": "West US",
|
||||
"vm_size": "Standard_DS2_v2"
|
||||
}],
|
||||
"provisioners": [{
|
||||
"type": "powershell",
|
||||
"inline": [
|
||||
"Add-WindowsFeature Web-Server",
|
||||
"if( Test-Path $Env:SystemRoot\\windows\\system32\\Sysprep\\unattend.xml ){ rm $Env:SystemRoot\\windows\\system32\\Sysprep\\unattend.xml -Force}",
|
||||
"& $Env:SystemRoot\\System32\\Sysprep\\Sysprep.exe /oobe /generalize /shutdown /quiet"
|
||||
]
|
||||
}]
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
description: 'Azure-based Windows 2016 machine'
|
||||
size: 'Standard_DS4_v2'
|
||||
labels:
|
||||
- 'windows'
|
||||
- 'windows2016'
|
||||
executors: 1
|
||||
retention: 10
|
||||
image:
|
||||
vhd: 'https://codevaletimages.blob.core.windows.net/system/Microsoft.Compute/Images/images/packer-osDisk.d80e15cb-b63d-45e6-91bd-6b7d3f5968f4.vhd'
|
Loading…
Reference in New Issue