Add Linux support to ado-npm-auth and node-azureauth#76
Add Linux support to ado-npm-auth and node-azureauth#76sverrejoh wants to merge 4 commits intomicrosoft:mainfrom
Conversation
This change enables native Linux (x64 and arm64) support for automatic Azure DevOps authentication in both packages. Changes in packages/ado-npm-auth: - Added linux (x64, arm64) to supported platforms in is-supported-platform-and-architecture.ts Changes in packages/node-azureauth: - Added linux (x64, arm64) to supported platforms - Fixed binary name map (azureauth instead of azureauth.exe for Linux) - Added .deb download support for Linux binaries - Implemented extractDeb() function to handle .deb package extraction - Updated DOWNLOAD_MAP to include Linux .deb files for x64 and arm64 The azureauth CLI (v0.8.4+) already provides Linux binaries, this change enables the wrappers to use them. Fixes support for native Linux users who previously had to manually configure PAT tokens.
|
I created an alternative implementation for linux: #77 (even though yours implementation is a lot cleaner) I'm awaiting feedback from repo owners on their view which approach to take. My concern is that linux support is dropped in v9 of azureauth. There is a chance that internally at Microsoft at some point in the future we have to move to v9 because it supports a later MSAL library. |
Super! Then I'll test it and abandon this PR. Thanks for the great work! |
Summary
Enables native Linux (x64 and arm64) support for automatic Azure DevOps authentication. The
azureauthCLI already provides Linux binaries (v0.8.4+), but the wrapper packages were blocking Linux users.Changes
packages/ado-npm-auth
linux: ["x64", "arm64"]to supported platforms inis-supported-platform-and-architecture.tspackages/node-azureauth
linux: ["x64", "arm64"]to supported platformsAZUREAUTH_NAME_MAPfor Linux (binary name isazureauth, notazureauth.exe).debdownload support toDOWNLOAD_MAP:azureauth-0.8.4-linux-x64.debazureauth-0.8.4-linux-arm64.debextractDeb()function to handle Debian package extraction:ararchivedata.tar.*/usr/lib/azureauth/to install directoryTesting
Tested on Arch Linux x64:
Before/After
Before: Linux users see "Platform linux and architecture x64 not supported" error
After: Linux users can use
npm exec azureauthfor automatic authenticationNotes
azureauth.exe) via WSL interop as beforearandtarcommands (standard on all Linux distributions)