Add gate job configuration for Chef cookbooks
This commit adds the Jenkins job builders and gate configuration for the Chef cookbooks. Only the cookbook-openstack-common repo is changed from a NOOP gate to the lint + unit gate at this time, as that cookbook is the first that will be going into the Stackforge repo. Change-Id: I999a990f15829730495ab0891e4d38f1a5795d60 Reviewed-on: https://review.openstack.org/28640 Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Reviewed-by: Khai Do <zaro0508@gmail.com> Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Approved: Jeremy Stanley <fungi@yuggoth.org> Tested-by: Jenkins
This commit is contained in:
parent
beef21e7a7
commit
05aaa0b956
@ -680,7 +680,7 @@ Have Zuul Monitor a Gerrit Project
|
|||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
Define the required jenkins jobs for this project using the Jenkins Job
|
Define the required jenkins jobs for this project using the Jenkins Job
|
||||||
Builder. Edit openstack-infra/config:modules/openstack_project/files/jenkins_jobs/config/projects.yaml
|
Builder. Edit openstack-infra/config:modules/openstack_project/files/jenkins_job_builder/config/projects.yaml
|
||||||
and add the desired jobs. Most projects will use the python jobs template.
|
and add the desired jobs. Most projects will use the python jobs template.
|
||||||
|
|
||||||
A minimum config::
|
A minimum config::
|
||||||
|
@ -0,0 +1,29 @@
|
|||||||
|
- job-template:
|
||||||
|
name: 'gate-{name}-chef-unit'
|
||||||
|
node: '{node}'
|
||||||
|
|
||||||
|
triggers:
|
||||||
|
- zuul
|
||||||
|
|
||||||
|
builders:
|
||||||
|
- gerrit-git-prep
|
||||||
|
- chef-cookbook-prep
|
||||||
|
- chef-cookbook-rspec
|
||||||
|
|
||||||
|
publishers:
|
||||||
|
- console-log
|
||||||
|
|
||||||
|
- job-template:
|
||||||
|
name: 'gate-{name}-chef-lint'
|
||||||
|
node: '{node}'
|
||||||
|
|
||||||
|
triggers:
|
||||||
|
- zuul
|
||||||
|
|
||||||
|
builders:
|
||||||
|
- gerrit-git-prep
|
||||||
|
- chef-cookbook-prep
|
||||||
|
- chef-cookbook-lint
|
||||||
|
|
||||||
|
publishers:
|
||||||
|
- console-log
|
@ -76,6 +76,29 @@
|
|||||||
erb -x -T '-' $f | ruby -c
|
erb -x -T '-' $f | ruby -c
|
||||||
done
|
done
|
||||||
|
|
||||||
|
- builder:
|
||||||
|
name: chef-cookbook-prep
|
||||||
|
builders:
|
||||||
|
- shell: |
|
||||||
|
mkdir -p .cookbooks .bundle
|
||||||
|
bundle install --path=.bundle
|
||||||
|
bundle exec berks install --path=.cookbooks
|
||||||
|
export COOKBOOK=$(awk '/^name/ {print $NF}' metadata.rb |tr -d \"\')
|
||||||
|
if [ -z $COOKBOOK ]; then
|
||||||
|
echo "Cookbook name not defined in metadata.rb"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- builder:
|
||||||
|
name: chef-cookbook-lint
|
||||||
|
builders:
|
||||||
|
- shell: "bundle exec foodcritic -f any -t ~FC003 -t ~FC023 .cookbooks/$COOKBOOK"
|
||||||
|
|
||||||
|
- builder:
|
||||||
|
name: chef-cookbook-rspec
|
||||||
|
builders:
|
||||||
|
- shell: "bundle exec rspec .cookbooks/$COOKBOOK"
|
||||||
|
|
||||||
- builder:
|
- builder:
|
||||||
name: selenium
|
name: selenium
|
||||||
builders:
|
builders:
|
||||||
|
@ -879,3 +879,12 @@
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- python-jobs
|
- python-jobs
|
||||||
|
|
||||||
|
- project:
|
||||||
|
name: cookbook-openstack-common
|
||||||
|
github-org: stackforge
|
||||||
|
node: quantal
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
- gate-{name}-chef-lint
|
||||||
|
- gate-{name}-chef-unit
|
||||||
|
@ -1668,9 +1668,11 @@ projects:
|
|||||||
|
|
||||||
- name: stackforge/cookbook-openstack-common
|
- name: stackforge/cookbook-openstack-common
|
||||||
check:
|
check:
|
||||||
- gate-noop
|
- gate-cookbook-openstack-common-chef-lint
|
||||||
|
- gate-cookbook-openstack-common-chef-unit
|
||||||
gate:
|
gate:
|
||||||
- gate-noop
|
- gate-cookbook-openstack-common-chef-lint
|
||||||
|
- gate-cookbook-openstack-common-chef-unit
|
||||||
|
|
||||||
- name: stackforge/cookbook-openstack-compute
|
- name: stackforge/cookbook-openstack-compute
|
||||||
check:
|
check:
|
||||||
|
Loading…
Reference in New Issue
Block a user