Skip to content

Commit

Permalink
Adds AppVeyor testing.
Browse files Browse the repository at this point in the history
Relates to #171
  • Loading branch information
damacus committed Jun 27, 2017
1 parent 161d7b8 commit addc070
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .kitchen.appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
driver:
name: proxy
host: localhost
reset_command: "exit 0"
port: <%= ENV["winrm_port"] %>
username: <%= ENV["winrm_user"] %>
password: <%= ENV["winrm_pass"] %>

provisioner:
name: chef_zero

platforms:
- name: windows-2012R2

verifier:
name: inspec

suites:
- name: default
run_list:
- recipe[test::default]
39 changes: 39 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
os: Windows Server 2012 R2
platform:
- x64
environment:
machine_user: vagrant
machine_pass: vagrant
KITCHEN_YAML: .kitchen.appveyor.yml

branches:
only:
- master

# Do not build on tags (GitHub only)
skip_tags: true

clone_depth: 1

install:
- ps: iex (irm https://omnitruck.chef.io/install.ps1); Install-Project -Project chefdk -channel stable
- ps: 'Get-CimInstance win32_operatingsystem -Property Caption, OSArchitecture, Version | fl Caption, OSArchitecture, Version'
- ps: $PSVersionTable
- c:\opscode\chefdk\bin\chef.bat exec ruby --version
- ps: secedit /export /cfg $env:temp/export.cfg
- ps: ((get-content $env:temp/export.cfg) -replace ('PasswordComplexity = 1', 'PasswordComplexity = 0')) | Out-File $env:temp/export.cfg
- ps: ((get-content $env:temp/export.cfg) -replace ('MinimumPasswordLength = 8', 'MinimumPasswordLength = 0')) | Out-File $env:temp/export.cfg
- ps: secedit /configure /db $env:windir/security/new.sdb /cfg $env:temp/export.cfg /areas SECURITYPOLICY
- ps: net user /add $env:machine_user $env:machine_pass
- ps: net localgroup administrators $env:machine_user /add

build_script:
- ps: c:\opscode\chefdk\bin\chef.bat shell-init powershell | iex; cmd /c c:\opscode\chefdk\bin\chef.bat --version

test_script:
- c:\opscode\chefdk\bin\cookstyle --version
- c:\opscode\chefdk\bin\chef.bat exec foodcritic --version
- c:\opscode\chefdk\bin\chef.bat exec delivery local all
- c:\opscode\chefdk\bin\chef.bat exec kitchen verify

deploy: off

0 comments on commit addc070

Please sign in to comment.