-
Notifications
You must be signed in to change notification settings - Fork 15
/
.kitchen.yml
73 lines (68 loc) · 2.42 KB
/
.kitchen.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
# Check this doc: https://github.com/test-kitchen/kitchen-azurerm
# you may set the following environment variables:
# AZURE_CLIENT_ID="your-azure-client-id-here"
# AZURE_CLIENT_SECRET="your-client-secret-here"
# AZURE_TENANT_ID="your-azure-tenant-id-here"
# (check doc https://github.com/test-kitchen/kitchen-azurerm for more details)
driver:
name: azurerm
subscription_id: <%= ENV['AZ_SUBSCRIPTION_ID'] %>
location: 'uksouth'
machine_size: 'Standard_D2s_v3'
username: azure
password: <%=
require "securerandom"
if File.exists?("./.kitchen/pwd.txt")
ENV['MACHINE_PASS'] = File.read("./.kitchen/pwd.txt")
else
ENV['MACHINE_PASS'] = SecureRandom.base64(24)
File.open("./.kitchen/pwd.txt", "w") { |f| f.write ENV['MACHINE_PASS'] }
end
ENV['MACHINE_PASS']
%>
provisioner:
name: shell # defaults to bash on linux, so the shebang is important!
script: 'tests/kitchen/provisioning.ps1'
verifier:
name: pester
shell: powershell
bootstrap: # installs modules from nuget feed by download and unzip.
repository_url: "https://www.powershellgallery.com/api/v2"
modules:
- PackageManagement
- PowerShellGet
test_folder: ./tests/kitchen/
copy_folders:
- output/module/Chocolatey
downloads:
"./PesterTestResults.xml": "./output/testResults/"
# kitchen_cmd.ps1: "./output/testResults/"
# ./coverage.xml: "./output/testResults/"
# # : ./testresults
platforms:
- name: winCore2022
driver:
# image_urn: MicrosoftWindowsServer:microsoftserveroperatingsystems-previews:windows-server-2022-azure-edition-preview-core:20348.11.2105262137
image_urn: MicrosoftWindowsServer:WindowsServer:2022-datacenter-core:latest #20348.288.2110071044
# use_ephemeral_osdisk: true
os_type: windows
shell: powershell
lifecycle:
post_create:
- remote: |
$null = Install-PackageProvider -Name NuGet -Confirm:$false -Force
Install-Module PowerShellGet -Force -SkipPublisherCheck -Confirm:$false -Scope AllUsers
Set-PSRepository -Name 'PSGallery' -InstallationPolicy 'Trusted'
Remove-Module -Name PowerShellGet
transport:
name: winrm
suites:
- name: GCPackages
verifier:
copy_folders:
- output/GCPackages/
- output/module/Chocolatey # This is only used when troubleshooting interactively.
install_modules:
- Name: GuestConfiguration
AllowPrerelease: true