Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
daily_unit_tests_with_nightly_puppet_gem:
name: ${{ matrix.os_type }} / Puppet${{ matrix.puppet_version }} gem / Ruby ${{ matrix.ruby }}
name: ${{ matrix.os_type }} / Puppet${{ matrix.puppet_version }} gem / Ruby ${{ matrix.ruby }}
strategy:
matrix:
os: [ 'ubuntu-18.04', 'macos-10.15', 'windows-2016' ]
Expand Down Expand Up @@ -47,11 +47,14 @@ jobs:
run: |
curl http://nightlies.puppet.com/downloads/gems/puppet${{ matrix.puppet_version }}-nightly/${{ matrix.gem_file }} --output puppet.gem
gem install puppet.gem -N
- name: Prepare testing environment with bundler
run: |
git config --global core.longpaths true
bundle config set system 'true'
${{ 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

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/static_code_analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ jobs:
ruby-version: ${{ env.ruby_version }}

- name: Prepare testing environment with bundler
run: bundle update --jobs 4 --retry 3
run: |
git config --global core.longpaths true
bundle update --jobs 4 --retry 3
- name: Run commits check
run: bundle exec rake commits
Expand Down
8 changes: 6 additions & 2 deletions .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-18.04' ]

env:
ruby_version: 2.4
ruby_version: 2.5
GEM_BOLT: true
BEAKER_debug: true
BEAKER_set: docker/${{ matrix.os }}
Expand All @@ -38,6 +38,10 @@ jobs:

- name: Prepare testing environment with bundler
run: |
git config --global core.longpaths true
bundle update --jobs 4 --retry 3
- name: Run task acceptance tests
run: cd task_spec && bundle exec rake task_acceptance
run: |
cd task_spec
bundle exec rake task_acceptance
3 changes: 3 additions & 0 deletions .github/workflows/unit_tests_with_nightly_puppet_gem.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,13 @@ jobs:
run: |
curl http://nightlies.puppet.com/downloads/gems/puppet${{ matrix.puppet_version }}-nightly/${{ matrix.gem_file }} --output puppet.gem
gem install puppet.gem -N
- name: Prepare testing environment with bundler
run: |
git config --global core.longpaths true
bundle config set system 'true'
${{ 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
5 changes: 3 additions & 2 deletions .github/workflows/unit_tests_with_released_puppet_gem.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
unit_tests_with_released_puppet_gem:
name: ${{ matrix.os_type }} / Puppet${{ matrix.puppet_version }} gem / Ruby ${{ matrix.ruby }}
name: ${{ matrix.os_type }} / Puppet${{ matrix.puppet_version }} gem / Ruby ${{ matrix.ruby }}
strategy:
matrix:
os: [ 'ubuntu-18.04', 'macos-10.15', 'windows-2016' ]
Expand All @@ -28,7 +28,6 @@ jobs:
os_type: 'Windows'

runs-on: ${{ matrix.os }}
continue-on-error: true
env:
PUPPET_GEM_VERSION: ~> ${{ matrix.puppet_version }}.0
steps:
Expand All @@ -42,6 +41,8 @@ jobs:

- name: Prepare testing environment with bundler
run: |
git config --global core.longpaths true
bundle update --jobs 4 --retry 3
- name: Run unit tests
run: bundle exec rake parallel_spec
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,20 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [4.2.0] - 2020-10.30
## [4.3.0] - 2020-12-14

### Summary
Task support for puppet7 collection. Use correct AIX packages when upgrading.

### Features

- ([MODULES-10873](https://tickets.puppetlabs.com/browse/MODULES-10873)) Add support for puppet7 collection ([#524](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/524))

### Bug fixes

- ([MODULES-10878](https://tickets.puppetlabs.com/browse/MODULES-10878)) Use correct packages when upgrading AIX ([#527](https://github.com/puppetlabs/puppetlabs-puppet_agent/pull/527))

## [4.2.0] - 2020-10-30

### Summary
Various Windows fixes and additions to facilitate upgrading to Puppet 7.
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ group :development do
gem "puppet-module-posix-default-r#{minor_version}", :require => false, :platforms => "ruby"
gem "puppet-module-win-default-r#{minor_version}", :require => false, :platforms => ["mswin", "mingw", "x64_mingw"]
gem "rspec-puppet", :require => true, git: "https://github.com/rodjek/rspec-puppet", tag: "v2.7.9"
gem 'rspec-expectations', '~> 3.9.0', :require => false
gem "json_pure", '<= 2.0.1', :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
gem "fast_gettext", '1.1.0', :require => false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
gem "fast_gettext", :require => false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
Expand Down
2 changes: 1 addition & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ The architecture version you wish to install. Defaults to `$::facts['architectur

##### `collection`

The Puppet Collection to track, should be one of `puppet5` or `puppet6`. Puppet collections contain the latest agents included in the collection's series, so `puppet5` will pull in the most recent Puppet 5 release (for example: 5.5.10) as also will `puppet6` for Puppet 6 (for example: 6.3.0). **This parameter is required for installations not connected to Puppet Enterprise**
The Puppet Collection to track, should be one of `puppet5`, `puppet6` or `puppet7`. Puppet collections contain the latest agents included in the collection's series, so `puppet5` will pull in the most recent Puppet 5 release (for example: 5.5.10) as also will `puppet6` for Puppet 6 (for example: 6.3.0). **This parameter is required for installations not connected to Puppet Enterprise**
``` puppet
collection => 'puppet6'
```
Expand Down
2 changes: 1 addition & 1 deletion acceptance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ It also installs this module (from your local checkout) and its dependencies.
The versions of puppet-agent and puppetserver installed on the master during
the pre-suite can be controlled in two ways:

- set `MASTER_COLLECTION` to 'pc1' (for puppet 4), 'puppet5', or 'puppet6' to
- set `MASTER_COLLECTION` to 'pc1' (for puppet 4), 'puppet5', 'puppet6', 'puppet7' to
install the latest releases from those streams, or
- set `MASTER_PACKAGE_VERSION` to a specific version of puppet-agent (like
'5.5.10') to install that agent package and a compatible puppetserver
Expand Down
2 changes: 1 addition & 1 deletion acceptance/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def collection_cmp(col_1, col_2)
# end
#
# test_name 'an agent upgrade test' do
# require_master_collection max: 'puppet6'
# require_master_collection max: 'puppet7'
# end
#
# The first restriction will only run the test if the master's puppetserver is from
Expand Down
5 changes: 4 additions & 1 deletion docker/bin/helpers/run-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ case $puppet_major in
6)
to_collection=puppet6
;;
7)
to_collection=puppet7
;;
*)
echo "Invalid version supplied" 1>&2
exit 1
esac
FACTER_to_version=${1:-6.2.0} FACTER_to_collection=${to_collection} /opt/puppetlabs/puppet/bin/puppet apply --debug --modulepath /tmp/modules /tmp/upgrade.pp
FACTER_to_version=${1:-6.2.0} FACTER_to_collection=${to_collection} /opt/puppetlabs/puppet/bin/puppet apply --debug --trace --modulepath /tmp/modules /tmp/upgrade.pp
# Make e.g. `puppet --version` work out of the box.
PATH=/opt/puppetlabs/bin:$PATH \
read -p "Explore the upgraded container? [y/N]: " choice && \
Expand Down
8 changes: 6 additions & 2 deletions docker/centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,17 @@ RUN if [[ ${before} == 1.* ]]; then \
wget -O puppet-pc1.rpm http://yum.puppet.com/puppetlabs-release-pc1-el-7.noarch.rpm && \
rpm -i puppet-pc1.rpm; \
elif [[ ${before} == 5.* ]]; then \
echo Installing PC1 repo; \
echo Installing puppet5 repo; \
wget -O puppet5.rpm http://yum.puppet.com/puppet5-release-el-7.noarch.rpm && \
rpm -i puppet5.rpm; \
elif [[ ${before} == 6.* ]]; then \
echo Installing PC1 repo; \
echo Installing puppet6 repo; \
wget -O puppet6.rpm http://yum.puppet.com/puppet6-release-el-7.noarch.rpm && \
rpm -i puppet6.rpm; \
elif [[ ${before} == 7.* ]]; then \
echo Installing puppet7 repo; \
wget -O puppet7.rpm http://yum.puppet.com/puppet7-release-el-7.noarch.rpm && \
rpm -i puppet7.rpm; \
else echo no; \
fi

Expand Down
6 changes: 4 additions & 2 deletions docker/centos/Dockerfile.versions
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ RUN yum update -y \
&& yum install -y wget git \
&& yum clean all

# Install several repos: PC1 (puppet 4), puppet 5, and puppet 6.
# Install several repos: PC1 (puppet 4), puppet 5, puppet 6, and puppet7.
RUN wget -O puppet-pc1.rpm http://yum.puppet.com/puppetlabs-release-pc1-el-7.noarch.rpm && \
rpm -i puppet-pc1.rpm --force --replacefiles && \
wget -O puppet5.rpm http://yum.puppet.com/puppet5-release-el-7.noarch.rpm && \
rpm -i puppet5.rpm --force --replacefiles && \
wget -O puppet6.rpm http://yum.puppet.com/puppet6-release-el-7.noarch.rpm && \
rpm -i puppet6.rpm --force --replacefiles --nodeps
rpm -i puppet6.rpm --force --replacefiles --nodeps && \
wget -O puppet7.rpm http://yum.puppet.com/puppet7-release-el-7.noarch.rpm && \
rpm -i puppet7.rpm --force --replacefiles --nodeps

# Print out available package versions for puppet-agent. If a specific version
# is desired, pass that in with e.g. `--build-arg before=1.1.1`
Expand Down
6 changes: 5 additions & 1 deletion docker/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ COPY $0 /tmp/Dockerfile
ARG before=1.10.14
LABEL before=${before}

# Install proper FROM repo: PC1 (puppet 4), puppet 5, or puppet 6.
# Install proper FROM repo: PC1 (puppet 4), puppet 5, puppet 6, or puppet7.
RUN if (echo "$before" | grep -Eq ^1\..*$) ; then \
echo Installing PC1 repo; \
wget -O puppet-pc1.deb http://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb && \
Expand All @@ -53,6 +53,10 @@ RUN if (echo "$before" | grep -Eq ^1\..*$) ; then \
echo Installing puppet6 repo; \
wget -O puppet6.deb http://apt.puppetlabs.com/puppet6-release-xenial.deb && \
dpkg -i puppet6.deb; \
elif (echo "$before" | grep -Eq ^7\..*$) ; then \
echo Installing puppet7 repo; \
wget -O puppet7.deb http://apt.puppetlabs.com/puppet7-release-xenial.deb && \
dpkg -i puppet7.deb; \
else echo no; \
fi

Expand Down
2 changes: 2 additions & 0 deletions docker/ubuntu/Dockerfile.versions
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ RUN wget -O puppet-pc1.deb http://apt.puppetlabs.com/puppetlabs-release-pc1-xeni
dpkg -i --force-conflicts puppet5.deb && \
wget -O puppet6.deb http://apt.puppetlabs.com/puppet6-release-xenial.deb && \
dpkg -i --force-conflicts puppet6.deb && \
wget -O puppet7.deb http://apt.puppetlabs.com/puppet7-release-xenial.deb && \
dpkg -i --force-conflicts puppet7.deb && \
apt-get update

# Print out available package versions for puppet-agent. If a specific version
Expand Down
2 changes: 1 addition & 1 deletion manifests/install/solaris.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# The following are expected to be available in the solaris_install.sh.erb template:
$adminfile = '/opt/puppetlabs/packages/solaris-noask'
$sourcefile = "/opt/puppetlabs/packages/${_unzipped_package_name}"
# Starting with puppet6 collections we no longer carry the mcollective service
# Starting with puppet6 and up collections we no longer carry the mcollective service
if $::puppet_agent::collection != 'PC1' and $::puppet_agent::collection != 'puppet5' {
$service_names = delete($::puppet_agent::service_names, 'mcollective')
} else {
Expand Down
33 changes: 19 additions & 14 deletions manifests/osfamily/aix.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,39 @@
# in puppet versions later than 4 we began using single agent packages for
# multiple version of AIX. The support sequence is as follows:
#
# puppet 4:
# puppet 5 up to 5.5.22:
# * AIX verison 6.1 < aix-6.1-power package
# * AIX verison 7.1 < aix-7.1-power package
# * AIX verison 7.2 < aix-7.1-power package
#
# puppet 5:
# * AIX verison 6.1 < aix-6.1-power package
# puppet 6 up to 6.19.1 and puppet 7.0.0 (not released in PE):
# * AIX verison 6.1 < aix-7.1-power package
# * AIX verison 7.1 < aix-7.1-power package
# * AIX verison 7.2 < aix-7.1-power package
#
# puppet 6:
# * AIX verison 6.1 < aix-6.1-power package
# * AIX verison 7.1 < aix-6.1-power package
# * AIX verison 7.2 < aix-6.1-power package
#
# For puppet > 6 everything will now _only_ use the aix-6.1-power packages (i.e. we now only ship
# All other versions will now _only_ use the aix-7.1-power packages (i.e. we now only ship
# one package to support all aix versions).
#
# The following will update the aix_ver_number variable to identify which package to install based
# on puppet collection and version of AIX.
# on puppet collection, package version and AIX version.
$_aix_ver_number = regsubst($::platform_tag,'aix-(\d+\.\d+)-power','\1')
if $_aix_ver_number {
if $::puppet_agent::collection =~ /(PC1|puppet5)/ {
$aix_ver_number = $_aix_ver_number ? {
/^7\.2$/ => '7.1',
default => $_aix_ver_number,
# 5.5.22 is the last puppet5 release that ships AIX 6.1 packages
if versioncmp($::puppet_agent::prepare::package_version, '5.5.22') > 0 {
$aix_ver_number = '7.1'
} else {
$aix_ver_number = $_aix_ver_number ? {
/^7\.2$/ => '7.1',
default => $_aix_ver_number,
}
}
} else {
$aix_ver_number = '6.1'
# 6.19.1 is the last puppet6 release that ships AIX 6.1 packages
$aix_ver_number = versioncmp($::puppet_agent::prepare::package_version, '6.19.1') ? {
1 => '7.1',
default => '6.1'
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class puppet_agent::service{
assert_private()

# Starting with puppet6 collections we no longer carry the mcollective service
# Starting with puppet6 and up collections we no longer carry the mcollective service
if versioncmp("${::clientversion}", '6.0.0') >= 0 {
$_service_names = delete($::puppet_agent::service_names, 'mcollective')
} else {
Expand Down
4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppetlabs-puppet_agent",
"version": "4.2.0",
"version": "4.3.0",
"author": "puppetlabs",
"summary": "Upgrades All-In-One Puppet Agents",
"license": "Apache-2.0",
Expand Down Expand Up @@ -118,7 +118,7 @@
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 4.7.0 < 7.0.0"
"version_requirement": ">= 4.7.0 < 8.0.0"
}
],
"dependencies": [
Expand Down
Loading