summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Klare <j.klare@cloudbau.de>2018-02-12 13:13:40 +0100
committerJan Klare <j.klare@cloudbau.de>2018-02-12 13:13:40 +0100
commit1df4fb87bac918aa004adfa260c9c6465e7fd6ad (patch)
treea31f42675e2fbea22128ff17f2663505c8bcc39c
parent6472457e51759b92bd05f629b9d2b97adaf6e0f9 (diff)
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)
-rw-r--r--.travis.yml4
-rw-r--r--Rakefile4
-rw-r--r--metadata.rb7
-rw-r--r--spec/cookbooks/openstackclient_test/recipes/domain.rb2
-rw-r--r--spec/cookbooks/openstackclient_test/recipes/endpoint.rb2
-rw-r--r--spec/cookbooks/openstackclient_test/recipes/project.rb2
-rw-r--r--spec/cookbooks/openstackclient_test/recipes/role.rb2
-rw-r--r--spec/cookbooks/openstackclient_test/recipes/service.rb2
-rw-r--r--spec/cookbooks/openstackclient_test/recipes/user.rb2
-rw-r--r--spec/spec_helper.rb2
10 files changed, 17 insertions, 12 deletions
diff --git a/.travis.yml b/.travis.yml
index d886421..c52fd76 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,6 @@
1# install chefdk for testing 1# install chefdk for testing
2install: 2install:
3 - wget https://packages.chef.io/stable/ubuntu/12.04/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_0.17.17-1_amd64.deb 4 - sudo dpkg -i chefdk_2.4.17-1_amd64.deb
5# run all rake tasks (lint, style and unit) 5# run all rake tasks (lint, style and unit)
6script: rake 6script: rake
diff --git a/Rakefile b/Rakefile
index 289568a..ea420bb 100644
--- a/Rakefile
+++ b/Rakefile
@@ -23,9 +23,9 @@ task :lint do
23 sh %(chef exec foodcritic --epic-fail any .) 23 sh %(chef exec foodcritic --epic-fail any .)
24end 24end
25 25
26desc 'Run RuboCop (style) tests' 26desc 'Run cookstyle tests'
27task :style do 27task :style do
28 sh %(chef exec rubocop) 28 sh %(chef exec cookstyle)
29end 29end
30 30
31desc 'Run RSpec (unit) tests' 31desc 'Run RSpec (unit) tests'
diff --git a/metadata.rb b/metadata.rb
index f781bd6..2b76b67 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -17,10 +17,15 @@
17name 'openstackclient' 17name 'openstackclient'
18maintainer 'cloudbau GmbH' 18maintainer 'cloudbau GmbH'
19maintainer_email 'j.klare@cloudbau.de' 19maintainer_email 'j.klare@cloudbau.de'
20license 'Apache v2.0' 20license 'Apache-2.0'
21description 'Installs the fog-openstack gem and offers LWRPs to use it' 21description 'Installs the fog-openstack gem and offers LWRPs to use it'
22issues_url 'https://github.com/cloudbau/cookbook-openstackclient/issues' 22issues_url 'https://github.com/cloudbau/cookbook-openstackclient/issues'
23source_url 'https://github.com/cloudbau/cookbook-openstackclient' 23source_url 'https://github.com/cloudbau/cookbook-openstackclient'
24chef_version '>= 12.5' if respond_to?(:chef_version)
24version '16.0.0' 25version '16.0.0'
25 26
27%w(ubuntu redhat centos).each do |os|
28 supports os
29end
30
26gem 'fog-openstack' 31gem 'fog-openstack'
diff --git a/spec/cookbooks/openstackclient_test/recipes/domain.rb b/spec/cookbooks/openstackclient_test/recipes/domain.rb
index 96e9c27..8f031d6 100644
--- a/spec/cookbooks/openstackclient_test/recipes/domain.rb
+++ b/spec/cookbooks/openstackclient_test/recipes/domain.rb
@@ -19,7 +19,7 @@ connection_params = {
19 openstack_username: 'admin', 19 openstack_username: 'admin',
20 openstack_api_key: 'password', 20 openstack_api_key: 'password',
21 openstack_project_name: 'admin', 21 openstack_project_name: 'admin',
22 openstack_domain_id: 'default' 22 openstack_domain_id: 'default',
23} 23}
24 24
25openstack_domain 'mydomain' do 25openstack_domain 'mydomain' do
diff --git a/spec/cookbooks/openstackclient_test/recipes/endpoint.rb b/spec/cookbooks/openstackclient_test/recipes/endpoint.rb
index 87e01e7..1983e7d 100644
--- a/spec/cookbooks/openstackclient_test/recipes/endpoint.rb
+++ b/spec/cookbooks/openstackclient_test/recipes/endpoint.rb
@@ -19,7 +19,7 @@ connection_params = {
19 openstack_username: 'admin', 19 openstack_username: 'admin',
20 openstack_api_key: 'password', 20 openstack_api_key: 'password',
21 openstack_project_name: 'admin', 21 openstack_project_name: 'admin',
22 openstack_domain_id: 'default' 22 openstack_domain_id: 'default',
23} 23}
24 24
25%w(public internal admin).each do |interface| 25%w(public internal admin).each do |interface|
diff --git a/spec/cookbooks/openstackclient_test/recipes/project.rb b/spec/cookbooks/openstackclient_test/recipes/project.rb
index ab96087..e7765d5 100644
--- a/spec/cookbooks/openstackclient_test/recipes/project.rb
+++ b/spec/cookbooks/openstackclient_test/recipes/project.rb
@@ -19,7 +19,7 @@ connection_params = {
19 openstack_username: 'admin', 19 openstack_username: 'admin',
20 openstack_api_key: 'password', 20 openstack_api_key: 'password',
21 openstack_project_name: 'admin', 21 openstack_project_name: 'admin',
22 openstack_domain_id: 'default' 22 openstack_domain_id: 'default',
23} 23}
24 24
25openstack_project 'myproject' do 25openstack_project 'myproject' do
diff --git a/spec/cookbooks/openstackclient_test/recipes/role.rb b/spec/cookbooks/openstackclient_test/recipes/role.rb
index 3071aa7..9aa6016 100644
--- a/spec/cookbooks/openstackclient_test/recipes/role.rb
+++ b/spec/cookbooks/openstackclient_test/recipes/role.rb
@@ -19,7 +19,7 @@ connection_params = {
19 openstack_username: 'admin', 19 openstack_username: 'admin',
20 openstack_api_key: 'password', 20 openstack_api_key: 'password',
21 openstack_project_name: 'admin', 21 openstack_project_name: 'admin',
22 openstack_domain_id: 'default' 22 openstack_domain_id: 'default',
23} 23}
24 24
25openstack_role 'myrole' do 25openstack_role 'myrole' do
diff --git a/spec/cookbooks/openstackclient_test/recipes/service.rb b/spec/cookbooks/openstackclient_test/recipes/service.rb
index aedfe59..f4751c3 100644
--- a/spec/cookbooks/openstackclient_test/recipes/service.rb
+++ b/spec/cookbooks/openstackclient_test/recipes/service.rb
@@ -19,7 +19,7 @@ connection_params = {
19 openstack_username: 'admin', 19 openstack_username: 'admin',
20 openstack_api_key: 'password', 20 openstack_api_key: 'password',
21 openstack_project_name: 'admin', 21 openstack_project_name: 'admin',
22 openstack_domain_id: 'default' 22 openstack_domain_id: 'default',
23} 23}
24 24
25openstack_service 'myservice' do 25openstack_service 'myservice' do
diff --git a/spec/cookbooks/openstackclient_test/recipes/user.rb b/spec/cookbooks/openstackclient_test/recipes/user.rb
index 2d043d5..6b46df7 100644
--- a/spec/cookbooks/openstackclient_test/recipes/user.rb
+++ b/spec/cookbooks/openstackclient_test/recipes/user.rb
@@ -19,7 +19,7 @@ connection_params = {
19 openstack_username: 'admin', 19 openstack_username: 'admin',
20 openstack_api_key: 'password', 20 openstack_api_key: 'password',
21 openstack_project_name: 'admin', 21 openstack_project_name: 'admin',
22 openstack_domain_id: 'default' 22 openstack_domain_id: 'default',
23} 23}
24 24
25openstack_user 'myuser' do 25openstack_user 'myuser' do
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 01b6b1d..326de93 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -25,7 +25,7 @@ end
25 25
26UBUNTU_OPTS = { 26UBUNTU_OPTS = {
27 platform: 'ubuntu', 27 platform: 'ubuntu',
28 version: '16.04' 28 version: '16.04',
29}.freeze 29}.freeze
30 30
31at_exit { ChefSpec::Coverage.report! } 31at_exit { ChefSpec::Coverage.report! }