diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91cec3d..213f82e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,6 +56,18 @@ CHEF_LICENSE: accept-no-persist KITCHEN_LOCAL_YAML: kitchen.azure.yml AZURE_SUBSCRIPTION_ID: ${{ secrets.SUBSCRIPTION_ID }} + AZURE_TAGS: ${{ vars.AZURE_TAGS }} + - name: Test-Kitchen Converge Again + uses: actionshub/test-kitchen@main + with: + suite: ${{ matrix.suite }} + os: ${{ matrix.os }} + action: converge + env: + CHEF_LICENSE: accept-no-persist + KITCHEN_LOCAL_YAML: kitchen.azure.yml + AZURE_SUBSCRIPTION_ID: ${{ secrets.SUBSCRIPTION_ID }} + AZURE_TAGS: ${{ vars.AZURE_TAGS }} - name: Test-Kitchen Verify uses: actionshub/test-kitchen@main with: diff --git a/kitchen.azure.yml b/kitchen.azure.yml index 9c04478..02b25cc 100644 --- a/kitchen.azure.yml +++ b/kitchen.azure.yml @@ -5,8 +5,7 @@ driver: location: 'East US' machine_size: 'Standard_D2s_v3' azure_resource_group_prefix: 'ga-win_choco-' - resource_group_tags: - X-TTL: '2' + resource_group_tags: <%= ENV["AZURE_TAGS"] %> provisioner: name: chef_infra diff --git a/kitchen.yml b/kitchen.yml index 92c75d3..1184b60 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -1,54 +1,54 @@ ---- -driver: - name: vagrant - box_auto_update: true - box_auto_prune: true - -provisioner: - name: chef_zero - always_update_cookbooks: true - product_name: chef - product_version: 17.8 - channel: stable - -### Uncomment this setting to have Test Kitchen fail on any deprecation warning; useful in advance of a new chef-client release - # deprecations_as_errors: true - -verifier: - name: inspec - -platforms: - -- name: almalinux-8.5 - driver: - linked_clone: true - customize: - cpus: 2 - memory: 2048 - -- name: stromweld/windows-2022 - os_type: windows - transport: - name: winrm - elevated: true - elevated_username: vagrant - elevated_password: vagrant - driver: - box_name: windows-2022 - customize: - cpus: 2 - memory: 2048 - - -suites: - - name: default - run_list: - - recipe[chef-client::default] - verifier: - inspec_tests: - - compliance/profiles/client-run/controls - attributes: - audit: - reporter: 'cli' -# chef: -# filepath: = 'c:\Users\vagrant\AppData\Local\Temp\kitchen\client.pem' +--- +driver: + name: vagrant + box_auto_update: true + box_auto_prune: true + +provisioner: + name: chef_zero + always_update_cookbooks: true + product_name: chef + product_version: 17.8 + channel: stable + +### Uncomment this setting to have Test Kitchen fail on any deprecation warning; useful in advance of a new chef-client release + # deprecations_as_errors: true + +verifier: + name: inspec + +platforms: + +- name: almalinux-8.5 + driver: + linked_clone: true + customize: + cpus: 2 + memory: 2048 + +- name: stromweld/windows-2022 + os_type: windows + transport: + name: winrm + elevated: true + elevated_username: vagrant + elevated_password: vagrant + driver: + box_name: windows-2022 + customize: + cpus: 2 + memory: 2048 + + +suites: + - name: default + run_list: + - recipe[chef-client::default] + verifier: + inspec_tests: + - compliance/profiles/client-run/controls + attributes: + audit: + reporter: 'cli' +# chef: +# filepath: = 'c:\Users\vagrant\AppData\Local\Temp\kitchen\client.pem'