2019-11-15 15:23:41 -05:00
|
|
|
{
|
|
|
|
|
"variables": {
|
|
|
|
|
"client_id": "{{env `ARM_CLIENT_ID`}}",
|
|
|
|
|
"client_secret": "{{env `ARM_CLIENT_SECRET`}}",
|
2022-05-20 12:51:55 +02:00
|
|
|
"client_cert_path": "{{env `ARM_CLIENT_CERT_PATH`}}",
|
2019-11-15 15:23:41 -05:00
|
|
|
"subscription_id": "{{env `ARM_SUBSCRIPTION_ID`}}",
|
|
|
|
|
"tenant_id": "{{env `ARM_TENANT_ID`}}",
|
|
|
|
|
"object_id": "{{env `ARM_OBJECT_ID`}}",
|
2023-08-31 16:21:15 +02:00
|
|
|
"managed_image_resource_group_name": "{{env `ARM_RESOURCE_GROUP`}}",
|
2023-09-18 16:01:58 +02:00
|
|
|
"managed_image_storage_account_type": "Premium_LRS",
|
2021-05-13 10:19:34 +03:00
|
|
|
"build_resource_group_name": "{{env `BUILD_RESOURCE_GROUP_NAME`}}",
|
2019-11-15 15:23:41 -05:00
|
|
|
"temp_resource_group_name": "{{env `TEMP_RESOURCE_GROUP_NAME`}}",
|
|
|
|
|
"location": "{{env `ARM_RESOURCE_LOCATION`}}",
|
|
|
|
|
"virtual_network_name": "{{env `VNET_NAME`}}",
|
|
|
|
|
"virtual_network_resource_group_name": "{{env `VNET_RESOURCE_GROUP`}}",
|
|
|
|
|
"virtual_network_subnet_name": "{{env `VNET_SUBNET`}}",
|
|
|
|
|
"private_virtual_network_with_public_ip": "{{env `PRIVATE_VIRTUAL_NETWORK_WITH_PUBLIC_IP`}}",
|
2021-05-04 20:39:55 +12:00
|
|
|
"allowed_inbound_ip_addresses": "{{env `AGENT_IP`}}",
|
2023-09-18 16:01:58 +02:00
|
|
|
"vm_size": "Standard_F8s_v2",
|
2019-11-15 15:23:41 -05:00
|
|
|
"image_folder": "C:\\image",
|
2020-03-08 17:41:55 +03:00
|
|
|
"imagedata_file": "C:\\imagedata.json",
|
2019-11-15 15:23:41 -05:00
|
|
|
"helper_script_folder": "C:\\Program Files\\WindowsPowerShell\\Modules\\",
|
2021-02-09 08:41:06 -05:00
|
|
|
"agent_tools_directory": "C:\\hostedtoolcache\\windows",
|
2019-11-15 15:23:41 -05:00
|
|
|
"install_user": "installer",
|
|
|
|
|
"install_password": null,
|
2023-08-31 16:21:15 +02:00
|
|
|
"managed_image_name": "packer-win19-dev",
|
2019-12-30 11:40:10 +03:00
|
|
|
"image_version": "dev",
|
2020-11-18 12:40:07 +03:00
|
|
|
"image_os": "win19"
|
2019-11-15 15:23:41 -05:00
|
|
|
},
|
2020-09-21 13:24:05 -05:00
|
|
|
"sensitive-variables": [
|
|
|
|
|
"install_password",
|
2020-11-12 20:09:32 +03:00
|
|
|
"client_secret"
|
2020-09-21 13:24:05 -05:00
|
|
|
],
|
2019-11-15 15:23:41 -05:00
|
|
|
"builders": [
|
|
|
|
|
{
|
2023-08-31 16:21:15 +02:00
|
|
|
"name": "image",
|
2019-11-15 15:23:41 -05:00
|
|
|
"type": "azure-arm",
|
|
|
|
|
"client_id": "{{user `client_id`}}",
|
|
|
|
|
"client_secret": "{{user `client_secret`}}",
|
2022-05-20 12:51:55 +02:00
|
|
|
"client_cert_path": "{{user `client_cert_path`}}",
|
2019-11-15 15:23:41 -05:00
|
|
|
"subscription_id": "{{user `subscription_id`}}",
|
|
|
|
|
"object_id": "{{user `object_id`}}",
|
|
|
|
|
"tenant_id": "{{user `tenant_id`}}",
|
2020-01-22 16:14:54 -05:00
|
|
|
"os_disk_size_gb": "256",
|
2019-11-15 15:23:41 -05:00
|
|
|
"location": "{{user `location`}}",
|
|
|
|
|
"vm_size": "{{user `vm_size`}}",
|
2023-08-31 16:21:15 +02:00
|
|
|
"managed_image_name": "{{user `managed_image_name`}}",
|
|
|
|
|
"managed_image_resource_group_name": "{{user `managed_image_resource_group_name`}}",
|
2023-09-18 16:01:58 +02:00
|
|
|
"managed_image_storage_account_type": "{{user `managed_image_storage_account_type`}}",
|
2021-05-13 10:19:34 +03:00
|
|
|
"build_resource_group_name": "{{user `build_resource_group_name`}}",
|
2019-11-15 15:23:41 -05:00
|
|
|
"temp_resource_group_name": "{{user `temp_resource_group_name`}}",
|
|
|
|
|
"virtual_network_name": "{{user `virtual_network_name`}}",
|
|
|
|
|
"virtual_network_resource_group_name": "{{user `virtual_network_resource_group_name`}}",
|
|
|
|
|
"virtual_network_subnet_name": "{{user `virtual_network_subnet_name`}}",
|
|
|
|
|
"private_virtual_network_with_public_ip": "{{user `private_virtual_network_with_public_ip`}}",
|
2021-05-04 20:39:55 +12:00
|
|
|
"allowed_inbound_ip_addresses": "{{user `allowed_inbound_ip_addresses`}}",
|
2019-11-15 15:23:41 -05:00
|
|
|
"os_type": "Windows",
|
|
|
|
|
"image_publisher": "MicrosoftWindowsServer",
|
|
|
|
|
"image_offer": "WindowsServer",
|
|
|
|
|
"image_sku": "2019-Datacenter",
|
|
|
|
|
"communicator": "winrm",
|
|
|
|
|
"winrm_use_ssl": "true",
|
|
|
|
|
"winrm_insecure": "true",
|
|
|
|
|
"winrm_username": "packer"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"provisioners": [
|
|
|
|
|
{
|
|
|
|
|
"type": "powershell",
|
2020-09-21 13:24:05 -05:00
|
|
|
"inline": [
|
2020-08-24 12:31:51 +03:00
|
|
|
"New-Item -Path {{user `image_folder`}} -ItemType Directory -Force"
|
2019-11-15 15:23:41 -05:00
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "file",
|
|
|
|
|
"source": "{{ template_dir }}/scripts/ImageHelpers",
|
|
|
|
|
"destination": "{{user `helper_script_folder`}}"
|
|
|
|
|
},
|
2020-06-02 06:32:23 +00:00
|
|
|
{
|
|
|
|
|
"type": "file",
|
|
|
|
|
"source": "{{ template_dir }}/scripts/SoftwareReport",
|
|
|
|
|
"destination": "{{user `image_folder`}}"
|
|
|
|
|
},
|
2022-12-30 10:24:22 +01:00
|
|
|
{
|
|
|
|
|
"type": "file",
|
|
|
|
|
"source": "{{ template_dir }}/../../helpers/software-report-base",
|
|
|
|
|
"destination": "{{user `image_folder`}}/SoftwareReport/"
|
|
|
|
|
},
|
2020-07-09 10:53:29 +03:00
|
|
|
{
|
|
|
|
|
"type": "file",
|
2020-10-01 11:52:39 +03:00
|
|
|
"source": "{{ template_dir }}/post-generation",
|
2020-10-16 15:34:35 +07:00
|
|
|
"destination": "C:/"
|
2020-06-02 06:32:23 +00:00
|
|
|
},
|
2020-07-09 10:53:29 +03:00
|
|
|
{
|
|
|
|
|
"type": "file",
|
|
|
|
|
"source": "{{ template_dir }}/scripts/Tests",
|
|
|
|
|
"destination": "{{user `image_folder`}}"
|
|
|
|
|
},
|
2020-07-22 14:04:40 +03:00
|
|
|
{
|
|
|
|
|
"type": "file",
|
|
|
|
|
"source": "{{template_dir}}/toolsets/toolset-2019.json",
|
2021-08-03 11:56:52 +03:00
|
|
|
"destination": "{{user `image_folder`}}\\toolset.json"
|
2020-07-22 14:04:40 +03:00
|
|
|
},
|
2019-11-15 15:23:41 -05:00
|
|
|
{
|
|
|
|
|
"type": "windows-shell",
|
|
|
|
|
"inline": [
|
2020-09-21 13:24:05 -05:00
|
|
|
"net user {{user `install_user`}} {{user `install_password`}} /add /passwordchg:no /passwordreq:yes /active:yes /Y",
|
2019-11-15 15:23:41 -05:00
|
|
|
"net localgroup Administrators {{user `install_user`}} /add",
|
|
|
|
|
"winrm set winrm/config/service/auth @{Basic=\"true\"}",
|
|
|
|
|
"winrm get winrm/config/service/auth"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "powershell",
|
|
|
|
|
"inline": [
|
|
|
|
|
"if (-not ((net localgroup Administrators) -contains '{{user `install_user`}}')) { exit 1 }"
|
|
|
|
|
]
|
|
|
|
|
},
|
2021-10-19 12:58:41 +03:00
|
|
|
{
|
|
|
|
|
"type": "powershell",
|
|
|
|
|
"inline": [
|
|
|
|
|
"bcdedit.exe /set TESTSIGNING ON"
|
|
|
|
|
],
|
|
|
|
|
"elevated_user": "{{user `install_user`}}",
|
|
|
|
|
"elevated_password": "{{user `install_password`}}"
|
|
|
|
|
},
|
2023-06-01 17:55:44 +02:00
|
|
|
{
|
|
|
|
|
"type": "powershell",
|
|
|
|
|
"valid_exit_codes": [
|
|
|
|
|
0,
|
|
|
|
|
3010
|
|
|
|
|
],
|
|
|
|
|
"scripts": [
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-NET48.ps1"
|
|
|
|
|
],
|
|
|
|
|
"elevated_user": "{{user `install_user`}}",
|
|
|
|
|
"elevated_password": "{{user `install_password`}}"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "windows-restart",
|
|
|
|
|
"restart_timeout": "10m"
|
|
|
|
|
},
|
2019-11-15 15:23:41 -05:00
|
|
|
{
|
|
|
|
|
"type": "powershell",
|
|
|
|
|
"environment_vars": [
|
2021-01-27 10:12:48 +00:00
|
|
|
"IMAGE_VERSION={{user `image_version`}}",
|
|
|
|
|
"IMAGE_OS={{user `image_os`}}",
|
2021-02-09 08:41:06 -05:00
|
|
|
"AGENT_TOOLSDIRECTORY={{user `agent_tools_directory`}}",
|
2023-10-12 04:43:41 -04:00
|
|
|
"ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE=C:\\actionarchivecache\\",
|
2021-08-03 11:56:52 +03:00
|
|
|
"IMAGEDATA_FILE={{user `imagedata_file`}}"
|
2019-11-15 15:23:41 -05:00
|
|
|
],
|
2020-09-21 13:24:05 -05:00
|
|
|
"scripts": [
|
2021-07-29 10:46:27 +03:00
|
|
|
"{{ template_dir }}/scripts/Installers/Configure-Antivirus.ps1",
|
2023-10-06 12:03:28 +02:00
|
|
|
"{{ template_dir }}/scripts/Installers/Configure-PowerShell.ps1",
|
2020-07-23 16:32:41 +03:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-PowerShellModules.ps1",
|
2021-07-29 10:46:27 +03:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-WindowsFeatures.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Choco.ps1",
|
2021-08-03 11:56:52 +03:00
|
|
|
"{{ template_dir }}/scripts/Installers/Initialize-VM.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Update-ImageData.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Update-DotnetTLS.ps1"
|
2020-03-19 16:20:32 +01:00
|
|
|
],
|
|
|
|
|
"execution_policy": "unrestricted"
|
2019-11-15 15:23:41 -05:00
|
|
|
},
|
2021-09-08 13:30:30 +03:00
|
|
|
{
|
|
|
|
|
"type": "windows-restart",
|
|
|
|
|
"restart_timeout": "30m"
|
|
|
|
|
},
|
2021-08-27 17:44:45 +03:00
|
|
|
{
|
|
|
|
|
"type": "powershell",
|
2020-09-21 13:24:05 -05:00
|
|
|
"scripts": [
|
2021-07-29 10:46:27 +03:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-VCRedist.ps1",
|
2020-08-12 17:45:17 +07:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Docker.ps1",
|
2023-11-06 19:40:33 +01:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Docker-WinCred.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Docker-Compose.ps1",
|
2021-08-03 11:56:52 +03:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-PowershellCore.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-WebPlatformInstaller.ps1"
|
2019-11-15 15:23:41 -05:00
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "windows-restart",
|
|
|
|
|
"restart_timeout": "10m"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "powershell",
|
|
|
|
|
"valid_exit_codes": [
|
|
|
|
|
0,
|
|
|
|
|
3010
|
|
|
|
|
],
|
2020-09-21 13:24:05 -05:00
|
|
|
"scripts": [
|
2020-08-12 17:45:17 +07:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-VS.ps1",
|
2021-08-04 22:35:44 +03:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-KubernetesTools.ps1",
|
2023-06-01 17:55:44 +02:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-NET48-devpack.ps1"
|
2019-11-15 15:23:41 -05:00
|
|
|
],
|
|
|
|
|
"elevated_user": "{{user `install_user`}}",
|
|
|
|
|
"elevated_password": "{{user `install_password`}}"
|
|
|
|
|
},
|
2020-06-15 20:10:54 +03:00
|
|
|
{
|
|
|
|
|
"type": "powershell",
|
2020-09-21 13:24:05 -05:00
|
|
|
"scripts": [
|
2020-08-12 17:45:17 +07:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Wix.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-WDK.ps1",
|
2020-09-11 15:05:02 +04:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Vsix.ps1",
|
2020-08-12 17:45:17 +07:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-AzureCli.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-AzureDevOpsCli.ps1",
|
2021-07-08 06:23:07 -07:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-CommonUtils.ps1",
|
2021-09-16 11:35:11 +03:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-JavaTools.ps1",
|
2023-03-28 10:42:14 +02:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Kotlin.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-OpenSSL.ps1"
|
2020-02-17 14:19:30 +03:00
|
|
|
]
|
|
|
|
|
},
|
2019-11-15 15:23:41 -05:00
|
|
|
{
|
|
|
|
|
"type": "powershell",
|
2020-09-21 13:24:05 -05:00
|
|
|
"scripts": [
|
2019-11-15 15:23:41 -05:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-ServiceFabricSDK.ps1"
|
2020-03-26 16:20:08 +01:00
|
|
|
],
|
|
|
|
|
"execution_policy": "remotesigned"
|
2019-11-15 15:23:41 -05:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "windows-restart",
|
|
|
|
|
"restart_timeout": "10m"
|
|
|
|
|
},
|
2020-08-12 17:45:17 +07:00
|
|
|
{
|
|
|
|
|
"type": "windows-shell",
|
2020-09-21 13:24:05 -05:00
|
|
|
"inline": [
|
|
|
|
|
"wmic product where \"name like '%%microsoft azure powershell%%'\" call uninstall /nointeractive"
|
|
|
|
|
]
|
2020-08-12 17:45:17 +07:00
|
|
|
},
|
2020-05-18 11:08:06 +03:00
|
|
|
{
|
|
|
|
|
"type": "powershell",
|
2020-09-21 13:24:05 -05:00
|
|
|
"scripts": [
|
2023-10-12 04:43:41 -04:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-ActionArchiveCache.ps1",
|
2020-11-13 10:25:05 +03:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Ruby.ps1",
|
2020-07-16 07:30:34 +03:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-PyPy.ps1",
|
2020-06-30 07:48:55 +03:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Toolset.ps1",
|
2020-07-30 17:25:02 +03:00
|
|
|
"{{ template_dir }}/scripts/Installers/Configure-Toolset.ps1",
|
2022-05-31 01:24:33 +02:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-NodeLts.ps1",
|
2021-07-07 15:16:35 +03:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-AndroidSDK.ps1",
|
2020-10-21 08:44:06 +03:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-AzureModules.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Pipx.ps1",
|
2021-08-03 11:56:52 +03:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-PipxPackages.ps1",
|
2020-08-12 17:45:17 +07:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Git.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-GitHub-CLI.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-PHP.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Rust.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Sbt.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Chrome.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Edge.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Firefox.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Selenium.ps1",
|
2021-02-01 06:03:49 -08:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-IEWebDriver.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Apache.ps1",
|
2021-08-03 11:56:52 +03:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Nginx.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Msys2.ps1",
|
2020-08-12 17:45:17 +07:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-WinAppDriver.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-R.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-AWS.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-DACFx.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-MysqlCli.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-SQLPowerShellTools.ps1",
|
2022-01-20 15:59:37 +03:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-SQLOLEDBDriver.ps1",
|
2020-08-12 17:45:17 +07:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-DotnetSDK.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Mingw64.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Haskell.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Stack.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Miniconda.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-AzureCosmosDbEmulator.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Mercurial.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Zstd.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-NSIS.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-CloudFoundryCli.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Vcpkg.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-PostgreSQL.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-Bazel.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-AliyunCli.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-RootCA.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-MongoDB.ps1",
|
2023-09-20 16:32:41 +02:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-GoogleCloudCLI.ps1",
|
2021-08-03 11:56:52 +03:00
|
|
|
"{{ template_dir }}/scripts/Installers/Install-CodeQLBundle.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-BizTalkBuildComponent.ps1",
|
2021-08-27 17:44:45 +03:00
|
|
|
"{{ template_dir }}/scripts/Installers/Disable-JITDebugger.ps1",
|
2021-01-15 13:42:37 +03:00
|
|
|
"{{ template_dir }}/scripts/Installers/Configure-DynamicPort.ps1",
|
2021-02-24 18:48:49 +03:00
|
|
|
"{{ template_dir }}/scripts/Installers/Configure-GDIProcessHandleQuota.ps1",
|
2021-08-04 22:35:44 +03:00
|
|
|
"{{ template_dir }}/scripts/Installers/Configure-Shell.ps1",
|
2021-11-15 12:54:35 +03:00
|
|
|
"{{ template_dir }}/scripts/Installers/Enable-DeveloperMode.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-LLVM.ps1"
|
2021-08-27 17:44:45 +03:00
|
|
|
]
|
2020-06-22 01:25:04 -07:00
|
|
|
},
|
2021-11-16 17:14:17 +03:00
|
|
|
{
|
|
|
|
|
"type": "powershell",
|
|
|
|
|
"scripts": [
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Install-WindowsUpdates.ps1"
|
|
|
|
|
],
|
|
|
|
|
"elevated_user": "{{user `install_user`}}",
|
|
|
|
|
"elevated_password": "{{user `install_password`}}"
|
|
|
|
|
},
|
2020-06-22 01:25:04 -07:00
|
|
|
{
|
|
|
|
|
"type": "windows-restart",
|
2021-11-16 17:14:17 +03:00
|
|
|
"check_registry": true,
|
|
|
|
|
"restart_check_command": "powershell -command \"& {if ((-not (Get-Process TiWorker.exe -ErrorAction SilentlyContinue)) -and (-not [System.Environment]::HasShutdownStarted) ) { Write-Output 'Restart complete' }}\"",
|
|
|
|
|
"restart_timeout": "30m"
|
2020-06-22 01:25:04 -07:00
|
|
|
},
|
2020-07-09 10:53:29 +03:00
|
|
|
{
|
|
|
|
|
"type": "powershell",
|
2021-11-16 17:14:17 +03:00
|
|
|
"pause_before": "2m",
|
2020-09-21 13:24:05 -05:00
|
|
|
"scripts": [
|
2021-12-02 10:56:43 +03:00
|
|
|
"{{ template_dir }}/scripts/Installers/Wait-WindowsUpdatesForInstall.ps1",
|
2020-07-09 10:53:29 +03:00
|
|
|
"{{ template_dir }}/scripts/Tests/RunAll-Tests.ps1"
|
|
|
|
|
]
|
|
|
|
|
},
|
2021-08-27 09:38:18 +03:00
|
|
|
{
|
|
|
|
|
"type": "powershell",
|
|
|
|
|
"inline": [
|
|
|
|
|
"if (-not (Test-Path {{user `image_folder`}}\\Tests\\testResults.xml)) { throw '{{user `image_folder`}}\\Tests\\testResults.xml not found' }"
|
|
|
|
|
]
|
|
|
|
|
},
|
2020-06-02 06:32:23 +00:00
|
|
|
{
|
|
|
|
|
"type": "powershell",
|
|
|
|
|
"inline": [
|
|
|
|
|
"pwsh -File '{{user `image_folder`}}\\SoftwareReport\\SoftwareReport.Generator.ps1'"
|
2020-07-23 16:32:41 +03:00
|
|
|
],
|
2020-09-21 13:24:05 -05:00
|
|
|
"environment_vars": [
|
2021-08-03 11:56:52 +03:00
|
|
|
"IMAGE_VERSION={{user `image_version`}}"
|
2020-06-02 06:32:23 +00:00
|
|
|
]
|
|
|
|
|
},
|
2021-08-27 09:38:18 +03:00
|
|
|
{
|
|
|
|
|
"type": "powershell",
|
|
|
|
|
"inline": [
|
2022-12-30 10:24:22 +01:00
|
|
|
"if (-not (Test-Path C:\\software-report.md)) { throw 'C:\\software-report.md not found' }",
|
|
|
|
|
"if (-not (Test-Path C:\\software-report.json)) { throw 'C:\\software-report.json not found' }"
|
2021-08-27 09:38:18 +03:00
|
|
|
]
|
|
|
|
|
},
|
2019-11-15 15:23:41 -05:00
|
|
|
{
|
|
|
|
|
"type": "file",
|
2022-12-30 10:24:22 +01:00
|
|
|
"source": "C:\\software-report.md",
|
2019-12-11 14:58:32 -05:00
|
|
|
"destination": "{{ template_dir }}/Windows2019-Readme.md",
|
2019-11-15 15:23:41 -05:00
|
|
|
"direction": "download"
|
|
|
|
|
},
|
2022-12-30 10:24:22 +01:00
|
|
|
{
|
|
|
|
|
"type": "file",
|
|
|
|
|
"source": "C:\\software-report.json",
|
|
|
|
|
"destination": "{{ template_dir }}/software-report.json",
|
|
|
|
|
"direction": "download"
|
|
|
|
|
},
|
2019-11-15 15:23:41 -05:00
|
|
|
{
|
|
|
|
|
"type": "powershell",
|
2021-12-22 17:42:54 +03:00
|
|
|
"skip_clean": true,
|
2020-09-21 13:24:05 -05:00
|
|
|
"scripts": [
|
2021-08-27 09:38:18 +03:00
|
|
|
"{{ template_dir }}/scripts/Installers/Run-NGen.ps1",
|
2023-09-05 14:34:09 +02:00
|
|
|
"{{ template_dir }}/scripts/Installers/Finalize-VM.ps1",
|
|
|
|
|
"{{ template_dir }}/scripts/Installers/Warmup-User.ps1"
|
2022-11-09 10:21:18 +01:00
|
|
|
],
|
|
|
|
|
"environment_vars": [
|
|
|
|
|
"INSTALL_USER={{user `install_user`}}"
|
2019-11-15 15:23:41 -05:00
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "windows-restart",
|
|
|
|
|
"restart_timeout": "10m"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "powershell",
|
|
|
|
|
"inline": [
|
|
|
|
|
"if( Test-Path $Env:SystemRoot\\System32\\Sysprep\\unattend.xml ){ rm $Env:SystemRoot\\System32\\Sysprep\\unattend.xml -Force}",
|
|
|
|
|
"& $env:SystemRoot\\System32\\Sysprep\\Sysprep.exe /oobe /generalize /quiet /quit",
|
|
|
|
|
"while($true) { $imageState = Get-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup\\State | Select ImageState; if($imageState.ImageState -ne 'IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE') { Write-Output $imageState.ImageState; Start-Sleep -s 10 } else { break } }"
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
2023-10-12 04:43:41 -04:00
|
|
|
}
|