Skip to content

Persist installer settings via apm config for self-update #667

@sergio-sisternes-epam

Description

@sergio-sisternes-epam

Summary

PR #660 introduces env vars (APM_INSTALL_DIR, GITHUB_URL, APM_REPO, VERSION) to configure install.sh for air-gapped and GHE environments. These work well for the bootstrap install, but once APM is installed, apm update has no way to remember those settings.

Users who installed to a custom directory or from a GHE mirror would need to re-export env vars every time they run apm update, which is error-prone and defeats the purpose of a self-update command.

Proposed solution

Add persistent config keys via apm config:

Config key Description
install-dir Custom binary install directory (default: /usr/local/bin)
mirror-url GHE or artifactory base URL (default: https://github.com)
mirror-repo Repository override (default: microsoft/apm)

The flow would be:

  1. First install: env vars (only option -- no apm binary yet)
  2. Post-install: apm config set mirror-url https://gh.corp.com
  3. Self-update: apm update reads config; env vars override if set (CI/unattended)

Acceptance criteria

  • apm update reads install-dir, mirror-url, mirror-repo from config
  • Env vars override config values when set (for CI/unattended use)
  • apm config set mirror-url <url> persists across sessions
  • Documentation updated for the new config keys

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementDeprecated: use type/feature. Kept for issue history; will be removed in milestone 0.10.0.

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions