Skip to content

Commit d84e7d7

Browse files
Move test to "integration"
Signed-off-by: Gavin Didrichsen <[email protected]>
1 parent 6682e03 commit d84e7d7

File tree

3 files changed

+12
-41
lines changed

3 files changed

+12
-41
lines changed

.github/workflows/puppetcore.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

Gemfile

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,20 @@ facter_version = ENV['FACTER_GEM_VERSION']
5252
hiera_version = ENV['HIERA_GEM_VERSION']
5353

5454
gems = {}
55+
puppet_version = ENV.fetch('PUPPET_GEM_VERSION', nil)
56+
facter_version = ENV.fetch('FACTER_GEM_VERSION', nil)
57+
hiera_version = ENV.fetch('HIERA_GEM_VERSION', nil)
5558

56-
gems['puppet'] = location_for(puppet_version)
57-
58-
# If facter or hiera versions have been specified via the environment
59-
# variables
59+
# If PUPPET_FORGE_TOKEN is set then use authenticated source for both puppet and facter, since facter is a transitive dependency of puppet
60+
# Otherwise, do as before and use location_for to fetch gems from the default source
61+
if !ENV['PUPPET_FORGE_TOKEN'].to_s.empty?
62+
gems['puppet'] = [puppet_version || '~> 8.11', { require: false, source: 'https://rubygems-puppetcore.puppet.com' }]
63+
gems['facter'] = [facter_version || '~> 4.0', { require: false, source: 'https://rubygems-puppetcore.puppet.com' }]
64+
else
65+
gems['puppet'] = location_for(puppet_version)
66+
gems['facter'] = location_for(facter_version) if facter_version
67+
end
6068

61-
gems['facter'] = location_for(facter_version) if facter_version
6269
gems['hiera'] = location_for(hiera_version) if hiera_version
6370

6471
gems.each do |gem_name, gem_params|
File renamed without changes.

0 commit comments

Comments
 (0)