From 22ff65dfafb8e3571952502580e7666947643ccc Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Sat, 19 Dec 2020 19:57:40 +0100 Subject: [PATCH] Add Arch Linux support --- lib/puppet_metadata/beaker.rb | 3 ++- lib/puppet_metadata/metadata.rb | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/puppet_metadata/beaker.rb b/lib/puppet_metadata/beaker.rb index fe212c6..fee6765 100644 --- a/lib/puppet_metadata/beaker.rb +++ b/lib/puppet_metadata/beaker.rb @@ -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 = {} @@ -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 diff --git a/lib/puppet_metadata/metadata.rb b/lib/puppet_metadata/metadata.rb index c0c229e..2928ac9 100644 --- a/lib/puppet_metadata/metadata.rb +++ b/lib/puppet_metadata/metadata.rb @@ -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