Skip to content

Commit

Permalink
Add Arch Linux support
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Dec 5, 2021
1 parent f6dbfa5 commit 22ff65d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/puppet_metadata/beaker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class << self
def os_release_to_setfile(os, release, use_fqdn: false, pidfile_workaround: false)
return unless os_supported?(os)

release = 'rolling' if ['Gentoo', 'Archlinux'].include?(os)
name = "#{os.downcase}#{release.tr('.', '')}-64"

options = {}
Expand All @@ -65,7 +66,7 @@ def os_release_to_setfile(os, release, use_fqdn: false, pidfile_workaround: fals
# Return whether a Beaker setfile can be generated for the given OS
# @param [String] os The operating system
def os_supported?(os)
['CentOS', 'Fedora', 'Debian', 'Ubuntu'].include?(os)
['CentOS', 'Fedora', 'Debian', 'Ubuntu', 'Archlinux'].include?(os)
end

private
Expand Down
3 changes: 2 additions & 1 deletion lib/puppet_metadata/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ def github_actions
def beaker_setfiles(use_fqdn: false, pidfile_workaround: false)
operatingsystems.each do |os, releases|
next unless PuppetMetadata::Beaker.os_supported?(os)
releases&.each do |release|
real_releases = ['Gentoo', 'Archlinux'].include?(os) ? ['rolling'] : releases
real_releases&.each do |release|
setfile = PuppetMetadata::Beaker.os_release_to_setfile(os, release, use_fqdn: use_fqdn, pidfile_workaround: pidfile_workaround)
yield setfile if setfile
end
Expand Down

0 comments on commit 22ff65d

Please sign in to comment.