Skip to content

Commit 850929e

Browse files
(PE-42498) Update to support Bolt v5
1 parent 67899f0 commit 850929e

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

.github/workflows/test-add-compiler-matrix.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ jobs:
3232
BOLT_GEM: true
3333
BOLT_DISABLE_ANALYTICS: true
3434
LANG: en_US.UTF-8
35+
PUPPET_FORGE_TOKEN: ${{ secrets.PUPPET_FORGE_API_TOKEN }}
36+
BUNDLE_RUBYGEMS___PUPPETCORE__PUPPET__COM: forge-key:${{ secrets.PUPPET_FORGE_API_TOKEN }}
3537
strategy:
3638
fail-fast: false
3739
matrix:

Gemfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,17 @@ group :release_prep do
5252
gem "puppetlabs_spec_helper", '~> 6.0', require: false
5353
end
5454

55-
puppet_version = ENV['PUPPET_GEM_VERSION']
56-
facter_version = ENV['FACTER_GEM_VERSION']
57-
hiera_version = ENV['HIERA_GEM_VERSION']
58-
5955
gems = {}
6056

61-
gems['puppet'] = location_for(puppet_version)
57+
#bolt_version = ENV.fetch('BOLT_GEM_VERSION', nil)
58+
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['bolt'] = [bolt_version || '~> 5.0', { require: false, source: 'https://rubygems-puppetcore.puppet.com' }]
63+
else
64+
#gems['bolt'] = location_for(bolt_version)
65+
end
6266

6367
# If facter or hiera versions have been specified via the environment
6468
# variables

functions/assert_supported_bolt_version.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
function peadm::assert_supported_bolt_version (
77
# No arguments
88
) >> Struct[{ 'supported' => Boolean }] {
9-
$supported_bolt_version = '>= 3.17.0 < 5.0.0'
9+
$supported_bolt_version = '>= 3.17.0 < 6.0.0'
1010
$supported = (peadm::bolt_version() =~ SemVerRange($supported_bolt_version))
1111
# lint:ignore:strict_indent
1212
unless $supported {

0 commit comments

Comments
 (0)