Skip to content

Commit

Permalink
(maint) Enable to install from nightly repo for Ubuntu 22.04 for task…
Browse files Browse the repository at this point in the history
… beaker tests

Also, allow commit mesages to begin with FM-<digits> for internal modules tickets
  • Loading branch information
AriaXLi committed Jun 29, 2022
1 parent 3a22b68 commit 71e9eaf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion rakelib/commits.rake
Expand Up @@ -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-<digits>) # this is most common and should be a ticket at tickets.puppet.com\n" \
"\t\t(FM-<digits>)\n" \
"\t\t(docs)\n" \
"\t\t(docs)(DOCUMENT-<digits>)\n" \
"\t\t(packaging)\n"
Expand Down
12 changes: 9 additions & 3 deletions task_spec/spec/acceptance/init_spec.rb
Expand Up @@ -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
Expand Down

0 comments on commit 71e9eaf

Please sign in to comment.