Skip to content

Commit e651b15

Browse files
committed
Restrict bolt dependency to development group
Commit 5a63923 added a hard dependency on bolt, but it is only needed when running task acceptance tests. Restore the GEM_BOLT conditional and make the Gemfile unmanaged until this can be sorted out in the pdk templates.
1 parent 98b2860 commit e651b15

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.sync.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ Gemfile:
3838
- gem: voxpupuli-acceptance
3939
version: '~> 3'
4040

41+
Gemfile:
42+
unmanaged: true
4143
.github/workflows/release.yml:
4244
unmanaged: false
4345
.github/workflows/release_prep.yml:

Gemfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ def print_gem_statement_for(gems)
3535
end
3636
end
3737

38+
bolt_gem_version = ENV.fetch('BOLT_GEM_VERSION', nil)
39+
3840
group :development do
3941
gem "json", '= 2.6.1', require: false if Gem::Requirement.create(['>= 3.1.0', '< 3.1.3']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
4042
gem "json", '= 2.6.3', require: false if Gem::Requirement.create(['>= 3.2.0', '< 4.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
@@ -69,6 +71,9 @@ group :development do
6971
gem "beaker-module_install_helper", require: false
7072
gem "beaker-puppet_install_helper", require: false
7173
gem "nokogiri", require: false
74+
# We are overriding the default PDK template's beaker logic in order to constrain
75+
# bolt to development group
76+
gem "bolt", *location_for(bolt_gem_version, nil, {source: gemsource_puppetcore}) if ENV["GEM_BOLT"]
7277
gem "beaker-task_helper", '~> 1.9', require: false if ENV["GEM_BOLT"]
7378
end
7479
group :development, :release_prep do
@@ -86,12 +91,10 @@ group :system_tests do
8691
end
8792

8893
gems = {}
89-
bolt_version = ENV.fetch('BOLT_GEM_VERSION', nil)
9094
puppet_version = ENV.fetch('PUPPET_GEM_VERSION', nil)
9195
facter_version = ENV.fetch('FACTER_GEM_VERSION', nil)
9296
hiera_version = ENV.fetch('HIERA_GEM_VERSION', nil)
9397

94-
gems['bolt'] = location_for(bolt_version, nil, { source: gemsource_puppetcore })
9598
gems['puppet'] = location_for(puppet_version, nil, { source: gemsource_puppetcore })
9699
gems['facter'] = location_for(facter_version, nil, { source: gemsource_puppetcore })
97100
gems['hiera'] = location_for(hiera_version, nil, {}) if hiera_version

0 commit comments

Comments
 (0)