Add JFrog Artifactory VCS repository support#354
Merged
danielmeppiel merged 3 commits intomicrosoft:mainfrom Mar 18, 2026
Merged
Add JFrog Artifactory VCS repository support#354danielmeppiel merged 3 commits intomicrosoft:mainfrom
danielmeppiel merged 3 commits intomicrosoft:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds first-class support for installing APM packages through JFrog Artifactory VCS repositories, including explicit Artifactory dependency syntax, a transparent proxy mode via ARTIFACTORY_BASE_URL, and an air-gapped mode (ARTIFACTORY_ONLY) that blocks direct git operations.
Changes:
- Add Artifactory path parsing and archive URL construction helpers.
- Route downloads through Artifactory (archive-based install + file/subdir extraction) with new token purpose
ARTIFACTORY_APM_TOKEN. - Add unit tests plus updates to authentication docs and the changelog.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
tests/unit/test_artifactory_support.py |
Adds comprehensive tests for Artifactory parsing, proxy routing, archive/file extraction, and air-gapped behavior. |
src/apm_cli/utils/github_host.py |
Introduces Artifactory path detection/parsing and archive URL builders. |
src/apm_cli/models/dependency.py |
Extends dependency parsing/canonicalization and URL generation to include Artifactory references. |
src/apm_cli/deps/github_downloader.py |
Implements Artifactory archive download/extraction and proxy/air-gapped routing logic. |
src/apm_cli/core/token_manager.py |
Adds artifactory_modules token purpose and env var mapping. |
src/apm_cli/commands/install.py |
Ensures repo refs built for install include Artifactory prefix when applicable. |
docs/src/content/docs/getting-started/authentication.md |
Documents the new Artifactory auth token environment variable. |
CHANGELOG.md |
Adds an Unreleased entry describing Artifactory support. |
You can also share your feedback on Copilot code review. Take the survey.
Contributor
Author
|
@microsoft-github-policy-service agree company="Check Point" |
0aa2b8f to
b71d2a3
Compare
b71d2a3 to
c3bf50e
Compare
Support Artifactory as a first-class package source with two modes: - Mode 1: Explicit FQDN (e.g., art.company.com/artifactory/github/owner/repo) - Mode 2: Transparent proxy via ARTIFACTORY_BASE_URL env var - Air-gapped mode: ARTIFACTORY_ONLY=1 blocks all direct git clones Multi-format archive URL support (GitHub and GitLab upstream patterns). Includes 61 unit tests, edge case fail-safes, and documentation updates. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
c3bf50e to
1faa101
Compare
danielmeppiel
approved these changes
Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Enterprise environments often cannot allow direct outbound git connections to GitHub, GitLab, or other public Git hosts. JFrog Artifactory is widely deployed as a caching proxy that sits between internal networks and external repositories, providing:
APM currently requires
git clonefor all package downloads, which fails behind Artifactory because Artifactory VCS Remote Repositories serve zip archives over HTTP, not the git protocol. This PR adds Artifactory as a first-class package source alongside GitHub, GitLab, Bitbucket, and Azure DevOps.What changed
Three operating modes
apm install art.company.com/artifactory/github/owner/repoARTIFACTORY_BASE_URLARTIFACTORY_ONLY=1+ARTIFACTORY_BASE_URLKey implementation details
{repo}-{ref}/root directory)/archive/refs/heads/{ref}.zip) and GitLab-style (/-/archive/{ref}/{repo}-{ref}.zip) patterns, so the same code works regardless of what upstream VCS sits behind ArtifactoryARTIFACTORY_APM_TOKENenv var for authenticated access (Bearer token)apm_modules/owner/repo/whether installed from GitHub or Artifactory, enabling seamless source switchingresolved_commitisNonefor Artifactory packages (no git SHA available); lockfile still tracks branch/tag referenceSecurity
../are silently skippedARTIFACTORY_MAX_ARCHIVE_MB(default 500 MB)https://andhttp://accepted forARTIFACTORY_BASE_URLFiles changed
src/apm_cli/utils/github_host.pyis_artifactory_path,parse_artifactory_path,build_artifactory_archive_urlsrc/apm_cli/models/dependency.pyartifactory_prefixfield,is_artifactory()method, parsing/serializationsrc/apm_cli/deps/github_downloader.pysrc/apm_cli/commands/install.pysrc/apm_cli/core/token_manager.pyartifactory_modulestoken precedencedocs/.../authentication.mdCHANGELOG.mdtests/unit/test_artifactory_support.pyType of change
Testing