Browse Source

update travis ci config with newes chefdk and adapt to cookstyle

* this is a preparation step for fully updation to chef13 (see also PR #7 for more updates)
Jan Klare 1 year ago
parent
commit
1df4fb87ba
No account linked to committer's email address

+ 2
- 2
.travis.yml View File

@@ -1,6 +1,6 @@
1 1
 # install chefdk for testing
2 2
 install:
3
-  - wget https://packages.chef.io/stable/ubuntu/12.04/chefdk_0.17.17-1_amd64.deb
4
-  - sudo dpkg -i chefdk_0.17.17-1_amd64.deb
3
+  - wget https://packages.chef.io/files/stable/chefdk/2.4.17/ubuntu/16.04/chefdk_2.4.17-1_amd64.deb
4
+  - sudo dpkg -i chefdk_2.4.17-1_amd64.deb
5 5
 # run all rake tasks (lint, style and unit)
6 6
 script: rake

+ 2
- 2
Rakefile View File

@@ -23,9 +23,9 @@ task :lint do
23 23
   sh %(chef exec foodcritic --epic-fail any .)
24 24
 end
25 25
 
26
-desc 'Run RuboCop (style) tests'
26
+desc 'Run cookstyle tests'
27 27
 task :style do
28
-  sh %(chef exec rubocop)
28
+  sh %(chef exec cookstyle)
29 29
 end
30 30
 
31 31
 desc 'Run RSpec (unit) tests'

+ 6
- 1
metadata.rb View File

@@ -17,10 +17,15 @@
17 17
 name 'openstackclient'
18 18
 maintainer 'cloudbau GmbH'
19 19
 maintainer_email 'j.klare@cloudbau.de'
20
-license 'Apache v2.0'
20
+license 'Apache-2.0'
21 21
 description 'Installs the fog-openstack gem and offers LWRPs to use it'
22 22
 issues_url 'https://github.com/cloudbau/cookbook-openstackclient/issues'
23 23
 source_url 'https://github.com/cloudbau/cookbook-openstackclient'
24
+chef_version '>= 12.5' if respond_to?(:chef_version)
24 25
 version '16.0.0'
25 26
 
27
+%w(ubuntu redhat centos).each do |os|
28
+  supports os
29
+end
30
+
26 31
 gem 'fog-openstack'

+ 1
- 1
spec/cookbooks/openstackclient_test/recipes/domain.rb View File

@@ -19,7 +19,7 @@ connection_params = {
19 19
   openstack_username:     'admin',
20 20
   openstack_api_key:      'password',
21 21
   openstack_project_name: 'admin',
22
-  openstack_domain_id:    'default'
22
+  openstack_domain_id:    'default',
23 23
 }
24 24
 
25 25
 openstack_domain 'mydomain' do

+ 1
- 1
spec/cookbooks/openstackclient_test/recipes/endpoint.rb View File

@@ -19,7 +19,7 @@ connection_params = {
19 19
   openstack_username:     'admin',
20 20
   openstack_api_key:      'password',
21 21
   openstack_project_name: 'admin',
22
-  openstack_domain_id:    'default'
22
+  openstack_domain_id:    'default',
23 23
 }
24 24
 
25 25
 %w(public internal admin).each do |interface|

+ 1
- 1
spec/cookbooks/openstackclient_test/recipes/project.rb View File

@@ -19,7 +19,7 @@ connection_params = {
19 19
   openstack_username:     'admin',
20 20
   openstack_api_key:      'password',
21 21
   openstack_project_name: 'admin',
22
-  openstack_domain_id:    'default'
22
+  openstack_domain_id:    'default',
23 23
 }
24 24
 
25 25
 openstack_project 'myproject' do

+ 1
- 1
spec/cookbooks/openstackclient_test/recipes/role.rb View File

@@ -19,7 +19,7 @@ connection_params = {
19 19
   openstack_username:     'admin',
20 20
   openstack_api_key:      'password',
21 21
   openstack_project_name: 'admin',
22
-  openstack_domain_id:    'default'
22
+  openstack_domain_id:    'default',
23 23
 }
24 24
 
25 25
 openstack_role 'myrole' do

+ 1
- 1
spec/cookbooks/openstackclient_test/recipes/service.rb View File

@@ -19,7 +19,7 @@ connection_params = {
19 19
   openstack_username:     'admin',
20 20
   openstack_api_key:      'password',
21 21
   openstack_project_name: 'admin',
22
-  openstack_domain_id:    'default'
22
+  openstack_domain_id:    'default',
23 23
 }
24 24
 
25 25
 openstack_service 'myservice' do

+ 1
- 1
spec/cookbooks/openstackclient_test/recipes/user.rb View File

@@ -19,7 +19,7 @@ connection_params = {
19 19
   openstack_username:     'admin',
20 20
   openstack_api_key:      'password',
21 21
   openstack_project_name: 'admin',
22
-  openstack_domain_id:    'default'
22
+  openstack_domain_id:    'default',
23 23
 }
24 24
 
25 25
 openstack_user 'myuser' do

+ 1
- 1
spec/spec_helper.rb View File

@@ -25,7 +25,7 @@ end
25 25
 
26 26
 UBUNTU_OPTS = {
27 27
   platform: 'ubuntu',
28
-  version: '16.04'
28
+  version: '16.04',
29 29
 }.freeze
30 30
 
31 31
 at_exit { ChefSpec::Coverage.report! }

Loading…
Cancel
Save