51 changes: 2 additions & 49 deletions .github/workflows/daily_unit_tests_with_nightly_puppet_gem.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,58 +4,11 @@ name: '[Daily] Unit Tests with nightly Puppet gem'
on:
schedule:
- cron: '0 5 * * 1-5'
workflow_dispatch:

jobs:
daily_unit_tests_with_nightly_puppet_gem:
name: ${{ matrix.os_type }} / Puppet${{ matrix.puppet_version }} gem / Ruby ${{ matrix.ruby }}
strategy:
matrix:
os: [ 'ubuntu-20.04', 'macos-latest', 'windows-2022' ]
puppet_version: [ 6, 7 ]
include:
- puppet_version: 6
ruby: 2.5
- puppet_version: 7
ruby: 2.7

- os: 'ubuntu-20.04'
os_type: 'Linux'
env_set_cmd: 'export '
gem_file: 'puppet-latest.gem'
- os: 'macos-latest'
os_type: 'macOS'
env_set_cmd: 'export '
gem_file: 'puppet-latest-universal-darwin.gem'
- os: 'windows-2022'
os_type: 'Windows'
env_set_cmd: '$env:'
gem_file: 'puppet-latest-x64-mingw32.gem'

runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install ruby version ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}

- name: Install the latest nightly build of puppet${{ matrix.puppet_version }} gem
run: |
curl https://nightlies.puppet.com/downloads/gems/puppet${{ matrix.puppet_version }}-nightly/${{ matrix.gem_file }} --output puppet.gem --location
gem install puppet.gem -N
- name: Prepare testing environment with bundler
run: |
git config --global core.longpaths true
bundle config set system 'true'
bundle config set --local without 'release'
${{ matrix.env_set_cmd }}PUPPET_GEM_VERSION=$(ruby -e 'puts /puppet\s+\((.+)\)/.match(`gem list -eld puppet`)[1]')
bundle update --jobs 4 --retry 3
- name: Run unit tests
run: bundle exec rake parallel_spec
uses: "puppetlabs/phoenix-github-actions/.github/workflows/unit_tests_with_nightly_puppet_gem.yaml@main"

notify-via-slack:
name: Notify workflow conclusion via Slack
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/task_acceptance_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
os: [ 'centos-7', 'ubuntu-20.04', 'rocky-8' ]

env:
ruby_version: 2.5
ruby_version: '3.1'
GEM_BOLT: true
BEAKER_debug: true
BEAKER_set: docker/${{ matrix.os }}
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/unit_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Unit Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
Nightly:
uses: "puppetlabs/phoenix-github-actions/.github/workflows/unit_tests_with_nightly_puppet_gem.yaml@main"

Released:
uses: "puppetlabs/phoenix-github-actions/.github/workflows/unit_tests_with_released_puppet_gem.yaml@main"
65 changes: 0 additions & 65 deletions .github/workflows/unit_tests_with_nightly_puppet_gem.yaml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/unit_tests_with_released_puppet_gem.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ spec/default_facts.yml:
spec/spec_helper.rb:
unmanaged: true
Rakefile:
changelog_since_tag: 'v4.12.1'
changelog_since_tag: 'v4.13.0'
43 changes: 28 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,38 @@

All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).

## [v4.13.0](https://github.com/puppetlabs/puppetlabs-puppet_agent/tree/v4.13.0) (2023-03-21)
## [v4.14.0](https://github.com/puppetlabs/puppetlabs-puppet_agent/tree/v4.14.0) (2023-04-28)

[Full Changelog](https://github.com/puppetlabs/puppetlabs-puppet_agent/compare/v4.12.1...v4.13.0)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-puppet_agent/compare/v4.13.0...v4.14.0)

### Added

- \(PA-5242\) Updates install tasks for puppet8 [\#642](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/642) ([mhashizume](https://github.com/mhashizume))
- \(MODULES-11365\) Enable rspec tests on Ruby 3.2 [\#641](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/641) ([mhashizume](https://github.com/mhashizume))
- \(MODULES-11392\) Add Puppet 7 to 8 upgrade test [\#639](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/639) ([mhashizume](https://github.com/mhashizume))
- \(MODULES-11361\) Updates legacy facts [\#637](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/637) ([mhashizume](https://github.com/mhashizume))
- \(MODULES-11361\) Puppet 8 compatibility work [\#636](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/636) ([mhashizume](https://github.com/mhashizume))
- \(MODULES-11348\) Replace lsbdistcodename with os.distro.codename [\#634](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/634) ([AriaXLi](https://github.com/AriaXLi))
- run task/plan: Allow noop and environment option [\#632](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/632) ([bastelfreak](https://github.com/bastelfreak))
- \(maint\) replace legacy validate function with datatype [\#628](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/628) ([bastelfreak](https://github.com/bastelfreak))
- \(MODULES-11346\) Update dependency for APT module [\#624](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/624) ([MartyEwings](https://github.com/MartyEwings))
- \(FM-8983\) Add Fedora 36 [\#619](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/619) ([joshcooper](https://github.com/joshcooper))
- Support for Linux Mint 21 [\#616](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/616) ([luckyraul](https://github.com/luckyraul))
- \(FM-8969\) Add support for macOS 12 ARM [\#615](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/615) ([joshcooper](https://github.com/joshcooper))
- Add support for absolute\_source in puppet\_agent::install task [\#484](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/484) ([scbjans](https://github.com/scbjans))
- \(PA-5336\) Update tests and tasks for puppet8 [\#650](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/650) ([mhashizume](https://github.com/mhashizume))

## [v4.14.0] - 2023-04-28

### Summary

Add support for Puppet 8.

### Features

- (PA-5336) Update tests and tasks for puppet8 ([#650](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/650))

## [v4.13.0] - 2023-03-21

### Summary

Add support for Puppet 8 nightlies, additional platform support, new features for run task/plan and install task.

### Features

- Add support for absolute_source in puppet_agent::install task ([#484](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/484))
- (FM-8969) Add support for macOS 12 ARM ([#615](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/615))
- Support for Linux Mint 21 ([#616](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/616))
- (FM-8983) Add Fedora 36 ([#619](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/619))
- run task/plan: Allow noop and environment option ([#632](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/632/))
- (MODULES-11361) Puppet 8 compatibility work ([#636](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/636))

## [v4.12.1] - 2022-07-13

Expand Down
25 changes: 25 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
## [v4.14.0] - 2023-04-28

### Summary

Add support for Puppet 8.

### Features

- (PA-5336) Update tests and tasks for puppet8 ([#650](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/650))

## [v4.13.0] - 2023-03-21

### Summary

Add support for Puppet 8 nightlies, additional platform support, new features for run task/plan and install task.

### Features

- Add support for absolute_source in puppet_agent::install task ([#484](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/484))
- (FM-8969) Add support for macOS 12 ARM ([#615](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/615))
- Support for Linux Mint 21 ([#616](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/616))
- (FM-8983) Add Fedora 36 ([#619](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/619))
- run task/plan: Allow noop and environment option ([#632](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/632/))
- (MODULES-11361) Puppet 8 compatibility work ([#636](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/636))

## [v4.12.1] - 2022-07-13

### Summary
Expand Down
6 changes: 3 additions & 3 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ The version of puppet-agent to install (defaults to latest when no agent is inst

##### `collection`

Data type: `Optional[Enum[puppet7, puppet, puppet7-nightly, puppet8-nightly, puppet-nightly]]`
Data type: `Optional[Enum[puppet7, puppet8, puppet, puppet7-nightly, puppet8-nightly, puppet-nightly]]`

The Puppet collection to install from (defaults to puppet, which maps to the latest collection released)

Expand Down Expand Up @@ -963,7 +963,7 @@ The version of puppet-agent to install

##### `collection`

Data type: `Optional[Enum[puppet7, puppet, puppet7-nightly, puppet8-nightly, puppet-nightly]]`
Data type: `Optional[Enum[puppet7, puppet8, puppet, puppet7-nightly, puppet8-nightly, puppet-nightly]]`

The Puppet collection to install from (defaults to puppet, which maps to the latest collection released)

Expand Down Expand Up @@ -1031,7 +1031,7 @@ The version of puppet-agent to install

##### `collection`

Data type: `Optional[Enum[puppet7, puppet, puppet7-nightly, puppet8-nightly, puppet-nightly]]`
Data type: `Optional[Enum[puppet7, puppet8, puppet, puppet7-nightly, puppet8-nightly, puppet-nightly]]`

The Puppet collection to install from (defaults to puppet, which maps to the latest collection released)

Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if Bundler.rubygems.find_name('github_changelog_generator').any?
raise "Set CHANGELOG_GITHUB_TOKEN environment variable eg 'export CHANGELOG_GITHUB_TOKEN=valid_token_here'" if Rake.application.top_level_tasks.include? "changelog" and ENV['CHANGELOG_GITHUB_TOKEN'].nil?
config.user = "#{changelog_user}"
config.project = "#{changelog_project}"
config.since_tag = "v4.12.1"
config.since_tag = "v4.13.0"
config.future_release = "#{changelog_future_release}"
config.exclude_labels = ['maintenance']
config.header = "# Change log\n\nAll notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org)."
Expand Down
4 changes: 1 addition & 3 deletions acceptance/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ def require_master_collection(args)
if args.is_a?(Symbol)
collection = args.to_s

# Dirty, temporary workaround for when we have puppet8 agent nightlies but not server nightlies
# Once we have puppet8 server releases, remove the second conditional
unless collection.include?(server_collection) || collection == 'puppet8-nightly'
unless collection.include?(server_collection)
skip_test(msg_prefix + "\nThis test requires a puppetserver from the #{collection} collection. Skipping the test ...")
end

Expand Down
9 changes: 1 addition & 8 deletions acceptance/pre_suite/00_master_setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,7 @@

step 'Install puppetserver' do
# puppetserver is distributed in "release streams" instead of collections.

# Dirty, temporary workaround for when we have puppet8 agent nightlies but not server nightlies
# Once we have puppet8 server releases, pare down to just what's in the else statement
opts = if install_options[:puppet_collection].include?('nightly')
{ release_stream: 'puppet7' }
else
{ release_stream: install_options[:puppet_collection] }
end
opts = { release_stream: install_options[:puppet_collection] }

install_puppetserver_on(master, opts)

Expand Down
12 changes: 2 additions & 10 deletions acceptance/tests/test_upgrade_puppet7_to_puppet8.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,10 @@
puppet_testing_environment = new_puppet_testing_environment

step 'Create new site.pp with upgrade manifest' do
# In previous versions of this manifest, Windows and macOS downloaded the package with the latest SHA
# Due to issues with versioning Puppet 8 in its prerelease stage, we'll use auto for now.
manifest = <<-PP
node default {
if $facts['os']['family'] in ['solaris', 'aix'] {
if $facts['os']['family'] =~ /^(?i:windows|solaris|aix|darwin)$/ {
$_package_version = '#{latest_version}'
} elsif $facts['os']['family'] in ['darwin', 'windows'] {
$_package_version = 'auto'
} else {
$_package_version = 'latest'
}
Expand Down Expand Up @@ -53,11 +49,7 @@ class { puppet_agent:
agents_only.each do |agent|
on(agent, puppet('agent -t --debug'), acceptable_exit_codes: 2)
wait_for_installation_pid(agent)
# The aio_agent_version fact reports the wrong version for puppet8 prerelease nightlies
# Use this statement instead after the Puppet 8.0.0 release
# assert(puppet_agent_version_on(agent) =~ %r{^8\.\d+\.\d+.*})
puppet_version = on(agent, puppet('--version')).output
assert(puppet_version.start_with?('8.'))
assert(puppet_agent_version_on(agent) =~ %r{^8\.\d+\.\d+.*})
end
end

Expand Down
Loading