feat: add puppet forge remote type
Adds package: puppet for proxying the Puppet Forge API (forgeapi.puppet.com). - remote/puppet.py: rewrites absolute forge URLs and relative /v3/files/ paths in JSON responses to absolute proxy URLs; g10k uses url.ResolveReference so absolute file_uri values override the base entirely, meaning tarball downloads go straight to the proxy - config.py: registers built-in mutable patterns for v3/modules/ and v3/releases (module metadata pages) - artifact/proxy.py: dispatches to puppet.resolve_content for package: puppet remotes - 9 new tests covering mutable detection, URL rewriting (relative and absolute), content-type, tarball pass-through, and pattern blocking Client configuration (g10k): - config file: forge_base_url: https://artifacts.example.com/api/v1/remote/puppet-forge - Puppetfile: forge.baseUrl https://artifacts.example.com/api/v1/remote/puppet-forge
This commit is contained in:
@@ -452,6 +452,20 @@ remotes:
|
||||
immutable_ttl: 0
|
||||
mutable_ttl: 3600
|
||||
|
||||
puppet-forge:
|
||||
base_url: "https://forgeapi.puppet.com"
|
||||
package: "puppet"
|
||||
description: "Puppet Forge module registry"
|
||||
# Module metadata (v3/modules/, v3/releases) is mutable by default.
|
||||
# Configure r10k / librarian-puppet with this remote as the Forge URL:
|
||||
# http://your-proxy/api/v1/remote/puppet-forge
|
||||
check_mutable_updates: true
|
||||
immutable_patterns:
|
||||
- "^v3/files/.*\\.tar\\.gz$"
|
||||
cache:
|
||||
immutable_ttl: 0 # Module tarballs cached indefinitely
|
||||
mutable_ttl: 600 # Module metadata refreshed after 10 minutes
|
||||
|
||||
|
||||
virtuals:
|
||||
helm-all:
|
||||
|
||||
Reference in New Issue
Block a user