Skip to content

Commit

Permalink
[Ubuntu] Add Go and Node to the toolcache on 24.04 (#9806)
Browse files Browse the repository at this point in the history
  • Loading branch information
erik-bershel committed May 8, 2024
1 parent 584c7c0 commit 7781af8
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 11 deletions.
14 changes: 7 additions & 7 deletions images/ubuntu/scripts/docs-gen/Generate-SoftwareReport.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,7 @@ $tools.AddToolVersion("Docker Compose v2", $(Get-DockerComposeV2Version))
$tools.AddToolVersion("Docker-Buildx", $(Get-DockerBuildxVersion))
$tools.AddToolVersion("Docker Client", $(Get-DockerClientVersion))
$tools.AddToolVersion("Docker Server", $(Get-DockerServerVersion))
if ((Test-IsUbuntu20) -or (Test-IsUbuntu22)) {
$tools.AddToolVersion("Fastlane", $(Get-FastlaneVersion))
}
$tools.AddToolVersion("Fastlane", $(Get-FastlaneVersion))
$tools.AddToolVersion("Git", $(Get-GitVersion))
$tools.AddToolVersion("Git LFS", $(Get-GitLFSVersion))
$tools.AddToolVersion("Git-ftp", $(Get-GitFTPVersion))
Expand Down Expand Up @@ -266,12 +264,14 @@ if (-not $(Test-IsUbuntu24)) {
}

# Cached Tools
$cachedTools = $installedSoftware.AddHeader("Cached Tools")
$cachedTools.AddToolVersionsList("Go", $(Get-ToolcacheGoVersions), "^\d+\.\d+")
$cachedTools.AddToolVersionsList("Node.js", $(Get-ToolcacheNodeVersions), "^\d+")
if (-not $(Test-IsUbuntu24)) {
$cachedTools = $installedSoftware.AddHeader("Cached Tools")
$cachedTools.AddToolVersionsList("Go", $(Get-ToolcacheGoVersions), "^\d+\.\d+")
$cachedTools.AddToolVersionsList("Node.js", $(Get-ToolcacheNodeVersions), "^\d+")
$cachedTools.AddToolVersionsList("Python", $(Get-ToolcachePythonVersions), "^\d+\.\d+")
$cachedTools.AddToolVersionsList("PyPy", $(Get-ToolcachePyPyVersions), "^\d+\.\d+")
}
$cachedTools.AddToolVersionsList("PyPy", $(Get-ToolcachePyPyVersions), "^\d+\.\d+")
if (-not $(Test-IsUbuntu24)) {
$cachedTools.AddToolVersionsList("Ruby", $(Get-ToolcacheRubyVersions), "^\d+\.\d+")
}

Expand Down
2 changes: 1 addition & 1 deletion images/ubuntu/scripts/tests/Toolset.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Describe "Toolset" -Skip:((-not (Test-IsUbuntu20)) -and (-not (Test-IsUbuntu22))) {
Describe "Toolset" {
$tools = (Get-ToolsetContent).toolcache

$toolsExecutables = @{
Expand Down
6 changes: 6 additions & 0 deletions images/ubuntu/templates/ubuntu-24.04.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,12 @@ provisioner "shell" {
scripts = ["${path.root}/../scripts/build/install-docker.sh"]
}

provisioner "shell" {
environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}"]
execute_command = "sudo sh -c '{{ .Vars }} pwsh -f {{ .Path }}'"
scripts = ["${path.root}/../scripts/build/Install-Toolset.ps1", "${path.root}/../scripts/build/Configure-Toolset.ps1"]
}

provisioner "shell" {
environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}"]
execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'"
Expand Down
14 changes: 11 additions & 3 deletions images/ubuntu/toolsets/toolset-2404.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,23 @@
"url" : "https://raw.githubusercontent.com/actions/node-versions/main/versions-manifest.json",
"platform" : "linux",
"arch": "x64",
"versions": []
"versions": [
"16.*",
"18.*",
"20.*"
]
},
{
"name": "go",
"url" : "https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json",
"arch": "x64",
"platform" : "linux",
"versions": [],
"default": "*"
"versions": [
"1.20.*",
"1.21.*",
"1.22.*"
],
"default": "1.22.*"
},
{
"name": "Ruby",
Expand Down

0 comments on commit 7781af8

Please sign in to comment.