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:
|
builders:
|
||||||
- gerrit-git-prep
|
- gerrit-git-prep
|
||||||
- chef-cookbook-prep
|
- chef-bundler-prep
|
||||||
- chef-cookbook-rspec
|
- chef-berkshelf-prep
|
||||||
|
- chef-cookbook-chefspec
|
||||||
|
|
||||||
publishers:
|
publishers:
|
||||||
- console-log
|
- console-log
|
||||||
@ -16,8 +17,8 @@
|
|||||||
|
|
||||||
builders:
|
builders:
|
||||||
- gerrit-git-prep
|
- gerrit-git-prep
|
||||||
- chef-cookbook-prep
|
- chef-bundler-prep
|
||||||
- chef-cookbook-lint
|
- chef-cookbook-foodcritic
|
||||||
|
|
||||||
publishers:
|
publishers:
|
||||||
- console-log
|
- console-log
|
||||||
@ -28,8 +29,8 @@
|
|||||||
|
|
||||||
builders:
|
builders:
|
||||||
- gerrit-git-prep
|
- gerrit-git-prep
|
||||||
- chef-cookbook-prep
|
- chef-bundler-prep
|
||||||
- chef-cookbook-style
|
- chef-cookbook-rubocop
|
||||||
|
|
||||||
publishers:
|
publishers:
|
||||||
- console-log
|
- console-log
|
||||||
|
@ -88,11 +88,17 @@
|
|||||||
done
|
done
|
||||||
|
|
||||||
- builder:
|
- builder:
|
||||||
name: chef-cookbook-prep
|
name: chef-bundler-prep
|
||||||
builders:
|
builders:
|
||||||
- shell: |
|
- shell: |
|
||||||
mkdir -p .cookbooks .bundle
|
mkdir -p .bundle
|
||||||
ruby1.9.1 /usr/bin/bundle install --path=.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
|
ruby1.9.1 /usr/bin/bundle exec berks install --path=.cookbooks
|
||||||
COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
|
COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
|
||||||
if [ -z $COOKBOOK ]; then
|
if [ -z $COOKBOOK ]; then
|
||||||
@ -101,21 +107,20 @@
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- builder:
|
- builder:
|
||||||
name: chef-cookbook-style
|
name: chef-cookbook-rubocop
|
||||||
builders:
|
builders:
|
||||||
- shell: |
|
- shell: |
|
||||||
COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
|
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:
|
- builder:
|
||||||
name: chef-cookbook-lint
|
name: chef-cookbook-foodcritic
|
||||||
builders:
|
builders:
|
||||||
- shell: |
|
- shell: |
|
||||||
COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
|
ruby1.9.1 /usr/bin/bundle exec foodcritic -f any -t ~FC003 -t ~FC023 .
|
||||||
ruby1.9.1 /usr/bin/bundle exec foodcritic -f any -t ~FC003 -t ~FC023 .cookbooks/$COOKBOOK
|
|
||||||
|
|
||||||
- builder:
|
- builder:
|
||||||
name: chef-cookbook-rspec
|
name: chef-cookbook-chefspec
|
||||||
builders:
|
builders:
|
||||||
- shell: |
|
- shell: |
|
||||||
COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
|
COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
|
||||||
|
@ -1473,6 +1473,7 @@
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- gate-{name}-chef-lint
|
- gate-{name}-chef-lint
|
||||||
|
- gate-{name}-chef-style
|
||||||
- gate-{name}-chef-unit
|
- gate-{name}-chef-unit
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
@ -1492,6 +1493,7 @@
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- gate-{name}-chef-lint
|
- gate-{name}-chef-lint
|
||||||
|
- gate-{name}-chef-style
|
||||||
- gate-{name}-chef-unit
|
- gate-{name}-chef-unit
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
@ -1501,6 +1503,7 @@
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- gate-{name}-chef-lint
|
- gate-{name}-chef-lint
|
||||||
|
- gate-{name}-chef-style
|
||||||
- gate-{name}-chef-unit
|
- gate-{name}-chef-unit
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
@ -1510,6 +1513,7 @@
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- gate-{name}-chef-lint
|
- gate-{name}-chef-lint
|
||||||
|
- gate-{name}-chef-style
|
||||||
- gate-{name}-chef-unit
|
- gate-{name}-chef-unit
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
@ -1519,6 +1523,7 @@
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- gate-{name}-chef-lint
|
- gate-{name}-chef-lint
|
||||||
|
- gate-{name}-chef-style
|
||||||
- gate-{name}-chef-unit
|
- gate-{name}-chef-unit
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
@ -1528,6 +1533,7 @@
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- gate-{name}-chef-lint
|
- gate-{name}-chef-lint
|
||||||
|
- gate-{name}-chef-style
|
||||||
- gate-{name}-chef-unit
|
- gate-{name}-chef-unit
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
@ -1537,6 +1543,7 @@
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- gate-{name}-chef-lint
|
- gate-{name}-chef-lint
|
||||||
|
- gate-{name}-chef-style
|
||||||
- gate-{name}-chef-unit
|
- gate-{name}-chef-unit
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
@ -1546,6 +1553,7 @@
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- gate-{name}-chef-lint
|
- gate-{name}-chef-lint
|
||||||
|
- gate-{name}-chef-style
|
||||||
- gate-{name}-chef-unit
|
- gate-{name}-chef-unit
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
@ -1555,6 +1563,7 @@
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- gate-{name}-chef-lint
|
- gate-{name}-chef-lint
|
||||||
|
- gate-{name}-chef-style
|
||||||
- gate-{name}-chef-unit
|
- gate-{name}-chef-unit
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
@ -1564,6 +1573,7 @@
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- gate-{name}-chef-lint
|
- gate-{name}-chef-lint
|
||||||
|
- gate-{name}-chef-style
|
||||||
- gate-{name}-chef-unit
|
- gate-{name}-chef-unit
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
@ -1573,6 +1583,7 @@
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- gate-{name}-chef-lint
|
- gate-{name}-chef-lint
|
||||||
|
- gate-{name}-chef-style
|
||||||
- gate-{name}-chef-unit
|
- gate-{name}-chef-unit
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
|
@ -2860,6 +2860,7 @@ projects:
|
|||||||
- name: stackforge/cookbook-openstack-block-storage
|
- name: stackforge/cookbook-openstack-block-storage
|
||||||
check:
|
check:
|
||||||
- gate-cookbook-openstack-block-storage-chef-lint
|
- gate-cookbook-openstack-block-storage-chef-lint
|
||||||
|
- gate-cookbook-openstack-block-storage-chef-style
|
||||||
- gate-cookbook-openstack-block-storage-chef-unit
|
- gate-cookbook-openstack-block-storage-chef-unit
|
||||||
gate:
|
gate:
|
||||||
- gate-cookbook-openstack-block-storage-chef-lint
|
- gate-cookbook-openstack-block-storage-chef-lint
|
||||||
@ -2868,6 +2869,7 @@ projects:
|
|||||||
- name: stackforge/cookbook-openstack-common
|
- name: stackforge/cookbook-openstack-common
|
||||||
check:
|
check:
|
||||||
- gate-cookbook-openstack-common-chef-lint
|
- gate-cookbook-openstack-common-chef-lint
|
||||||
|
- gate-cookbook-openstack-common-chef-style
|
||||||
- gate-cookbook-openstack-common-chef-unit
|
- gate-cookbook-openstack-common-chef-unit
|
||||||
gate:
|
gate:
|
||||||
- gate-cookbook-openstack-common-chef-lint
|
- gate-cookbook-openstack-common-chef-lint
|
||||||
@ -2876,6 +2878,7 @@ projects:
|
|||||||
- name: stackforge/cookbook-openstack-compute
|
- name: stackforge/cookbook-openstack-compute
|
||||||
check:
|
check:
|
||||||
- gate-cookbook-openstack-compute-chef-lint
|
- gate-cookbook-openstack-compute-chef-lint
|
||||||
|
- gate-cookbook-openstack-compute-chef-style
|
||||||
- gate-cookbook-openstack-compute-chef-unit
|
- gate-cookbook-openstack-compute-chef-unit
|
||||||
gate:
|
gate:
|
||||||
- gate-cookbook-openstack-compute-chef-lint
|
- gate-cookbook-openstack-compute-chef-lint
|
||||||
@ -2884,6 +2887,7 @@ projects:
|
|||||||
- name: stackforge/cookbook-openstack-dashboard
|
- name: stackforge/cookbook-openstack-dashboard
|
||||||
check:
|
check:
|
||||||
- gate-cookbook-openstack-dashboard-chef-lint
|
- gate-cookbook-openstack-dashboard-chef-lint
|
||||||
|
- gate-cookbook-openstack-dashboard-chef-style
|
||||||
- gate-cookbook-openstack-dashboard-chef-unit
|
- gate-cookbook-openstack-dashboard-chef-unit
|
||||||
gate:
|
gate:
|
||||||
- gate-cookbook-openstack-dashboard-chef-lint
|
- gate-cookbook-openstack-dashboard-chef-lint
|
||||||
@ -2892,6 +2896,7 @@ projects:
|
|||||||
- name: stackforge/cookbook-openstack-identity
|
- name: stackforge/cookbook-openstack-identity
|
||||||
check:
|
check:
|
||||||
- gate-cookbook-openstack-identity-chef-lint
|
- gate-cookbook-openstack-identity-chef-lint
|
||||||
|
- gate-cookbook-openstack-identity-chef-style
|
||||||
- gate-cookbook-openstack-identity-chef-unit
|
- gate-cookbook-openstack-identity-chef-unit
|
||||||
gate:
|
gate:
|
||||||
- gate-cookbook-openstack-identity-chef-lint
|
- gate-cookbook-openstack-identity-chef-lint
|
||||||
@ -2900,6 +2905,7 @@ projects:
|
|||||||
- name: stackforge/cookbook-openstack-image
|
- name: stackforge/cookbook-openstack-image
|
||||||
check:
|
check:
|
||||||
- gate-cookbook-openstack-image-chef-lint
|
- gate-cookbook-openstack-image-chef-lint
|
||||||
|
- gate-cookbook-openstack-image-chef-style
|
||||||
- gate-cookbook-openstack-image-chef-unit
|
- gate-cookbook-openstack-image-chef-unit
|
||||||
gate:
|
gate:
|
||||||
- gate-cookbook-openstack-image-chef-lint
|
- gate-cookbook-openstack-image-chef-lint
|
||||||
@ -2908,6 +2914,7 @@ projects:
|
|||||||
- name: stackforge/cookbook-openstack-metering
|
- name: stackforge/cookbook-openstack-metering
|
||||||
check:
|
check:
|
||||||
- gate-cookbook-openstack-metering-chef-lint
|
- gate-cookbook-openstack-metering-chef-lint
|
||||||
|
- gate-cookbook-openstack-metering-chef-style
|
||||||
- gate-cookbook-openstack-metering-chef-unit
|
- gate-cookbook-openstack-metering-chef-unit
|
||||||
gate:
|
gate:
|
||||||
- gate-cookbook-openstack-metering-chef-lint
|
- gate-cookbook-openstack-metering-chef-lint
|
||||||
@ -2916,6 +2923,7 @@ projects:
|
|||||||
- name: stackforge/cookbook-openstack-network
|
- name: stackforge/cookbook-openstack-network
|
||||||
check:
|
check:
|
||||||
- gate-cookbook-openstack-network-chef-lint
|
- gate-cookbook-openstack-network-chef-lint
|
||||||
|
- gate-cookbook-openstack-network-chef-style
|
||||||
- gate-cookbook-openstack-network-chef-unit
|
- gate-cookbook-openstack-network-chef-unit
|
||||||
gate:
|
gate:
|
||||||
- gate-cookbook-openstack-network-chef-lint
|
- gate-cookbook-openstack-network-chef-lint
|
||||||
@ -2924,6 +2932,7 @@ projects:
|
|||||||
- name: stackforge/cookbook-openstack-object-storage
|
- name: stackforge/cookbook-openstack-object-storage
|
||||||
check:
|
check:
|
||||||
- gate-cookbook-openstack-object-storage-chef-lint
|
- gate-cookbook-openstack-object-storage-chef-lint
|
||||||
|
- gate-cookbook-openstack-object-storage-chef-style
|
||||||
- gate-cookbook-openstack-object-storage-chef-unit
|
- gate-cookbook-openstack-object-storage-chef-unit
|
||||||
gate:
|
gate:
|
||||||
- gate-cookbook-openstack-object-storage-chef-lint
|
- gate-cookbook-openstack-object-storage-chef-lint
|
||||||
@ -2932,6 +2941,7 @@ projects:
|
|||||||
- name: stackforge/cookbook-openstack-ops-database
|
- name: stackforge/cookbook-openstack-ops-database
|
||||||
check:
|
check:
|
||||||
- gate-cookbook-openstack-ops-database-chef-lint
|
- gate-cookbook-openstack-ops-database-chef-lint
|
||||||
|
- gate-cookbook-openstack-ops-database-chef-style
|
||||||
- gate-cookbook-openstack-ops-database-chef-unit
|
- gate-cookbook-openstack-ops-database-chef-unit
|
||||||
gate:
|
gate:
|
||||||
- gate-cookbook-openstack-ops-database-chef-lint
|
- gate-cookbook-openstack-ops-database-chef-lint
|
||||||
@ -2940,6 +2950,7 @@ projects:
|
|||||||
- name: stackforge/cookbook-openstack-ops-messaging
|
- name: stackforge/cookbook-openstack-ops-messaging
|
||||||
check:
|
check:
|
||||||
- gate-cookbook-openstack-ops-messaging-chef-lint
|
- gate-cookbook-openstack-ops-messaging-chef-lint
|
||||||
|
- gate-cookbook-openstack-ops-messaging-chef-style
|
||||||
- gate-cookbook-openstack-ops-messaging-chef-unit
|
- gate-cookbook-openstack-ops-messaging-chef-unit
|
||||||
gate:
|
gate:
|
||||||
- gate-cookbook-openstack-ops-messaging-chef-lint
|
- gate-cookbook-openstack-ops-messaging-chef-lint
|
||||||
@ -2948,6 +2959,7 @@ projects:
|
|||||||
- name: stackforge/cookbook-openstack-orchestration
|
- name: stackforge/cookbook-openstack-orchestration
|
||||||
check:
|
check:
|
||||||
- gate-cookbook-openstack-orchestration-chef-lint
|
- gate-cookbook-openstack-orchestration-chef-lint
|
||||||
|
- gate-cookbook-openstack-orchestration-chef-style
|
||||||
- gate-cookbook-openstack-orchestration-chef-unit
|
- gate-cookbook-openstack-orchestration-chef-unit
|
||||||
gate:
|
gate:
|
||||||
- gate-cookbook-openstack-orchestration-chef-lint
|
- gate-cookbook-openstack-orchestration-chef-lint
|
||||||
|
Loading…
x
Reference in New Issue
Block a user