From 71e9eaf9c25ea3423f87aee3def47b5c4eca3112 Mon Sep 17 00:00:00 2001 From: Aria Li Date: Wed, 29 Jun 2022 11:00:01 -0700 Subject: [PATCH] (maint) Enable to install from nightly repo for Ubuntu 22.04 for task beaker tests Also, allow commit mesages to begin with FM- for internal modules tickets --- rakelib/commits.rake | 3 ++- task_spec/spec/acceptance/init_spec.rb | 12 +++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/rakelib/commits.rake b/rakelib/commits.rake index a900ee24..d25948b9 100644 --- a/rakelib/commits.rake +++ b/rakelib/commits.rake @@ -7,11 +7,12 @@ task(:commits) do %x{git log --no-merges --pretty=%s #{commit_range}}.each_line do |commit_summary| # This regex tests for the currently supported commit summary tokens. # The exception tries to explain it in more full. - if /^\((maint|packaging|doc|docs|modules-\d+)\)|revert/i.match(commit_summary).nil? + if /^\((maint|packaging|doc|docs|fm|modules-\d+)\)|revert/i.match(commit_summary).nil? raise "\n\n\n\tThis commit summary didn't match CONTRIBUTING.md guidelines:\n" \ "\n\t\t#{commit_summary}\n" \ "\tThe commit summary (i.e. the first line of the commit message) should start with one of:\n" \ "\t\t(MODULES-) # this is most common and should be a ticket at tickets.puppet.com\n" \ + "\t\t(FM-)\n" \ "\t\t(docs)\n" \ "\t\t(docs)(DOCUMENT-)\n" \ "\t\t(packaging)\n" diff --git a/task_spec/spec/acceptance/init_spec.rb b/task_spec/spec/acceptance/init_spec.rb index f3c89c7b..22dd8606 100644 --- a/task_spec/spec/acceptance/init_spec.rb +++ b/task_spec/spec/acceptance/init_spec.rb @@ -76,9 +76,15 @@ def target_platform end # Try to install an older puppet6 version - results = run_task('puppet_agent::install', 'target', { 'collection' => 'puppet6', - 'version' => puppet_6_version, - 'stop_service' => true }) + results = if %r{ubuntu-22.04}.match?(target_platform) + run_task('puppet_agent::install', 'target', { 'collection' => 'puppet6_nightly', + 'version' => puppet_6_version, + 'stop_service' => true }) + else + run_task('puppet_agent::install', 'target', { 'collection' => 'puppet6', + 'version' => puppet_6_version, + 'stop_service' => true }) + end expect(results).to all(include('status' => 'success')) # It installed a version older than latest puppet6