-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy path.kitchen.yml
170 lines (164 loc) · 4.51 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
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<%
build_version = ENV["SENSU_VERSION"]
build_iteration = ENV["BUILD_NUMBER"]
aws_ssh_key_id = ENV["AWS_SSH_KEY_ID"]
aws_ssh_key_path = ENV["AWS_SSH_KEY_PATH"]
s3 = {}
s3[:region] = ENV["AWS_REGION"]
s3[:artifact_bucket] = ENV["AWS_S3_ARTIFACT_BUCKET"]
s3[:cache_bucket] = ENV["AWS_S3_CACHE_BUCKET"]
s3_enabled = !s3.any? { |k,v| v.nil? }
if ENV.key?("AWS_ACCESS_KEY_ID") && ENV.key?("AWS_SECRET_ACCESS_KEY")
s3.merge!(:access_key_id => ENV["AWS_ACCESS_KEY_ID"])
s3.merge!(:secret_access_key => ENV["AWS_SECRET_ACCESS_KEY"])
end
unless build_version && build_iteration
raise "SENSU_VERSION and BUILD_NUMBER must be set"
end
%>
driver:
name: ec2
instance_type: m3.medium
retryable_tries: 100
retryable_sleep: 10
<% if ENV['AWS_IAM_PROFILE_NAME'] %>
iam_profile_name: <% ENV['AWS_IAM_PROFILE_NAME'] %>
<% end %>
<% unless aws_ssh_key_id.nil? %>
aws_ssh_key_id: <%= aws_ssh_key_id %>
<% end %>
tags:
"Name": "sensu-omnibus-artifact-builder <%= ENV['BUILD_PLATFORM'] %>"
"created-by": "test-kitchen"
<% if ENV['TRAVIS'] == 'true' %>
"travis-job-number": "<%= ENV['TRAVIS_JOB_NUMBER'].nil? ? 'unknown' : ENV['TRAVIS_JOB_NUMBER'] %>"
<% end %>
block_device_mappings:
- device_name: /dev/sda1
ebs:
delete_on_termination: true
<% unless aws_ssh_key_path.nil? %>
transport:
ssh_key: <%= aws_ssh_key_path %>
<% end %>
provisioner:
name: chef_zero
require_chef_omnibus: 12.19.36
attributes:
vagrant: true
omnibus_sensu:
publishers:
<% if s3_enabled %>
s3:
region: <%= s3[:region] %>
access_key_id: <%= s3[:access_key_id] %>
secret_access_key: <%= s3[:secret_access_key] %>
artifact_bucket: <%= s3[:artifact_bucket] %>
cache_bucket: <%= s3[:cache_bucket] %>
<% end %>
platforms:
- name: centos-7
driver:
image_id: ami-a042f4d8
run_list: yum-epel::default
- name: centos-7-i386
run_list: yum-epel::default
- name: centos-6
run_list: yum-epel::default
- name: centos-6-i386
driver:
image_id: ami-4fbf2f7f
instance_type: c1.medium
block_device_mappings:
- device_name: /dev/sda
ebs:
delete_on_termination: true
run_list: yum-epel::default
- name: centos-5
driver:
image_id: ami-f4b62094
run_list: yum-epel::default
- name: centos-5-i386
driver:
image_id: ami-e68b1d86
instance_type: c1.medium
run_list: yum-epel::default
- name: debian-9
run_list: apt::default
driver:
image_id: ami-52c7df2b
block_device_mappings:
- device_name: /dev/xvdb
ebs:
volume_size: 40
delete_on_termination: true
- name: debian-8
run_list: apt::default
driver:
block_device_mappings:
- device_name: /dev/xvda
ebs:
delete_on_termination: true
- name: freebsd-11
driver:
user_data: "user-data/freebsd.sh"
run_list:
- omnibus_sensu::freebsd_portsnap
- name: freebsd-10
driver:
user_data: "user-data/freebsd.sh"
run_list:
- omnibus_sensu::freebsd_portsnap
- freebsd::pkgng
- name: ubuntu-18.04
run_list: apt::default
- name: ubuntu-16.04
run_list: apt::default
- name: ubuntu-16.04-i386
driver:
instance_type: c1.medium
run_list: apt::default
- name: ubuntu-14.04
run_list: apt::default
- name: ubuntu-14.04-i386
driver:
instance_type: c1.medium
run_list: apt::default
- name: ubuntu-12.04
run_list: apt::default
- name: ubuntu-12.04-i386
driver:
instance_type: c1.medium
run_list: apt::default
- name: windows-2012-r2
driver:
image_id: ami-6f64f00f
instance_type: m5.xlarge
subnet_id: subnet-008c24cc2687f8b3b
associate_public_ip: true
transport:
name: winrm
elevated: true
run_list: seven_zip::default
- name: windows-2012-r2-i386
driver:
image_id: ami-6f64f00f
instance_type: m5.xlarge
subnet_id: subnet-008c24cc2687f8b3b
associate_public_ip: true
transport:
name: winrm
elevated: true
run_list: seven_zip::default
suites:
- name: default
run_list:
- build-essential::default
- omnibus_sensu::default
attributes:
omnibus_sensu:
project_revision: "<%= ENV['PROJECT_REVISION'] %>"
build_version: "<%= build_version %>"
build_iteration: "<%= build_iteration %>"
gpg_passphrase: "<%= ENV['GPG_PASSPHRASE'] %>"
windows_target_version: "<%= ENV['WINDOWS_TARGET_VERSION'] %>"