Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New beaker helper bolt_supported? to show bolt availability #42

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

traylenator
Copy link
Contributor

@traylenator traylenator commented Apr 28, 2024

Can be used in spec/spec_helper_acceptance.rb as:

if bolt_supported?(host)
  host.install_package('puppet-bolt')
end

bolt_supported returns true or false depending on if a bolt package is available for a particular platform.

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It didn't occur to me to implement this in the support library but I think it makes sense. One question: it doesn't take the Puppet version into account. We have that mostly encoded in puppet_metadata. What do you think about that relationship?

@traylenator
Copy link
Contributor Author

One question: it doesn't take the Puppet version into account. We have that mostly encoded in puppet_metadata. What do you think about that relationship?

There must be a fairly circular dependency between Puppet, Bolt and puppetlab- modules that means bolt and puppet existence must be in close lock. Think I'd worry about it if it happens.... or we know it does happen.

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose it's safe to assume they publish Bolt for Puppet 7 & 8 on a given platform. If they don't, then we'll cross that bridge once we get there.

lib/beaker_puppet_helpers/dsl.rb Outdated Show resolved Hide resolved
lib/beaker_puppet_helpers/dsl.rb Outdated Show resolved Hide resolved
lib/beaker_puppet_helpers/dsl.rb Show resolved Hide resolved
Can be used in `spec/spec_helper_acceptance.rb` as:

```ruby
if bolt_supported(host)
  host.install_package('puppet-bolt')
end
```

bolt_supported returns `true` or `false` depending on if a bolt package
is available for a particular platform.
@traylenator traylenator added the enhancement New feature or request label Apr 30, 2024
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is still running, but looks good

@traylenator traylenator merged commit d3e2c9b into voxpupuli:master Apr 30, 2024
6 checks passed
@traylenator traylenator deleted the bolt_supported branch April 30, 2024 08:50
@traylenator traylenator changed the title New beaker helper bolt_supported to show bolt availability New beaker helper bolt_supported? to show bolt availability May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants