Skip to content

Add air-gapped/GHE configurability to install.ps1 (Windows parity) #668

@sergio-sisternes-epam

Description

@sergio-sisternes-epam

Summary

PR #660 adds configurable env vars to install.sh for air-gapped and GHE environments (APM_INSTALL_DIR, GITHUB_URL, APM_REPO, VERSION). The Windows installer (install.ps1) should support the same configurability so Windows users get an equivalent experience.

Proposed solution

Add the same environment variable support to install.ps1:

Variable Default Description
APM_INSTALL_DIR Platform-appropriate default Directory for the apm binary
GITHUB_URL https://github.com Base URL for downloads (mirrors, GHE)
APM_REPO microsoft/apm GitHub repository
VERSION (latest) Pin a specific release (skips GitHub API)

Key behaviors to match:

  • When VERSION is set, skip the GitHub API and construct the download URL directly
  • Derive the API URL from GITHUB_URL for GHE compatibility
  • Support version pinning via parameter: irm https://aka.ms/apm-windows | iex -Args @v1.2.3 (or equivalent PowerShell pattern)
  • Auth token resolution (GITHUB_APM_PAT, GITHUB_TOKEN) should work with both API and direct download paths

Acceptance criteria

  • install.ps1 supports APM_INSTALL_DIR, GITHUB_URL, APM_REPO, VERSION env vars
  • Version pinning skips GitHub API
  • GHE API URL derived correctly from GITHUB_URL
  • Documentation updated (installation page, apm-guide skill)
  • CHANGELOG entry added

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions