Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nodejs tool cache for linux. #839

Merged
3 changes: 2 additions & 1 deletion images/linux/scripts/installers/Install-Toolset.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion images/linux/scripts/installers/Validate-Toolset.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ function Run-ExecutableTests {
$ErrorActionPreference = "Stop"

# Define executables for cached tools
$toolsExecutables = @{ Python = @("python", "bin/pip") }
$toolsExecutables = @{
Python = @("python", "bin/pip");
node = @("bin/node", "bin/npm")
}

# Get toolset content
$toolsetJson = Get-Content -Path "$env:INSTALLER_SCRIPT_FOLDER/toolset.json" -Raw
Expand Down
2 changes: 1 addition & 1 deletion images/linux/scripts/installers/validate-disk-space.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
################################################################################

availableSpaceMB=$(df / -hm | sed 1d | awk '{ print $4}')
minimumFreeSpaceMB=18000
minimumFreeSpaceMB=17000

echo "Available disk space: $availableSpaceMB MB"
if [ $availableSpaceMB -le $minimumFreeSpaceMB ]; then
Expand Down
12 changes: 12 additions & 0 deletions images/linux/toolset-1604.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@
"3.7.*",
"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.*"
]
}
]
}
12 changes: 12 additions & 0 deletions images/linux/toolset-1804.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@
"3.7.*",
"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.*"
]
}
]
}