aaronparker / evergreen

Create evergreen Windows image build pipelines with the latest version numbers and download URLs for common applications
http://stealthpuppy.com/evergreen/
MIT License
383 stars 66 forks source link

[Bug]: VMware Tools download URIs have changed due to dropping support of x86 #751

Closed AScott-WWF closed 1 month ago

AScott-WWF commented 1 month ago

What happened?

The URI's returned for VMware Tools by Evergreen (2409.1419) are now incorrect for version 12.5.0 (released last night - 9th October 2024) the URI's return 404's when a download is attempted

I believe this is because the correct URI is now for x64 only (Can be confirmed by browsing the folder structure here: https://packages.vmware.com/tools/releases/12.5.0/windows), so I believe the simplest fix is for .\Modules\Evergreen\2409.1419\Manifests\vmwaretools.json to be modified from line 17 to 21 as follows:

            "Uri": "https://packages.vmware.com/tools/releases/#version/windows/#architecture/VMware-tools-#version-#build-#processor.exe",
            "Architecture": {
                "x64": "x86_64",
                "x86": "i386"
            }

to:

            "Uri": "https://packages.vmware.com/tools/releases/#version/windows/#architecture/VMware-tools-#version-#build-#processor.exe",
            "Architecture": {
                "x64": "x64"
            }

In my test this now returns the correct (single) URI with the correct filename:

get-evergreenApp -Name vmwaretools -Verbose | ft
VERBOSE: Function path: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2409.1419\Apps\Get-vmwaretools.ps1
VERBOSE: Function exists: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2409.1419\Apps\Get-vmwaretools.ps1.
VERBOSE: Dot sourcing: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2409.1419\Apps\Get-vmwaretools.ps1.
VERBOSE: Get-FunctionResource: read application resource strings from [C:\Program Files\WindowsPowerShell\Modules\Evergreen\2409.1419\Manifests\vmwaretools.json]
VERBOSE: Calling: Get-vmwaretools.
VERBOSE: Invoke-EvergreenWebRequest: Adding ContentType.
VERBOSE: Invoke-EvergreenWebRequest: Using temp file C:\Users\AScott\AppData\Local\Temp\tmpy4iv0p.tmp.
VERBOSE: Invoke-EvergreenWebRequest: Invoke-WebRequest parameter: Method: Default.
VERBOSE: Invoke-EvergreenWebRequest: Invoke-WebRequest parameter: UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/127.0.2651.105.
VERBOSE: Invoke-EvergreenWebRequest: Invoke-WebRequest parameter: ContentType: text/plain.
VERBOSE: Invoke-EvergreenWebRequest: Invoke-WebRequest parameter: Uri: https://packages.vmware.com/tools/versions.
VERBOSE: Invoke-EvergreenWebRequest: Invoke-WebRequest parameter: PassThru: True.
VERBOSE: Invoke-EvergreenWebRequest: Invoke-WebRequest parameter: OutFile: C:\Users\AScott\AppData\Local\Temp\tmpy4iv0p.tmp.
VERBOSE: Invoke-EvergreenWebRequest: Invoke-WebRequest parameter: UseBasicParsing: True.
VERBOSE: Requested HTTP/1.1 GET with 0-byte payload
VERBOSE: Received HTTP/1.1 response of content type text/plain of unknown size
VERBOSE: File Name: tmpy4iv0p.tmp
VERBOSE: Invoke-EvergreenWebRequest: Response: 200.
VERBOSE: Invoke-EvergreenWebRequest: Content type: text/plain.
VERBOSE: Invoke-EvergreenWebRequest: Returning content of length: 197.
VERBOSE: Get-VMwareTools: Filtering version table with 197 lines.
VERBOSE: Get-VMwareTools: Filtered to 179 lines.
VERBOSE: Get-VMwareTools: Selecting first 20 lines.
VERBOSE: Get-VMwareTools: Convert to table.
VERBOSE: Get-VMwareTools: Found version: 12.5.0-24276846

Version Architecture URI
------- ------------ ---
12.5.0  x64          https://packages.vmware.com/tools/releases/12.5.0/windows/x64/VMware-tools-12.5.0-24276846-x64.exe

N.B. Verbose output below, shows result without the modification

Version

2409.1419

What PowerShell edition/s are you running Evergreen on?

PowerShell Core, Windows PowerShell

Which operating system/s are you running Evergreen on?

Windows 10+

Have you reviewed the documentation?

Verbose output

Get-EvergreenApp -Name vmwaretools -Verbose | ft
VERBOSE: Function path: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2409.1419\Apps\Get-vmwaretools.ps1
VERBOSE: Function exists: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2409.1419\Apps\Get-vmwaretools.ps1.
VERBOSE: Dot sourcing: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2409.1419\Apps\Get-vmwaretools.ps1.
VERBOSE: Get-FunctionResource: read application resource strings from [C:\Program Files\WindowsPowerShell\Modules\Evergreen\2409.1419\Manifests\vmwaretools.json]
VERBOSE: Calling: Get-vmwaretools.
VERBOSE: Invoke-EvergreenWebRequest: Adding ContentType.
VERBOSE: Invoke-EvergreenWebRequest: Using temp file C:\Users\AScott\AppData\Local\Temp\tmpgiim2n.tmp.
VERBOSE: Invoke-EvergreenWebRequest: Invoke-WebRequest parameter: Method: Default.
VERBOSE: Invoke-EvergreenWebRequest: Invoke-WebRequest parameter: PassThru: True.
VERBOSE: Invoke-EvergreenWebRequest: Invoke-WebRequest parameter: OutFile: C:\Users\AScott\AppData\Local\Temp\tmpgiim2n.tmp.
VERBOSE: Invoke-EvergreenWebRequest: Invoke-WebRequest parameter: UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/127.0.2651.105.
VERBOSE: Invoke-EvergreenWebRequest: Invoke-WebRequest parameter: ContentType: text/plain.
VERBOSE: Invoke-EvergreenWebRequest: Invoke-WebRequest parameter: Uri: https://packages.vmware.com/tools/versions.
VERBOSE: Invoke-EvergreenWebRequest: Invoke-WebRequest parameter: UseBasicParsing: True.
VERBOSE: Requested HTTP/1.1 GET with 0-byte payload
VERBOSE: Received HTTP/1.1 response of content type text/plain of unknown size
VERBOSE: File Name: tmpgiim2n.tmp
VERBOSE: Invoke-EvergreenWebRequest: Response: 200.
VERBOSE: Invoke-EvergreenWebRequest: Content type: text/plain.
VERBOSE: Invoke-EvergreenWebRequest: Returning content of length: 197.
VERBOSE: Get-VMwareTools: Filtering version table with 197 lines.
VERBOSE: Get-VMwareTools: Filtered to 179 lines.
VERBOSE: Get-VMwareTools: Selecting first 20 lines.
VERBOSE: Get-VMwareTools: Convert to table.
VERBOSE: Get-VMwareTools: Found version: 12.5.0-24276846

Version Architecture URI
------- ------------ ---
12.5.0  x64          https://packages.vmware.com/tools/releases/12.5.0/windows/x64/VMware-tools-12.5.0-24276846-x86_64.exe
12.5.0  x86          https://packages.vmware.com/tools/releases/12.5.0/windows/x86/VMware-tools-12.5.0-24276846-i386.exe