diff --git a/modules/openstack_project/files/jenkins_job_builder/config/chef-jobs.yaml b/modules/openstack_project/files/jenkins_job_builder/config/chef-jobs.yaml index 84db2fbbb3..f119e0a77b 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/chef-jobs.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/chef-jobs.yaml @@ -27,3 +27,18 @@ publishers: - console-log + +- job-template: + name: 'gate-{name}-chef-style' + node: '{node}' + + triggers: + - zuul + + builders: + - gerrit-git-prep + - chef-cookbook-prep + - chef-cookbook-style + + publishers: + - console-log diff --git a/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml b/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml index 8532dc4a9c..0a96854cdf 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml @@ -89,6 +89,13 @@ exit 1 fi +- builder: + name: chef-cookbook-style + builders: + - shell: | + COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\') + ruby1.9.1 /usr/bin/bundle exec tailor + - builder: name: chef-cookbook-lint builders: diff --git a/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml b/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml index 3882f76c44..358b8fae88 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml @@ -964,6 +964,7 @@ jobs: - gate-{name}-chef-lint + - gate-{name}-chef-style - gate-{name}-chef-unit - project: diff --git a/modules/openstack_project/files/zuul/layout.yaml b/modules/openstack_project/files/zuul/layout.yaml index dbf7ee2d83..13980f05d1 100644 --- a/modules/openstack_project/files/zuul/layout.yaml +++ b/modules/openstack_project/files/zuul/layout.yaml @@ -1852,9 +1852,11 @@ 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 + - gate-cookbook-openstack-compute-chef-style - gate-cookbook-openstack-compute-chef-unit - name: stackforge/cookbook-openstack-dashboard