Merge pull request #216 from vmapetr/v-mapetr/add-npm-toolcache

Toolcache: Add NPM Toolcache support for Windows/Linux
This commit is contained in:
Alejandro Pauly
2020-01-12 19:48:25 -05:00
committed by GitHub
14 changed files with 289 additions and 253 deletions

View File

@@ -16,6 +16,7 @@
"private_virtual_network_with_public_ip": "{{env `PRIVATE_VIRTUAL_NETWORK_WITH_PUBLIC_IP`}}",
"vm_size": "Standard_DS4_v2",
"root_folder": "C:",
"image_folder": "C:\\image",
"commit_file": "C:\\image\\commit.txt",
"metadata_file": "C:\\image\\metadata.txt",
@@ -24,7 +25,8 @@
"install_user": "installer",
"install_password": null,
"capture_name_prefix": "packer",
"image_version": "dev"
"image_version": "dev",
"toolcache_registry": "https://buildcanary.pkgs.visualstudio.com/PipelineCanary/_packaging/hostedtoolcache/npm/registry/"
},
"sensitive-variables": ["install_password", "ssh_password", "client_secret"],
"builders": [
@@ -238,6 +240,27 @@
},
{
"type": "powershell",
"scripts":[
"{{ template_dir }}/scripts/Installers/Install-NodeLts.ps1"
]
},
{
"type": "powershell",
"scripts":[
"{{ template_dir }}/scripts/Installers/Install-7zip.ps1"
]
},
{
"type": "file",
"source": "{{template_dir}}/toolcache.json",
"destination": "{{user `root_folder`}}/toolcache.json"
},
{
"type": "powershell",
"environment_vars":[
"TOOLCACHE_REGISTRY={{ user `toolcache_registry` }}",
"ROOT_FOLDER={{user `root_folder`}}"
],
"scripts":[
"{{ template_dir }}/scripts/Installers/Download-ToolCache.ps1"
]
@@ -338,12 +361,6 @@
"{{ template_dir }}/scripts/Installers/Validate-WinAppDriver.ps1"
]
},
{
"type": "powershell",
"scripts":[
"{{ template_dir }}/scripts/Installers/Install-NodeLts.ps1"
]
},
{
"type": "powershell",
"scripts":[
@@ -426,12 +443,6 @@
"{{ template_dir }}/scripts/Installers/Install-AzureCosmosDbEmulator.ps1"
]
},
{
"type": "powershell",
"scripts":[
"{{ template_dir }}/scripts/Installers/Install-7zip.ps1"
]
},
{
"type": "powershell",
"environment_vars": [
@@ -538,6 +549,9 @@
},
{
"type": "powershell",
"environment_vars":[
"ROOT_FOLDER={{user `root_folder`}}"
],
"scripts":[
"{{ template_dir }}/scripts/Installers/Validate-ToolCache.ps1"
]