Showing with 1,033 additions and 906 deletions.
  1. +4 −0 .fixtures.yml
  2. +43 −0 .github/workflows/release.yml
  3. +45 −0 .github/workflows/weekly.yml
  4. +0 −2 .rubocop.yml
  5. +37 −31 .sync.yml
  6. +82 −7 .travis.yml
  7. +1 −1 .vscode/extensions.json
  8. +16 −0 CHANGELOG.md
  9. +0 −7 Gemfile
  10. +2 −0 Rakefile
  11. +27 −5 appveyor.yml
  12. +2 −12 lib/puppet/provider/exec/powershell.rb
  13. +10 −7 metadata.json
  14. +22 −0 provision.yaml
  15. +130 −145 spec/acceptance/exec_powershell_spec.rb
  16. +416 −385 spec/acceptance/exec_pwsh_spec.rb
  17. +1 −1 spec/acceptance/files/services.ps1
  18. +0 −10 spec/acceptance/nodesets/centos-7-x64.yml
  19. +0 −10 spec/acceptance/nodesets/debian-8-x64.yml
  20. +0 −18 spec/acceptance/nodesets/default.yml
  21. +0 −12 spec/acceptance/nodesets/docker/centos-7.yml
  22. +0 −11 spec/acceptance/nodesets/docker/debian-8.yml
  23. +0 −12 spec/acceptance/nodesets/docker/ubuntu-14.04.yml
  24. +0 −24 spec/acceptance/nodesets/windows-2003-i386.yml
  25. +0 −24 spec/acceptance/nodesets/windows-2003-x86_64.yml
  26. +0 −24 spec/acceptance/nodesets/windows-2008-x86_64.yml
  27. +0 −24 spec/acceptance/nodesets/windows-2008r2-x86_64.yml
  28. +0 −24 spec/acceptance/nodesets/windows-2012-x86_64.yml
  29. +0 −24 spec/acceptance/nodesets/windows-2012r2-x86_64.yml
  30. +1 −0 spec/fixtures/scripts/install_pwsh/darwin.sh
  31. +18 −0 spec/fixtures/scripts/install_pwsh/debian_10.sh
  32. +18 −0 spec/fixtures/scripts/install_pwsh/debian_8.sh
  33. +18 −0 spec/fixtures/scripts/install_pwsh/debian_9.sh
  34. +8 −0 spec/fixtures/scripts/install_pwsh/rhel.sh
  35. +17 −0 spec/fixtures/scripts/install_pwsh/ubuntu_16.04.sh
  36. +17 −0 spec/fixtures/scripts/install_pwsh/ubuntu_18.04.sh
  37. +7 −0 spec/fixtures/scripts/install_pwsh/windows.ps1
  38. +3 −0 spec/spec_helper.rb
  39. +4 −86 spec/spec_helper_acceptance.rb
  40. +82 −0 spec/spec_helper_acceptance_local.rb
  41. +1 −0 spec/unit/provider/exec/powershell_spec.rb
  42. +1 −0 spec/unit/provider/exec/pwsh_spec.rb
4 changes: 4 additions & 0 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
fixtures:
repositories:
facts: 'https://github.com/puppetlabs/puppetlabs-facts.git'
puppet_agent: 'https://github.com/puppetlabs/puppetlabs-puppet_agent.git'
provision: 'https://github.com/puppetlabs/provision.git'
forge_modules:
pwshlib: "puppetlabs/pwshlib"
symlinks:
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "release"

on:
push:
branches:
- 'release'

jobs:
LitmusAcceptance:
runs-on: self-hosted
strategy:
matrix:
ruby_version: [2.5.x]
puppet_gem_version: [~> 6.0]
platform: [release_checks]
agent_family: ['puppet5', 'puppet6']

steps:
- uses: actions/checkout@v1
- name: Litmus Parallel
uses: puppetlabs/action-litmus_parallel@master
with:
platform: ${{ matrix.platform }}
agent_family: ${{ matrix.agent_family }}
Spec:
runs-on: self-hosted
strategy:
matrix:
check: [parallel_spec, 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop']
ruby_version: [2.5.x]
puppet_gem_version: [~> 5.0, ~> 6.0]
exclude:
- puppet_gem_version: ~> 5.0
check: 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop'
- ruby_version: 2.5.x
puppet_gem_version: ~> 5.0
steps:
- uses: actions/checkout@v1
- name: Spec Tests
uses: puppetlabs/action-litmus_spec@master
with:
puppet_gem_version: ${{ matrix.puppet_gem_version }}
check: ${{ matrix.check }}
45 changes: 45 additions & 0 deletions .github/workflows/weekly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "weekly"

on:
schedule:
- cron: '0 5 * * 1'

jobs:
LitmusAcceptance:
env:
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
HONEYCOMB_DATASET: litmus tests
runs-on: self-hosted
strategy:
matrix:
ruby_version: [2.5.x]
puppet_gem_version: [~> 6.0]
platform: [release_checks]
agent_family: ['puppet5', 'puppet6']

steps:
- uses: actions/checkout@v1
- name: Litmus Parallel
uses: puppetlabs/action-litmus_parallel@master
with:
platform: ${{ matrix.platform }}
agent_family: ${{ matrix.agent_family }}
Spec:
runs-on: self-hosted
strategy:
matrix:
check: [parallel_spec, 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop']
ruby_version: [2.5.x]
puppet_gem_version: [~> 5.0, ~> 6.0]
exclude:
- puppet_gem_version: ~> 5.0
check: 'syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop'
- ruby_version: 2.5.x
puppet_gem_version: ~> 5.0
steps:
- uses: actions/checkout@v1
- name: Spec Tests
uses: puppetlabs/action-litmus_spec@master
with:
puppet_gem_version: ${{ matrix.puppet_gem_version }}
check: ${{ matrix.check }}
2 changes: 0 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,6 @@ Style/BlockComments:
Enabled: false
Style/BlockDelimiters:
Enabled: false
Style/BracesAroundHashParameters:
Enabled: false
Style/CaseEquality:
Enabled: false
Style/CharacterLiteral:
Expand Down
68 changes: 37 additions & 31 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,49 @@
include_todos: true
selected_profile: false
".travis.yml":
global_env:
- HONEYCOMB_WRITEKEY="7f3c63a70eecc61d635917de46bea4e6",HONEYCOMB_DATASET="litmus tests"
deploy_to_forge:
enabled: false
simplecov: true
before_install_pre:
- bash <(curl -s https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.sh) -skip-sudo-check
- 'pwsh -NoProfile -NoLogo -NonInteractive -Command \$PSVersionTable # Output the PowerShell Core version information'
- if [ $BUNDLER_VERSION ]; then
gem install -v $BUNDLER_VERSION bundler --no-rdoc --no-ri;
fi
use_litmus: true
litmus:
provision_list:
- travis_deb
- travis_ub
- travis_el7
includes:
- os: osx
comment: test Mac OSX edition of PowerShell Core on a single job
env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec
rvm: 2.5.3
stage: acceptance
- os: osx
env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec
rvm: 2.5.3
stage: spec
- bundler_args:
os: osx
rvm: 2.5.1
before_script:
- brew update
- brew install openssl
- bundle exec rake spec_prep
script:
- bundle exec rake litmus:acceptance:localhost
stage: acceptance
notifications:
slack:
secure: Yqv+S1Bwz19bor4xu3v7i5rLPzQuwTSZhO5wjsrX+jhKDN5/+e7e53x/v3Onjdrn9rjwFAxwzciAte0MO96xLFjyzWyUSziGur8/v3TcbRnnVQMOnIEj0HfmyLbx1cpxGK9V8MPsWQVAoHCklTtZIsRjMw0PcD8+aVKVF3NcBK4=
appveyor.yml:
use_litmus: true
matrix_extras:
- RUBY_VERSION: 25-x64
ACCEPTANCE: 'yes'
TARGET_HOST: localhost
- RUBY_VERSION: 25-x64
ACCEPTANCE: 'yes'
TARGET_HOST: localhost
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
environment:
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
HONEYCOMB_DATASET: litmus tests
simplecov: true
install_post:
- 'ps: "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri https://github.com/PowerShell/PowerShell/raw/master/tools/install-powershell.ps1 -UseBasicParsing -OutFile install-pwsh.ps1"'
- 'ps: "& ./install-pwsh.ps1"'
- set PATH=%LOCALAPPDATA%\Microsoft\powershell;%PATH%
- pwsh -NoProfile -NoLogo -NonInteractive -Command $PSVersionTable
- powershell -NoProfile -NoLogo -NonInteractive -Command $PSVersionTable
Gemfile:
optional:
":development":
Expand All @@ -36,19 +56,5 @@ Gemfile:
git: https://github.com/skywinder/github-changelog-generator
ref: 20ee04ba1234e9e83eb2ffb5056e23d641c7a018
condition: Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')
required:
':system_tests':
- gem: 'puppet-module-posix-system-r#{minor_version}'
platforms: ruby
- gem: 'puppet-module-win-system-r#{minor_version}'
platforms:
- mswin
- mingw
- x64_mingw
- gem: beaker-testmode_switcher
version: '~> 0.4'
- gem: master_manipulator
- gem: puppet-blacksmith
version: '~> 3.4'
spec/spec_helper.rb:
coverage_report: true
89 changes: 82 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
---
os: linux
dist: xenial
language: ruby
cache: bundler
before_install:
- bash <(curl -s https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.sh) -skip-sudo-check
- pwsh -NoProfile -NoLogo -NonInteractive -Command \$PSVersionTable # Output the PowerShell Core version information
- if [ $BUNDLER_VERSION ]; then gem install -v $BUNDLER_VERSION bundler --no-rdoc --no-ri; fi
- bundle -v
- rm -f Gemfile.lock
- "# Update system gems if requested. This is useful to temporarily workaround troubles in the test runner"
Expand All @@ -18,14 +16,83 @@ script:
- 'SIMPLECOV=yes bundle exec rake $CHECK'
bundler_args: --without system_tests
rvm:
- 2.5.3
- 2.5.7
env:
global:
- HONEYCOMB_WRITEKEY="7f3c63a70eecc61d635917de46bea4e6",HONEYCOMB_DATASET="litmus tests"
stages:
- static
- spec
- acceptance
matrix:
jobs:
fast_finish: true
include:
-
before_script:
- "bundle exec rake 'litmus:provision_list[travis_deb]'"
- "bundle exec rake 'litmus:install_agent[puppet5]'"
- "bundle exec rake litmus:install_module"
bundler_args:
env: PLATFORMS=travis_deb_puppet5
rvm: 2.5.7
script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"]
services: docker
stage: acceptance
-
before_script:
- "bundle exec rake 'litmus:provision_list[travis_el7]'"
- "bundle exec rake 'litmus:install_agent[puppet5]'"
- "bundle exec rake litmus:install_module"
bundler_args:
env: PLATFORMS=travis_el7_puppet5
rvm: 2.5.7
script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"]
services: docker
stage: acceptance
-
before_script:
- "bundle exec rake 'litmus:provision_list[travis_ub]'"
- "bundle exec rake 'litmus:install_agent[puppet5]'"
- "bundle exec rake litmus:install_module"
bundler_args:
env: PLATFORMS=travis_ub_puppet5
rvm: 2.5.7
script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"]
services: docker
stage: acceptance
-
before_script:
- "bundle exec rake 'litmus:provision_list[travis_deb]'"
- "bundle exec rake 'litmus:install_agent[puppet6]'"
- "bundle exec rake litmus:install_module"
bundler_args:
env: PLATFORMS=travis_deb_puppet6
rvm: 2.5.7
script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"]
services: docker
stage: acceptance
-
before_script:
- "bundle exec rake 'litmus:provision_list[travis_el7]'"
- "bundle exec rake 'litmus:install_agent[puppet6]'"
- "bundle exec rake litmus:install_module"
bundler_args:
env: PLATFORMS=travis_el7_puppet6
rvm: 2.5.7
script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"]
services: docker
stage: acceptance
-
before_script:
- "bundle exec rake 'litmus:provision_list[travis_ub]'"
- "bundle exec rake 'litmus:install_agent[puppet6]'"
- "bundle exec rake litmus:install_module"
bundler_args:
env: PLATFORMS=travis_ub_puppet6
rvm: 2.5.7
script: ["travis_wait 45 bundle exec rake litmus:acceptance:parallel"]
services: docker
stage: acceptance
-
env: CHECK="check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint"
stage: static
Expand All @@ -35,17 +102,25 @@ matrix:
stage: spec
-
env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec
rvm: 2.5.3
rvm: 2.5.7
stage: spec
-
comment: test Mac OSX edition of PowerShell Core on a single job
env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec
os: osx
rvm: 2.5.3
stage: spec
-
before_script: ["brew update", "brew install openssl", "bundle exec rake spec_prep"]
bundler_args:
os: osx
rvm: 2.5.1
script: ["bundle exec rake litmus:acceptance:localhost"]
stage: acceptance
branches:
only:
- master
- /^v\d/
notifications:
email: false
slack:
secure: Yqv+S1Bwz19bor4xu3v7i5rLPzQuwTSZhO5wjsrX+jhKDN5/+e7e53x/v3Onjdrn9rjwFAxwzciAte0MO96xLFjyzWyUSziGur8/v3TcbRnnVQMOnIEj0HfmyLbx1cpxGK9V8MPsWQVAoHCklTtZIsRjMw0PcD8+aVKVF3NcBK4=
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"recommendations": [
"jpogran.puppet-vscode",
"puppet.puppet-vscode",
"rebornix.Ruby"
]
}
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

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.0.0](https://github.com/puppetlabs/puppetlabs-powershell/tree/v4.0.0) (2020-07-07)

[Full Changelog](https://github.com/puppetlabs/puppetlabs-powershell/compare/v3.0.1...v4.0.0)

### Changed

- Correct supported Puppet lower bound to 5.5.0 [\#282](https://github.com/puppetlabs/puppetlabs-powershell/pull/282) ([michaeltlombardi](https://github.com/michaeltlombardi))

### Added

- \(IAC-835\) Support added for Debian 10 and CentOS/RHEL 8 [\#306](https://github.com/puppetlabs/puppetlabs-powershell/pull/306) ([david22swan](https://github.com/david22swan))

### Fixed

- \(MODULES-10539\) Remove commands idiom from PowerShell provider [\#287](https://github.com/puppetlabs/puppetlabs-powershell/pull/287) ([michaeltlombardi](https://github.com/michaeltlombardi))

## [v3.0.1](https://github.com/puppetlabs/puppetlabs-powershell/tree/v3.0.1) (2020-01-15)

[Full Changelog](https://github.com/puppetlabs/puppetlabs-powershell/compare/v3.0.0...v3.0.1)
Expand Down
7 changes: 0 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@ group :development do
gem "ruby-pwsh", require: false
gem "github_changelog_generator", require: false, git: 'https://github.com/skywinder/github-changelog-generator', ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018' if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')
end
group :system_tests do
gem "puppet-module-posix-system-r#{minor_version}", require: false, platforms: [:ruby]
gem "puppet-module-win-system-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "beaker-testmode_switcher", '~> 0.4', require: false
gem "master_manipulator", require: false
gem "puppet-blacksmith", '~> 3.4', require: false
end

puppet_version = ENV['PUPPET_GEM_VERSION']
facter_version = ENV['FACTER_GEM_VERSION']
Expand Down
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'puppet_litmus/rake_tasks' if Bundler.rubygems.find_name('puppet_litmus').any?
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-syntax/tasks/puppet-syntax'
Expand Down
Loading