(MODULES-10780) PA 6 to PA 7 upgrade
This PR tests the upgradability to puppet 7 using the puppetlabs-puppet_agent module. Currently it uses the puppet 7 nightly builds, as a puppet7 collection does not exist.
Merge pull request #510 from Dorin-Pleava/MODULES-10780/upgrade_puppe…
…t_7_tests (MODULES-10780) PA 6 to PA 7 upgrade tests
(maint) Remove 'puppet-module-dev' gem dependency
In preparation for the Puppet 7 release, the
`puppet-module-posix-dev-r2.7` and `puppet-module-posix-dev-r2.7` gems
had to be removed from `Gemfile` due to the following dependency error:
`puppet-module-posix-dev-r2.7` depends on
`puppet_litmus` which depends on
`bolt` which depends on
`puppet` which is locked to a version below 7
Also added the needed gems that were lost in the above removal process
with their respective uniformised version constraints.(maint) Fix tests failing on Windows
Line endings mismatch (`\n` vs `\r\n`) in `*.erb` files caused test failures when asserting content of generated puppet catalog. This is solved by updating the `.gitatributes` file accordingly. Some paths got expanded to Windows paths (starting with drive letter such as `C:\`) and was causing test failures because of incorrect expectation.
This commit restricts Rubocop checks by disabling most cops and excluding nonessential paths so that it can be reenabled as a mandatory step in CI. Offences remaining after that were also solved. A future ticket should remove these restrictions and clean up the code accordingly.
(MODULES-10800) Add GitHub Actions workflows
Added GitHub Actions workflows for `Static Code Analysis`, `Unit Tests` and `Task Acceptance Tests` that run each time there is a new `pull request` or `git push`. `Unit tests` are also set to run every workday at `05:00:00 UTC`. The `.yaml` config file for `Travis` has been removed.
Merge pull request #509 from luchihoratiu/MODULES-10806
(MODULES-10806) Add Github Actions workflows
(maint) Bump puppet agent versions in acceptance
The first release that included support for Fedora 30 was Puppet Agent version 5.5.16. Before this commit, the tests were using 5.5.14.
Test teardown for Sles wasn't removing `pc_repo.repo`, causing unwanted Puppet Agent version installations.
(MODULES-10813) Extract Write-Log function
Extract Write-Log function as it could be used in other .ps1 scripts
(MODULES-10813) Mismatched versions stops install
When performing a puppet-agent upgrade with PE, the .msi package that will get downloaded by default is the puppet-agent version of the server node. If a different version than the one on the master is requested, and if no pe_repo is configured and available, it will install the version on the master. This PR verifies if the desired version and version from the .msi match. If they do not match the install_puppet.ps1 will fail before installing an unwanted version. This PR also enables downgrading puppet-agent versions on windows if pe_repo and package version from puppet-agent module match. More details in https://tickets.puppetlabs.com/browse/MODULES-10813
(MODULES-10799) Ensure upgradability from puppet 6 to 7
Puppet 7 changed the default digest algorithm to SHA256 in puppetlabs/puppet#8325. This could cause failures when upgrading if remote filebuckets are also enabled. Before performing the upgrade, check if remote filebuckets are enabled and compare the digest algorithms of the agent/server. If they differ, abort the upgrade.
Merge pull request #513 from luchihoratiu/maint-fix-acceptance-tests
(maint) Bump puppet agent version used in acceptance tests and fix them
(MODULES-10813) Add notice to failed CLI runs
When running a puppet agent -t in the CLI that upgrades/downgrades the agent version if the run errores out, the error reason will be outputed.
Merge pull request #511 from GabrielNagy/MODULES-10799/disable-upgrad…
…e-remote-filebuckets
(maint) Fix commit summary check
The `commits` rake task was failing due to the recent branch renaming (master->main) and the GitHub Actions Static Code Analysis job was fetching only the HEAD commit.
(maint) Replace Windows 2019 with 2016 on GitHub Actions
Unit tests seem to be running much faster on Windows 2016 with GitHub Actions than Windows 2019.
Merge pull request #514 from luchihoratiu/maint-github-actions-fixes
Merge pull request #512 from Dorin-Pleava/MODULES-10813/upgrade_versi…
…on_match_msi_and_package_version (MODULES-10813) Mismatched versions stops install
(MODULES-10818) ignore msi_move_locked_files on newer puppet versions
Ignore `msi_move_locked_files` value for puppet-agent >= 5.5.17 for puppet 5 and >= 6.8.0 for puppet 6 as it is no longer needed since in 5.5.17/6.8.0 another solution was implemented in puppet-agent for puppetres.dll: puppetlabs/puppet-agent#1749 msi_move_locked_files also interferes with restart protection implemented in puppet-agent in 5.5.21/6.17.0 for nssm.exe: puppetlabs/puppet-agent#1912
Merge pull request #515 from ciprianbadescu/MODULES-10818/msi_move_lo…
…cked_files (MODULES-10818) ignore `msi_move_locked_files` on newer puppet versions
(MODULES-10818) update README with msi_move_locked_files updates/details
Merge pull request #517 from ciprianbadescu/MODULES-10818/msi-move-lo…
…cked-files-doc (MODULES-10818) update README with msi_move_locked_files updates/details
Merge pull request #519 from mihaibuzgau/main
(MODULES-10850) determine PSScriptRoot if it does not exist
(MODULES-10851) Fix Windows nightly prerequisites check
MODULES-10813 introduced a new powershell script that is executed on every Windows upgrade: `prerequisites_check.ps1`. This script checks whether the version in the MSI matches what `$package_version` we want to install. To install a nightly build, the user would pass something like `7.0.0.463.gf7e6640e` to `package_version`. This gets munged by the puppet_agent module into `7.0.0.463` which is then given to the `prerequisites_check.ps1` script. It appears that MSI packaging does not discern between released builds and nightly builds, as the versions reported by the MSI package are always of type `MAJOR.MINOR.PATCH`, so the script would compare `7.0.0` with `7.0.0.463`. Change the script to always strip the commit number from the version.
Merge pull request #520 from GabrielNagy/MODULES-10851/fix-nightly-pr…
…erequisites (MODULES-10851) Fix Windows nightly prerequisites check
(MODULES-10822) Rework acceptance tests
Remove pc1 to puppet5 upgrade test, and update acceptance Gemfile to use voxpupuli/beaker-puppet#master.
(MODULES-10822) Fix teardown on Windows
Uninstalling puppet-agent after it has been upgraded can leave orphaned files on the system. We encountered this when upgrading from 5.5.16 to 5.5.21, the difference being that the latter no longer ships with curl.exe. This made the upgrade keep curl.exe from the 5.5.16 installation, and when uninstalling 5.5.21, the executable and other libraries would still be there. To fix this, remove the entire installation directory after uninstalling puppet-agent.
Merge pull request #516 from GabrielNagy/rework-acceptance
(MODULES-10822) Rework acceptance tests
(MODULES-10815) Add Slack notification job
This commit adds a job to the `[Daily] Unit Tests with nightly Puppet gem` workflow that notifies us the conclusion of it via Slack.
Merge pull request #518 from luchihoratiu/MODULES-10815-add-slack-not…
…ification-job (MODULES-10815) Add Slack notification job
Merge pull request #521 from GabrielNagy/4.2.0_release
(MODULES-10840) Release prep for 4.2.0