-
Notifications
You must be signed in to change notification settings - Fork 290
/
appveyor.yml
55 lines (55 loc) · 2.27 KB
/
appveyor.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
version: '{build}-{branch}'
platform:
- x64
build: off
max_jobs: 2
branches:
only:
- master
- /^v\d/
init:
- ps: $env:GEM_SOURCE = "http://rubygems.org"
install:
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
- ps: |
if (!(Test-Path C:\downloads)) { mkdir C:\downloads | Out-Null }
$log = "C:/puppet-agent.log"
$agent_url = "https://downloads.puppetlabs.com/windows/${ENV:PUPPET_REPO}/puppet-agent-x64-latest.msi"
Write-Output "Installing Puppet from $agent_url"
Write-Output "Log will be written to $log"
if ( Test-Path $log ) { Remove-Item $log }
cd C:\downloads
if (!(Test-Path "puppet-agent-x64-latest.msi")) { Start-FileDownload $agent_url }
Start-Process msiexec.exe -Wait -NoNewWindow -ArgumentList @("/i", "C:\downloads\puppet-agent-x64-latest.msi", "/qn", "/l*", "$log")
cd $ENV:APPVEYOR_BUILD_FOLDER
- ps: Copy-Item -Path $ENV:APPVEYOR_BUILD_FOLDER -Destination C:/ProgramData/PuppetLabs/code/environments/production/modules/sensu -Recurse
- ps: Copy-Item -Path "${ENV:APPVEYOR_BUILD_FOLDER}/tests/ssl" -Destination C:/ProgramData/PuppetLabs/puppet/etc/ssl -Recurse
- ps: Copy-Item -Path "${ENV:APPVEYOR_BUILD_FOLDER}/lib/facter" -Destination C:/ProgramData/PuppetLabs/puppet/cache/lib/facter -Recurse
- set PATH=C:\Program Files\Puppet Labs\Puppet\bin;%PATH%
- puppet --version
- puppet module install puppetlabs-stdlib --version ">= 5.1.0 < 7.0.0"
- puppet module install puppetlabs-chocolatey --version ">= 3.0.0 < 7.0.0"
- puppet module install puppet-archive --version ">= 3.0.0 < 5.0.0"
- puppet module install puppet-windows_env --version ">= 3.0.0 < 5.0.0"
- puppet module install richardc-datacat --version ">= 0.6.0 < 2.0.0"
- puppet config set --section main certname sensu_agent
- facter -p --debug
- ruby -v
- bundle -v
- bundle install --jobs 4 --retry 2 --path C:\vendor\bundle --without documentation
test_script:
- bundle exec rake acceptance:windows
image:
# Only test newest build images to avoid transient errors with older builds
# Windows 2019
- Visual Studio 2019
environment:
matrix:
# Seen transient errors with Ruby 2.5 used with Puppet 6
# so just test Puppet 7 and Ruby 2.7
- PUPPET_GEM_VERSION: '~>7.x'
FACTER_GEM_VERSION: '~>4.x'
PUPPET_REPO: puppet7
RUBY_VERSION: 27-x64
matrix:
fast_finish: false