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

Build a Chocolatey package that supports ARM64 #617

Merged
merged 1 commit into from
Dec 21, 2023

Conversation

marckhouzam
Copy link
Contributor

@marckhouzam marckhouzam commented Dec 18, 2023

What this PR does / why we need it

This PR updates the Chocolatey package to be able to install a Windows ARM64 CLI build when running on an ARM64 Windows.

To do this, the build script now handles two binaries, the one for AMD64 and the one for ARM64, each one with its own SHA. Both SHAs are injected in the chocolateyInstall.ps1.tmpl template file which is then used as the installation script. At installation time, this script checks if its running on an ARM64 machine or an AMD64 machine and then downloads the appropriate CLI Windows binary.

Which issue(s) this PR fixes

Part of #357

Describe testing done for PR

This is hard to test directly because there is no Windows ARM64 version currently published on this repo's Github release page. So what I did was pretend that the v1.0.0 AMD64 was the ARM64 version, and that the v1.1.0 AMD64 version was the AMD64 version. I built the new Chocolatey package with those "hacks" and then ran it on:

  1. Windows 11 AMD64 and confirmed the AMD64 CLI was installed (so v1.1.0)
  2. Windows 11 ARM64 and confirmed the ARM64 CLI was installed (so v1.0.0)
  3. Windows 10 AMD64 and confirmed the AMD64 CLI was installed (so v1.1.0)

I also tested building the new Chocolatey package using VMware's internal build system and confirmed the proper installation script was generated using the expected SHAs for AMD64 and ARM64.

Release note

Add support to install the Windows ARM64 CLI through Chocolatey.

Additional information

Special notes for your reviewer

The script assumes that the Github binary for Windows ARM64 is named tanzu-cli-windows-arm64-windows11.zip.
This may need a bit of discussion.

@marckhouzam marckhouzam requested a review from a team as a code owner December 18, 2023 16:48
@marckhouzam marckhouzam added the kind/feature Categorizes issue or PR as related to a new feature label Dec 18, 2023
@marckhouzam marckhouzam added this to the v1.2.0 milestone Dec 18, 2023
Copy link
Contributor

@anujc25 anujc25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

The build script for Chocolatey now handles two binaries, the one for
AMD64 and the one for ARM64, each one with its own SHA.  Both SHAs are
injected in the `chocolateyInstall.ps1.tmpl` template file which is then
used as the installation script.  At installation time, this script
checks if its running on an ARM64 machine or an AMD64 machine and then
downloads the appropriate CLI Windows binary.

Signed-off-by: Marc Khouzam <marc.khouzam@broadcom.com>
@marckhouzam marckhouzam merged commit 684ce10 into vmware-tanzu:main Dec 21, 2023
7 checks passed
@marckhouzam marckhouzam deleted the feat/chocoARM64 branch December 21, 2023 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-not-required kind/feature Categorizes issue or PR as related to a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants