-
Notifications
You must be signed in to change notification settings - Fork 42
108 lines (102 loc) · 3.06 KB
/
delivery.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
---
name: ci
on:
pull_request:
push:
branches:
- master
- main
jobs:
delivery:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@main
- name: Run Chef Delivery
uses: actionshub/chef-delivery@main
env:
CHEF_LICENSE: accept-no-persist
dokken:
needs: [delivery]
runs-on: ubuntu-latest
strategy:
matrix:
os:
- 'amazonlinux'
- 'amazonlinux-2'
- 'debian-9'
- 'debian-10'
- 'centos-6'
- 'centos-7'
- 'centos-8'
- 'oraclelinux-6'
- 'oraclelinux-7'
# - 'oraclelinux-8'
- 'fedora-latest'
- 'ubuntu-1604'
- 'ubuntu-1804'
- 'opensuse-leap-15'
suite:
- 'install-for-chefspec'
- 'install-no-user'
- 'package'
- 'service'
- 'sup'
- 'sup-toml-config'
- 'config'
- 'user-toml'
- 'config-chef-13'
fail-fast: false
steps:
- name: Check out code
uses: actions/checkout@main
- name: Install Chef
uses: actionshub/chef-install@main
- name: Dokken
uses: actionshub/kitchen-dokken@main
env:
CHEF_LICENSE: accept-no-persist
KITCHEN_LOCAL_YAML: kitchen.dokken.yml
with:
suite: ${{ matrix.suite }}
os: ${{ matrix.os }}
windows:
needs: [delivery]
runs-on: windows-2019
strategy:
matrix:
os:
- 'windows-2019'
suite:
- 'win_config'
- 'win_package'
- 'win_service'
- 'win_sup'
- 'win_user_toml'
- 'win_sup_toml_config'
fail-fast: false
steps:
- name: Check out code
uses: actions/checkout@main
- name: Install Chef Workstation
run: . { iwr -useb https://omnitruck.chef.io/install.ps1 } | iex; install -channel stable -project chef-workstation
shell: powershell
- name: Add Chef Workstation to PATH
run: |
if ( $env:PATH -like "*chef-workstation*" ) {
write-output 'Path already set, no action to perform'
} else {
write-output 'Adding c:\opscode\chef-workstation\bin to path.'
echo "c:\opscode\chef-workstation\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
}
shell: powershell
- name: Chef Infra Client Run
run: C:\opscode\chef-workstation\bin\chef-solo -c test/solo.rb -o "test::${{ matrix.suite }}"
shell: powershell
env:
CHEF_LICENSE: accept-no-persist
- name: Integration Testing
run: C:\opscode\chef-workstation\bin\inspec exec test\integration\${{ matrix.suite }}\default_spec.rb
shell: powershell
env:
CHEF_LICENSE: accept-no-persist