Merge pull request #1635 from hutson/refactor/formatting

refactor: auto format JSON using VSC
This commit is contained in:
Maxim Lobanov
2020-09-27 13:26:25 +03:00
committed by GitHub
5 changed files with 111 additions and 97 deletions

View File

@@ -15,7 +15,6 @@
"private_virtual_network_with_public_ip": "{{env `PRIVATE_VIRTUAL_NETWORK_WITH_PUBLIC_IP`}}",
"vm_size": "Standard_D4_v2",
"run_scan_antivirus": "false",
"root_folder": "C:",
"toolset_json_path": "{{env `TEMP`}}\\toolset.json",
"image_folder": "C:\\image",
@@ -30,7 +29,11 @@
"github_feed_token": "{{env `GITHUB_FEED_TOKEN`}}",
"announcements": "{{env `ANNOUNCEMENTS`}}"
},
"sensitive-variables": ["install_password", "client_secret", "github_feed_token"],
"sensitive-variables": [
"install_password",
"client_secret",
"github_feed_token"
],
"builders": [
{
"name": "vhd",
@@ -65,7 +68,7 @@
"provisioners": [
{
"type": "powershell",
"inline":[
"inline": [
"New-Item -Path {{user `image_folder`}} -ItemType Directory -Force"
]
},
@@ -97,7 +100,7 @@
{
"type": "windows-shell",
"inline": [
"net user {{user `install_user`}} {{user `install_password`}} /add /passwordchg:no /passwordreq:yes /active:yes /Y" ,
"net user {{user `install_user`}} {{user `install_password`}} /add /passwordchg:no /passwordreq:yes /active:yes /Y",
"net localgroup Administrators {{user `install_user`}} /add",
"winrm set winrm/config/service/auth @{Basic=\"true\"}",
"winrm get winrm/config/service/auth"
@@ -116,7 +119,7 @@
"TOOLSET_JSON_PATH={{user `toolset_json_path`}}",
"PSMODULES_ROOT_FOLDER={{user `psmodules_root_folder`}}"
],
"scripts":[
"scripts": [
"{{ template_dir }}/scripts/Installers/Install-PowerShellModules.ps1",
"{{ template_dir }}/scripts/Installers/Initialize-VM.ps1",
"{{ template_dir }}/scripts/Installers/Install-WebPlatformInstaller.ps1"
@@ -127,13 +130,13 @@
"type": "powershell",
"elevated_user": "SYSTEM",
"elevated_password": "",
"scripts":[
"scripts": [
"{{ template_dir }}/scripts/Installers/Windows2019/Install-WSL.ps1"
]
},
{
"type": "powershell",
"scripts":[
"scripts": [
"{{ template_dir }}/scripts/Installers/Update-DotnetTLS.ps1",
"{{ template_dir }}/scripts/Installers/Install-ContainersFeature.ps1"
]
@@ -141,8 +144,8 @@
{
"type": "powershell",
"inline": [
"setx ImageVersion {{user `image_version` }} /m",
"setx ImageOS {{user `image_os` }} /m"
"setx ImageVersion {{user `image_version` }} /m",
"setx ImageOS {{user `image_os` }} /m"
]
},
{
@@ -155,7 +158,7 @@
"IMAGE_VERSION={{user `image_version`}}",
"IMAGEDATA_FILE={{user `imagedata_file`}}"
],
"scripts":[
"scripts": [
"{{ template_dir }}/scripts/Installers/Update-ImageData.ps1",
"{{ template_dir }}/scripts/Installers/Install-Docker.ps1",
"{{ template_dir }}/scripts/Installers/Install-PowershellCore.ps1"
@@ -167,7 +170,7 @@
},
{
"type": "powershell",
"scripts":[
"scripts": [
"{{ template_dir }}/scripts/Installers/Update-DockerImages.ps1"
]
},
@@ -177,10 +180,10 @@
0,
3010
],
"environment_vars":[
"environment_vars": [
"TOOLSET_JSON_PATH={{user `toolset_json_path`}}"
],
"scripts":[
"scripts": [
"{{ template_dir }}/scripts/Installers/Install-VS.ps1",
"{{ template_dir }}/scripts/Installers/Install-NET48.ps1"
],
@@ -189,10 +192,10 @@
},
{
"type": "powershell",
"environment_vars":[
"environment_vars": [
"TOOLSET_JSON_PATH={{user `toolset_json_path`}}"
],
"scripts":[
"scripts": [
"{{ template_dir }}/scripts/Installers/Install-Nuget.ps1",
"{{ template_dir }}/scripts/Installers/Install-Wix.ps1",
"{{ template_dir }}/scripts/Installers/Install-WDK.ps1",
@@ -210,7 +213,7 @@
},
{
"type": "powershell",
"scripts":[
"scripts": [
"{{ template_dir }}/scripts/Installers/Install-ServiceFabricSDK.ps1"
],
"execution_policy": "remotesigned"
@@ -221,38 +224,39 @@
},
{
"type": "powershell",
"environment_vars":[
"environment_vars": [
"GITHUB_FEED_TOKEN={{ user `github_feed_token` }}",
"ROOT_FOLDER={{user `root_folder`}}"
],
"scripts":[
"scripts": [
"{{ template_dir }}/scripts/Installers/Download-ToolCache.ps1"
]
},
{
"type": "windows-shell",
"inline": ["wmic product where \"name like '%%microsoft azure powershell%%'\" call uninstall /nointeractive"]
"inline": [
"wmic product where \"name like '%%microsoft azure powershell%%'\" call uninstall /nointeractive"
]
},
{
"type": "powershell",
"environment_vars":[
"environment_vars": [
"TOOLSET_JSON_PATH={{user `toolset_json_path`}}",
"ROOT_FOLDER={{user `root_folder`}}",
"PSMODULES_ROOT_FOLDER={{user `psmodules_root_folder`}}"
],
"scripts":[
"scripts": [
"{{ template_dir }}/scripts/Installers/Install-PyPy.ps1",
"{{ template_dir }}/scripts/Installers/Install-Toolset.ps1",
"{{ template_dir }}/scripts/Installers/Configure-Toolset.ps1",
"{{ template_dir }}/scripts/Installers/Install-YAMLLint.ps1",
"{{ template_dir }}/scripts/Installers/Update-AndroidSDK.ps1",
"{{ template_dir }}/scripts/Installers/Install-AzureModules.ps1"
]
},
{
"type": "powershell",
"scripts":[
"scripts": [
"{{ template_dir }}/scripts/Installers/Install-OpenSSL.ps1",
"{{ template_dir }}/scripts/Installers/Install-Perl.ps1",
"{{ template_dir }}/scripts/Installers/Install-Git.ps1",
@@ -271,7 +275,7 @@
},
{
"type": "powershell",
"scripts":[
"scripts": [
"{{ template_dir }}/scripts/Installers/Enable-DeveloperMode.ps1"
],
"elevated_user": "{{user `install_user`}}",
@@ -281,13 +285,13 @@
"type": "powershell",
"elevated_user": "SYSTEM",
"elevated_password": "",
"scripts":[
"scripts": [
"{{ template_dir }}/scripts/Installers/Install-Msys2.ps1"
]
},
{
"type": "powershell",
"scripts":[
"scripts": [
"{{ template_dir }}/scripts/Installers/Install-VSWhere.ps1",
"{{ template_dir }}/scripts/Installers/Install-WinAppDriver.ps1",
"{{ template_dir }}/scripts/Installers/Install-Cmake.ps1",
@@ -324,7 +328,7 @@
},
{
"type": "powershell",
"scripts":[
"scripts": [
"{{ template_dir }}/scripts/Installers/Install-WindowsUpdates.ps1",
"{{ template_dir }}/scripts/Installers/Configure-DynamicPort.ps1"
],
@@ -337,10 +341,10 @@
},
{
"type": "powershell",
"scripts":[
"scripts": [
"{{ template_dir }}/scripts/Tests/RunAll-Tests.ps1"
],
"environment_vars":[
"environment_vars": [
"TOOLSET_JSON_PATH={{user `toolset_json_path`}}",
"PSMODULES_ROOT_FOLDER={{user `psmodules_root_folder`}}",
"ROOT_FOLDER={{user `root_folder`}}"
@@ -351,7 +355,7 @@
"inline": [
"pwsh -File '{{user `image_folder`}}\\SoftwareReport\\SoftwareReport.Generator.ps1'"
],
"environment_vars":[
"environment_vars": [
"TOOLSET_JSON_PATH={{user `toolset_json_path`}}",
"ANNOUNCEMENTS={{user `announcements`}}"
]
@@ -364,7 +368,7 @@
},
{
"type": "powershell",
"scripts":[
"scripts": [
"{{ template_dir }}/scripts/Installers/Finalize-VM.ps1"
]
},
@@ -374,28 +378,28 @@
},
{
"type": "powershell",
"environment_vars":[
"environment_vars": [
"RUN_SCAN_ANTIVIRUS={{user `run_scan_antivirus`}}"
],
"scripts":[
"scripts": [
"{{ template_dir }}/scripts/Installers/Run-Antivirus.ps1"
]
},
{
"type": "powershell",
"scripts":[
"scripts": [
"{{ template_dir }}/scripts/Installers/Configure-Antivirus.ps1"
]
},
{
"type": "powershell",
"scripts":[
"scripts": [
"{{ template_dir }}/scripts/Installers/Disable-JITDebugger.ps1"
]
},
{
"type": "powershell",
"scripts":[
"scripts": [
"{{ template_dir }}/scripts/Installers/Run-NGen.ps1"
]
},