forked from test-kitchen/test-kitchen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
84 lines (82 loc) · 2.54 KB
/
azure-pipelines.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
74
75
76
77
78
79
80
81
82
83
84
---
trigger:
batch: true
branches:
include:
- main
pr:
autoCancel: true
branches:
include:
- main
variables:
BUNDLE_PATH: $(Pipeline.Workspace)/.bundle
CHEF_LICENSE: accept-no-persist
stages:
- stage: Build
jobs:
- job: Windows
strategy:
matrix:
Windows_Ruby27:
version: 2.7
machine_user: test_user
machine_pass: Pass@word1
machine_port: 5985
KITCHEN_YAML: kitchen.windows.yml
Windows_Ruby30:
version: 3.0
machine_user: test_user
machine_pass: Pass@word1
machine_port: 5985
KITCHEN_YAML: kitchen.windows.yml
WindowsProduct_Ruby27:
version: 2.7
machine_user: test_user
machine_pass: Pass@word1
machine_port: 5985
KITCHEN_YAML: kitchen.windows-product.yml
WindowsProduct_Ruby30:
version: 3.0
machine_user: test_user
machine_pass: Pass@word1
machine_port: 5985
KITCHEN_YAML: kitchen.windows-product.yml
pool:
vmImage: windows-2019
steps:
- task: Cache@2
inputs:
key: gems | $(Agent.OS) | "$(version)" | test-kitchen.gemspec | Gemfile | Gemfile.proxy_tests
path: $(BUNDLE_PATH)
displayName: Cache gems
- task: UseRubyVersion@0
inputs:
versionSpec: $(version)
addToPath: true
- script: |
echo "ruby version:"
ruby --version
echo "gem version:"
gem --version
displayName: Show Ruby Version
- script: |
gem install bundler --quiet
echo "bundler version:"
bundler --version
displayName: Install Bundler
- script: |
bundle install || bundle install || bundle install
displayName: Bundle Install Dependencies
- script: |
bundle exec rake unit && bundle exec rake quality
displayName: Run Tests
env:
SPEC_OPTS: --format progress
- script: |
winrm.cmd quickconfig -q
net user /add %machine_user% %machine_pass%
net localgroup administrators %machine_user% /add
bundle install --with integration
bundle exec kitchen verify windows
displayName: Run Converge