Chef style testing enablement and minor speed cleanup starting with checks
Broke the chef-cookbook-prep builder into bundler and berkshelf steps because both are not needed for every test. Renamed builders to reflect the underlying tools used: chef-cookbook-prep -> chef-bundler-prep -> chef-berkshelf-prep chef-cookbook-rspec -> chef-cookbook-chefspec chef-cookbook-lint -> chef-cookbook-foodcritic chef-cookbook-style -> chef-cookbook-rubocop Enabled rubocop/style checks without gating for all cookbooks. Will add gating once the Rubocop updates are in place and this is shown to work well. Addresses: blueprint lint-and-unit-testing-for-havana Change-Id: I894f5aefe650ef799ac1aa10345749d2a86f0074
This commit is contained in:
parent
3e160df0c4
commit
7ae6c01f09
@ -4,8 +4,9 @@
|
||||
|
||||
builders:
|
||||
- gerrit-git-prep
|
||||
- chef-cookbook-prep
|
||||
- chef-cookbook-rspec
|
||||
- chef-bundler-prep
|
||||
- chef-berkshelf-prep
|
||||
- chef-cookbook-chefspec
|
||||
|
||||
publishers:
|
||||
- console-log
|
||||
@ -16,8 +17,8 @@
|
||||
|
||||
builders:
|
||||
- gerrit-git-prep
|
||||
- chef-cookbook-prep
|
||||
- chef-cookbook-lint
|
||||
- chef-bundler-prep
|
||||
- chef-cookbook-foodcritic
|
||||
|
||||
publishers:
|
||||
- console-log
|
||||
@ -28,8 +29,8 @@
|
||||
|
||||
builders:
|
||||
- gerrit-git-prep
|
||||
- chef-cookbook-prep
|
||||
- chef-cookbook-style
|
||||
- chef-bundler-prep
|
||||
- chef-cookbook-rubocop
|
||||
|
||||
publishers:
|
||||
- console-log
|
||||
|
@ -88,11 +88,17 @@
|
||||
done
|
||||
|
||||
- builder:
|
||||
name: chef-cookbook-prep
|
||||
name: chef-bundler-prep
|
||||
builders:
|
||||
- shell: |
|
||||
mkdir -p .cookbooks .bundle
|
||||
mkdir -p .bundle
|
||||
ruby1.9.1 /usr/bin/bundle install --path=.bundle
|
||||
|
||||
- builder:
|
||||
name: chef-berkshelf-prep
|
||||
builders:
|
||||
- shell: |
|
||||
mkdir -p .cookbooks
|
||||
ruby1.9.1 /usr/bin/bundle exec berks install --path=.cookbooks
|
||||
COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
|
||||
if [ -z $COOKBOOK ]; then
|
||||
@ -101,21 +107,20 @@
|
||||
fi
|
||||
|
||||
- builder:
|
||||
name: chef-cookbook-style
|
||||
name: chef-cookbook-rubocop
|
||||
builders:
|
||||
- shell: |
|
||||
COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
|
||||
ruby1.9.1 /usr/bin/bundle exec tailor
|
||||
ruby1.9.1 /usr/bin/bundle exec rubocop
|
||||
|
||||
- builder:
|
||||
name: chef-cookbook-lint
|
||||
name: chef-cookbook-foodcritic
|
||||
builders:
|
||||
- shell: |
|
||||
COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
|
||||
ruby1.9.1 /usr/bin/bundle exec foodcritic -f any -t ~FC003 -t ~FC023 .cookbooks/$COOKBOOK
|
||||
ruby1.9.1 /usr/bin/bundle exec foodcritic -f any -t ~FC003 -t ~FC023 .
|
||||
|
||||
- builder:
|
||||
name: chef-cookbook-rspec
|
||||
name: chef-cookbook-chefspec
|
||||
builders:
|
||||
- shell: |
|
||||
COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
|
||||
|
@ -1473,6 +1473,7 @@
|
||||
|
||||
jobs:
|
||||
- gate-{name}-chef-lint
|
||||
- gate-{name}-chef-style
|
||||
- gate-{name}-chef-unit
|
||||
|
||||
- project:
|
||||
@ -1492,6 +1493,7 @@
|
||||
|
||||
jobs:
|
||||
- gate-{name}-chef-lint
|
||||
- gate-{name}-chef-style
|
||||
- gate-{name}-chef-unit
|
||||
|
||||
- project:
|
||||
@ -1501,6 +1503,7 @@
|
||||
|
||||
jobs:
|
||||
- gate-{name}-chef-lint
|
||||
- gate-{name}-chef-style
|
||||
- gate-{name}-chef-unit
|
||||
|
||||
- project:
|
||||
@ -1510,6 +1513,7 @@
|
||||
|
||||
jobs:
|
||||
- gate-{name}-chef-lint
|
||||
- gate-{name}-chef-style
|
||||
- gate-{name}-chef-unit
|
||||
|
||||
- project:
|
||||
@ -1519,6 +1523,7 @@
|
||||
|
||||
jobs:
|
||||
- gate-{name}-chef-lint
|
||||
- gate-{name}-chef-style
|
||||
- gate-{name}-chef-unit
|
||||
|
||||
- project:
|
||||
@ -1528,6 +1533,7 @@
|
||||
|
||||
jobs:
|
||||
- gate-{name}-chef-lint
|
||||
- gate-{name}-chef-style
|
||||
- gate-{name}-chef-unit
|
||||
|
||||
- project:
|
||||
@ -1537,6 +1543,7 @@
|
||||
|
||||
jobs:
|
||||
- gate-{name}-chef-lint
|
||||
- gate-{name}-chef-style
|
||||
- gate-{name}-chef-unit
|
||||
|
||||
- project:
|
||||
@ -1546,6 +1553,7 @@
|
||||
|
||||
jobs:
|
||||
- gate-{name}-chef-lint
|
||||
- gate-{name}-chef-style
|
||||
- gate-{name}-chef-unit
|
||||
|
||||
- project:
|
||||
@ -1555,6 +1563,7 @@
|
||||
|
||||
jobs:
|
||||
- gate-{name}-chef-lint
|
||||
- gate-{name}-chef-style
|
||||
- gate-{name}-chef-unit
|
||||
|
||||
- project:
|
||||
@ -1564,6 +1573,7 @@
|
||||
|
||||
jobs:
|
||||
- gate-{name}-chef-lint
|
||||
- gate-{name}-chef-style
|
||||
- gate-{name}-chef-unit
|
||||
|
||||
- project:
|
||||
@ -1573,6 +1583,7 @@
|
||||
|
||||
jobs:
|
||||
- gate-{name}-chef-lint
|
||||
- gate-{name}-chef-style
|
||||
- gate-{name}-chef-unit
|
||||
|
||||
- project:
|
||||
|
@ -2860,6 +2860,7 @@ projects:
|
||||
- name: stackforge/cookbook-openstack-block-storage
|
||||
check:
|
||||
- gate-cookbook-openstack-block-storage-chef-lint
|
||||
- gate-cookbook-openstack-block-storage-chef-style
|
||||
- gate-cookbook-openstack-block-storage-chef-unit
|
||||
gate:
|
||||
- gate-cookbook-openstack-block-storage-chef-lint
|
||||
@ -2868,6 +2869,7 @@ projects:
|
||||
- name: stackforge/cookbook-openstack-common
|
||||
check:
|
||||
- gate-cookbook-openstack-common-chef-lint
|
||||
- gate-cookbook-openstack-common-chef-style
|
||||
- gate-cookbook-openstack-common-chef-unit
|
||||
gate:
|
||||
- gate-cookbook-openstack-common-chef-lint
|
||||
@ -2876,6 +2878,7 @@ projects:
|
||||
- name: stackforge/cookbook-openstack-compute
|
||||
check:
|
||||
- gate-cookbook-openstack-compute-chef-lint
|
||||
- gate-cookbook-openstack-compute-chef-style
|
||||
- gate-cookbook-openstack-compute-chef-unit
|
||||
gate:
|
||||
- gate-cookbook-openstack-compute-chef-lint
|
||||
@ -2884,6 +2887,7 @@ projects:
|
||||
- name: stackforge/cookbook-openstack-dashboard
|
||||
check:
|
||||
- gate-cookbook-openstack-dashboard-chef-lint
|
||||
- gate-cookbook-openstack-dashboard-chef-style
|
||||
- gate-cookbook-openstack-dashboard-chef-unit
|
||||
gate:
|
||||
- gate-cookbook-openstack-dashboard-chef-lint
|
||||
@ -2892,6 +2896,7 @@ projects:
|
||||
- name: stackforge/cookbook-openstack-identity
|
||||
check:
|
||||
- gate-cookbook-openstack-identity-chef-lint
|
||||
- gate-cookbook-openstack-identity-chef-style
|
||||
- gate-cookbook-openstack-identity-chef-unit
|
||||
gate:
|
||||
- gate-cookbook-openstack-identity-chef-lint
|
||||
@ -2900,6 +2905,7 @@ projects:
|
||||
- name: stackforge/cookbook-openstack-image
|
||||
check:
|
||||
- gate-cookbook-openstack-image-chef-lint
|
||||
- gate-cookbook-openstack-image-chef-style
|
||||
- gate-cookbook-openstack-image-chef-unit
|
||||
gate:
|
||||
- gate-cookbook-openstack-image-chef-lint
|
||||
@ -2908,6 +2914,7 @@ projects:
|
||||
- name: stackforge/cookbook-openstack-metering
|
||||
check:
|
||||
- gate-cookbook-openstack-metering-chef-lint
|
||||
- gate-cookbook-openstack-metering-chef-style
|
||||
- gate-cookbook-openstack-metering-chef-unit
|
||||
gate:
|
||||
- gate-cookbook-openstack-metering-chef-lint
|
||||
@ -2916,6 +2923,7 @@ projects:
|
||||
- name: stackforge/cookbook-openstack-network
|
||||
check:
|
||||
- gate-cookbook-openstack-network-chef-lint
|
||||
- gate-cookbook-openstack-network-chef-style
|
||||
- gate-cookbook-openstack-network-chef-unit
|
||||
gate:
|
||||
- gate-cookbook-openstack-network-chef-lint
|
||||
@ -2924,6 +2932,7 @@ projects:
|
||||
- name: stackforge/cookbook-openstack-object-storage
|
||||
check:
|
||||
- gate-cookbook-openstack-object-storage-chef-lint
|
||||
- gate-cookbook-openstack-object-storage-chef-style
|
||||
- gate-cookbook-openstack-object-storage-chef-unit
|
||||
gate:
|
||||
- gate-cookbook-openstack-object-storage-chef-lint
|
||||
@ -2932,6 +2941,7 @@ projects:
|
||||
- name: stackforge/cookbook-openstack-ops-database
|
||||
check:
|
||||
- gate-cookbook-openstack-ops-database-chef-lint
|
||||
- gate-cookbook-openstack-ops-database-chef-style
|
||||
- gate-cookbook-openstack-ops-database-chef-unit
|
||||
gate:
|
||||
- gate-cookbook-openstack-ops-database-chef-lint
|
||||
@ -2940,6 +2950,7 @@ projects:
|
||||
- name: stackforge/cookbook-openstack-ops-messaging
|
||||
check:
|
||||
- gate-cookbook-openstack-ops-messaging-chef-lint
|
||||
- gate-cookbook-openstack-ops-messaging-chef-style
|
||||
- gate-cookbook-openstack-ops-messaging-chef-unit
|
||||
gate:
|
||||
- gate-cookbook-openstack-ops-messaging-chef-lint
|
||||
@ -2948,6 +2959,7 @@ projects:
|
||||
- name: stackforge/cookbook-openstack-orchestration
|
||||
check:
|
||||
- gate-cookbook-openstack-orchestration-chef-lint
|
||||
- gate-cookbook-openstack-orchestration-chef-style
|
||||
- gate-cookbook-openstack-orchestration-chef-unit
|
||||
gate:
|
||||
- gate-cookbook-openstack-orchestration-chef-lint
|
||||
|
Loading…
Reference in New Issue
Block a user