Skip to content

Won't work with puppetcore #2

@binford2k

Description

@binford2k

Puppetcore adds a source parameter to the puppet gem with this hooey.

# If PUPPET_FORGE_TOKEN is set then use authenticated source for both puppet and facter, since facter is a transitive dependency of puppet
# Otherwise, do as before and use location_for to fetch gems from the default source
if !ENV['PUPPET_FORGE_TOKEN'].to_s.empty?
  gems['puppet'] = ['~> 8.11', { require: false, source: 'https://rubygems-puppetcore.puppet.com' }]
  gems['facter'] = ['~> 4.11', { require: false, source: 'https://rubygems-puppetcore.puppet.com' }]
else
  gems['puppet'] = location_for(puppet_version)
  gems['facter'] = location_for(facter_version) if facter_version
end

This doesn't yet know how to manage that. I'll probably build a lightweight replacement rules engine so that when replacing source with target take action on parameter matching a given regex.

For example maybe something like

migrate_to_openvox:
  source: puppet
  target: openvox
  actions:
    source: :remove
    match: "/https://rubygems-puppetcore.puppet.com/"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions