Add nodejs tool cache for linux. (#839)

* add nodejs

* 4 node versions

Co-authored-by: Dmitry Shibanov <v-dmshib@microsoft.com>
This commit is contained in:
Dmitry Shibanov
2020-05-09 04:31:49 +00:00
committed by GitHub
parent 68fdb181e5
commit 9b1143dddd
6 changed files with 42 additions and 14 deletions

View File

@@ -52,4 +52,5 @@ foreach ($tool in $tools) {
} }
} }
chown -R "$($env:SUDO_USER):$($env:SUDO_USER)" /opt/hostedtoolcache/Python chown -R "$($env:SUDO_USER):$($env:SUDO_USER)" /opt/hostedtoolcache/Python
chown -R "$($env:SUDO_USER):$($env:SUDO_USER)" /opt/hostedtoolcache/node

View File

@@ -26,7 +26,10 @@ function Run-ExecutableTests {
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
# Define executables for cached tools # Define executables for cached tools
$toolsExecutables = @{ Python = @("python", "bin/pip") } $toolsExecutables = @{
Python = @("python", "bin/pip");
node = @("bin/node", "bin/npm")
}
# Get toolset content # Get toolset content
$toolsetJson = Get-Content -Path "$env:INSTALLER_SCRIPT_FOLDER/toolset.json" -Raw $toolsetJson = Get-Content -Path "$env:INSTALLER_SCRIPT_FOLDER/toolset.json" -Raw

View File

@@ -13,6 +13,18 @@
"3.7.*", "3.7.*",
"3.8.*" "3.8.*"
] ]
},
{
"name": "node",
"url" : "https://raw.githubusercontent.com/actions/node-versions/master/versions-manifest.json",
"platform" : "linux",
"arch": "x64",
"versions": [
"8.*",
"10.*",
"12.*",
"14.*"
]
} }
] ]
} }

View File

@@ -13,6 +13,18 @@
"3.7.*", "3.7.*",
"3.8.*" "3.8.*"
] ]
},
{
"name": "node",
"url" : "https://raw.githubusercontent.com/actions/node-versions/master/versions-manifest.json",
"platform" : "linux",
"arch": "x64",
"versions": [
"8.*",
"10.*",
"12.*",
"14.*"
]
} }
] ]
} }

View File

@@ -324,12 +324,6 @@
], ],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
}, },
{
"type": "shell",
"scripts":[
"{{template_dir}}/scripts/installers/validate-disk-space.sh"
]
},
{ {
"type": "file", "type": "file",
"source": "{{user `metadata_file`}}", "source": "{{user `metadata_file`}}",
@@ -345,6 +339,12 @@
], ],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
}, },
{
"type": "shell",
"scripts":[
"{{template_dir}}/scripts/installers/validate-disk-space.sh"
]
},
{ {
"type": "file", "type": "file",
"source": "{{template_dir}}/config/ubuntu1604.conf", "source": "{{template_dir}}/config/ubuntu1604.conf",

View File

@@ -328,12 +328,6 @@
], ],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
}, },
{
"type": "shell",
"scripts":[
"{{template_dir}}/scripts/installers/validate-disk-space.sh"
]
},
{ {
"type": "file", "type": "file",
"source": "{{user `metadata_file`}}", "source": "{{user `metadata_file`}}",
@@ -349,6 +343,12 @@
], ],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
}, },
{
"type": "shell",
"scripts":[
"{{template_dir}}/scripts/installers/validate-disk-space.sh"
]
},
{ {
"type": "file", "type": "file",
"source": "{{template_dir}}/config/ubuntu1804.conf", "source": "{{template_dir}}/config/ubuntu1804.conf",