-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkitchen.yml
54 lines (50 loc) · 2.09 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
---
# 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: 514e7558-79cd-4f4c-8a76-13399d966dbb
location: 'westus2'
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/integration/provisioning.ps1'
verifier:
name: pester
pester_install:
MaximumVersion: '4.99.999'
platforms:
- name: Debian-9
driver:
image_urn: credativ:Debian:9:latest
lifecycle:
post_create:
#- remote: echo "<%= ENV['MACHINE_PASS'] %>" | sudo -S chmod +x /etc/sudoers.d
- remote: "echo \"<%= ENV['MACHINE_PASS'] %>\" | sudo -S sh -c \"chmod +x /etc/sudoers.d && echo 'azure ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/waagent\""
- remote: sudo apt-get update && sudo apt-get install -y curl gnupg apt-transport-https
- remote: curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
- remote: sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch main" > /etc/apt/sources.list.d/microsoft.list'
- remote: sudo apt-get update && sudo apt-get install -y powershell
- remote: pwsh -c "'PowerShell Installed'"
# - remote: mkdir ~/.local/share/powershell
# - remote: sudo chown -r azure ~/.local/share/powershell
#- sudo apt-get install -y cowsay
pre_destroy:
- local: pwsh -c " rm ./.kitchen/pwd.txt"
suites:
- name: default