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)
This commit is contained in:
Jan Klare 2018-02-12 13:13:40 +01:00
parent 6472457e51
commit 1df4fb87ba
No known key found for this signature in database
GPG Key ID: 1F8C347A7DC77FD2
10 changed files with 17 additions and 12 deletions

View File

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

View File

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

View File

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

View File

@ -19,7 +19,7 @@ connection_params = {
openstack_username: 'admin',
openstack_api_key: 'password',
openstack_project_name: 'admin',
openstack_domain_id: 'default'
openstack_domain_id: 'default',
}
openstack_domain 'mydomain' do

View File

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

View File

@ -19,7 +19,7 @@ connection_params = {
openstack_username: 'admin',
openstack_api_key: 'password',
openstack_project_name: 'admin',
openstack_domain_id: 'default'
openstack_domain_id: 'default',
}
openstack_project 'myproject' do

View File

@ -19,7 +19,7 @@ connection_params = {
openstack_username: 'admin',
openstack_api_key: 'password',
openstack_project_name: 'admin',
openstack_domain_id: 'default'
openstack_domain_id: 'default',
}
openstack_role 'myrole' do

View File

@ -19,7 +19,7 @@ connection_params = {
openstack_username: 'admin',
openstack_api_key: 'password',
openstack_project_name: 'admin',
openstack_domain_id: 'default'
openstack_domain_id: 'default',
}
openstack_service 'myservice' do

View File

@ -19,7 +19,7 @@ connection_params = {
openstack_username: 'admin',
openstack_api_key: 'password',
openstack_project_name: 'admin',
openstack_domain_id: 'default'
openstack_domain_id: 'default',
}
openstack_user 'myuser' do

View File

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