diff --git a/.github/workflows/kitchen.windows.yml b/.github/workflows/kitchen.windows.yml index 7675d61..cb23641 100644 --- a/.github/workflows/kitchen.windows.yml +++ b/.github/workflows/kitchen.windows.yml @@ -11,6 +11,48 @@ env: KITCHEN_LOCAL_YAML: 'kitchen.windows.yml' jobs: + test-2022: + runs-on: 'windows-2022' + strategy: + fail-fast: false + matrix: + instance: + - default-windows-2022-latest-py3 + steps: + - name: 'Check out code' + uses: 'actions/checkout@v2' + - name: 'Install Chef' + uses: 'actionshub/chef-install@1.1.0' + with: + project: 'chef' + version: '16.10.8' + - name: 'Add Chef bindir to PATH' + uses: 'myci-actions/export-env-var-powershell@1' + with: + name: 'PATH' + value: "C:\\opscode\\chef\\bin;\ + C:\\opscode\\chef\\embedded\\bin;$env:PATH" + - name: 'Set up Bundler cache' + uses: 'actions/cache@v1' + with: + path: 'vendor/bundle' + key: "${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}" + restore-keys: "${{ runner.os }}-gems-" + - name: 'Set up test user' + run: | + $password = ConvertTo-SecureString $env:machine_pass -AsPlainText -Force + New-LocalUser $env:machine_user -Password $password + Add-LocalGroupMember -Group "Administrators" -Member $env:machine_user + - name: 'Set up WinRM' + run: | + Set-WSManQuickConfig -Force + - name: 'Run Bundler' + run: | + ruby --version + bundle config path vendor/bundle + bundle install --jobs 4 --retry 3 + - name: 'Run Test Kitchen' + run: 'bundle exec kitchen verify ${{ matrix.instance }}' test-2019: runs-on: 'windows-2019' strategy: @@ -53,45 +95,3 @@ jobs: bundle install --jobs 4 --retry 3 - name: 'Run Test Kitchen' run: 'bundle exec kitchen verify ${{ matrix.instance }}' - test-2016: - runs-on: 'windows-2016' - strategy: - fail-fast: false - matrix: - instance: - - default-windows-2016-latest-py3 - steps: - - name: 'Check out code' - uses: 'actions/checkout@v2' - - name: 'Install Chef' - uses: 'actionshub/chef-install@1.1.0' - with: - project: 'chef' - version: '16.10.8' - - name: 'Add Chef bindir to PATH' - uses: 'myci-actions/export-env-var-powershell@1' - with: - name: 'PATH' - value: "C:\\opscode\\chef\\bin;\ - C:\\opscode\\chef\\embedded\\bin;$env:PATH" - - name: 'Set up Bundler cache' - uses: 'actions/cache@v1' - with: - path: 'vendor/bundle' - key: "${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}" - restore-keys: "${{ runner.os }}-gems-" - - name: 'Set up test user' - run: | - $password = ConvertTo-SecureString $env:machine_pass -AsPlainText -Force - New-LocalUser $env:machine_user -Password $password - Add-LocalGroupMember -Group "Administrators" -Member $env:machine_user - - name: 'Set up WinRM' - run: | - Set-WSManQuickConfig -Force - - name: 'Run Bundler' - run: | - ruby --version - bundle config path vendor/bundle - bundle install --jobs 4 --retry 3 - - name: 'Run Test Kitchen' - run: 'bundle exec kitchen verify ${{ matrix.instance }}' diff --git a/kitchen.windows.yml b/kitchen.windows.yml index 712bb86..7fceb6d 100644 --- a/kitchen.windows.yml +++ b/kitchen.windows.yml @@ -14,18 +14,18 @@ provisioner: salt_bootstrap_options: -pythonVersion 3 -version 3003.3 # yamllint disable rule:line-length init_environment: | - C:\salt\salt-call --local state.single file.managed ` + salt-call --local state.single file.managed ` C:\Users\kitchen\AppData\Local\Temp\kitchen\srv\salt\win\repo-ng\salt-minion-py3.sls ` source=https://github.com/saltstack/salt-winrepo-ng/raw/master/salt-minion-py3.sls ` skip_verify=True makedirs=True # yamllint enable rule:line-length platforms: + - name: windows-2022-latest-py3 + verifier: + inputs: + saltmajorversion: 3003 - name: windows-2019-latest-py3 verifier: inputs: saltmajorversion: 3003 - - name: windows-2016-latest-py3 - verifier: - inputs: - saltmajorversion: 3003 diff --git a/test/integration/default/files/_mapdata/windows-2022-server.yaml b/test/integration/default/files/_mapdata/windows-2022-server.yaml new file mode 100644 index 0000000..73afc7a --- /dev/null +++ b/test/integration/default/files/_mapdata/windows-2022-server.yaml @@ -0,0 +1,113 @@ +# yamllint disable rule:indentation rule:line-length +# Windows-2022Server +--- +values: + formulas_settings: + checkout_orig_branch: false + git_opts: + default: + basedir: "/srv/formulas" + baseurl: https://github.com/saltstack-formulas + options: + output_loglevel: quiet + rev: master + update: false + list: {} + salt_settings: + api_service: salt-api + api_service_details: + enabled: true + state: running + clean_config_d_dir: true + cloud: + template_sources: + maps: salt://salt/files/cloud.maps.d + profiles: salt://salt/files/cloud.profiles.d + providers: salt://salt/files/cloud.providers.d + config_path: C:\salt\conf + gitfs: + dulwich: + install_from_source: true + gitpython: + install_from_source: false + pygit2: + git: + install_from_package: git + require_state: false + install_from_source: true + libgit2: + build_parent_dir: "/usr/src/" + download_hash: 683d1164e361e2a0a8d52652840e2340 + install_from_source: true + version: 0.23.0 + version: 0.23.0 + install_packages: true + master: + ext_pillar: + - cmd_yaml: cat /etc/salt/yaml + - stack: + - /path/to/stack1.cfg + - /path/to/stack2.cfg + - reclass: + inventory_base_uri: /etc/reclass + - saltclass: + - path: "/srv/saltclass" + file_roots: + base: + - "/srv/salt" + fileserver_backend: + - rootfs + gitfs_provider: gitpython + pillar_roots: + base: + - "/srv/pillar" + master_config_use_TOFS: false + master_remove_config: false + master_service: salt-master + master_service_details: + enabled: true + state: running + minion: + file_roots: + base: + - "/srv/salt" + fileserver_backend: + - rootfs + master: localhost + master_type: str + pillar_roots: + base: + - "/srv/pillar" + minion_config_use_TOFS: false + minion_remove_config: false + minion_service: salt-minion + minion_service_details: + enabled: true + state: running + parallel: false + pin_version: false + pkgrepo: '' + py_ver: py3 + python_dulwich: python-dulwich + python_git: python-git + release: '3003' + restart_via_at: false + retry_options: + attempts: 5 + interval: 10 + splay: 10 + until: true + rootgroup: root + rootuser: kitchen + salt_api: salt-api + salt_cloud: salt-cloud + salt_master: salt-master + salt_master_macos_plist_hash: '' + salt_minion: salt-minion-py3 + salt_minion_macos_plist_hash: '' + salt_ssh: salt-ssh + salt_syndic: salt-syndic + ssh_roster: {} + syndic_service: salt-syndic + use_pip: false + version: '' diff --git a/test/integration/share/libraries/system.rb b/test/integration/share/libraries/system.rb index af65449..7471ddc 100644 --- a/test/integration/share/libraries/system.rb +++ b/test/integration/share/libraries/system.rb @@ -61,6 +61,8 @@ class SystemResource < Inspec.resource(1) # rubocop:enable Style/NumericLiterals,Layout/LineLength when 'windows_8.1_pro' '8.1' + when 'windows_server_2022_datacenter' + '2022-server' when 'windows_server_2019_datacenter' '2019-server' when 'windows_server_2016_datacenter'