From be584b0c46ac8de25db527ef0715eceba39b9ca9 Mon Sep 17 00:00:00 2001 From: Dan Bode Date: Thu, 4 Apr 2013 12:17:46 -0700 Subject: [PATCH] Integrate gating unit tests to puppet modules This commit adds unit tests that can serve as a minimal gate that verifies the Puppet modules work on the following versions of Puppet: - 2.6 - 2.7 - 3.0 - 3.1 and builds jenkins jobs for the following modules: - cinder - nova - glance - horizon - openstack - swift The unit tests are implemented as a job-group in jenkins job builder with a single project called puppet-module-unit that is set as the check and gate for the stackforge projects. Change-Id: I61684bf150e572adaf3e9d9ae67f22d409f9afa4 Reviewed-on: https://review.openstack.org/26148 Reviewed-by: Clark Boylan Reviewed-by: Dan Bode Approved: James E. Blair Reviewed-by: James E. Blair Tested-by: Jenkins --- .../jenkins_job_builder/config/projects.yaml | 69 ++++++++++++++++ .../config/puppet-module-jobs.yaml | 21 +++++ .../openstack_project/files/zuul/layout.yaml | 78 ++++++++++++++----- 3 files changed, 150 insertions(+), 18 deletions(-) create mode 100644 modules/openstack_project/files/jenkins_job_builder/config/puppet-module-jobs.yaml 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 f72db40040..5b07c2dfad 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml @@ -738,3 +738,72 @@ jobs: - python-jobs + +- project: + name: puppet-glance + github-org: stackforge + node: quantal + tarball-site: tarballs.openstack.org + + jobs: + - puppet-module-unit + + +- project: + name: puppet-keystone + github-org: stackforge + node: quantal + tarball-site: tarballs.openstack.org + + jobs: + - puppet-module-unit + + +- project: + name: puppet-cinder + github-org: stackforge + node: quantal + tarball-site: tarballs.openstack.org + + jobs: + - puppet-module-unit + + +- project: + name: puppet-nova + github-org: stackforge + node: quantal + tarball-site: tarballs.openstack.org + + jobs: + - puppet-module-unit + + +- project: + name: puppet-horizon + github-org: stackforge + node: quantal + tarball-site: tarballs.openstack.org + + jobs: + - puppet-module-unit + + +- project: + name: puppet-openstack + github-org: stackforge + node: quantal + tarball-site: tarballs.openstack.org + + jobs: + - puppet-module-unit + + +- project: + name: puppet-swift + github-org: stackforge + node: quantal + tarball-site: tarballs.openstack.org + + jobs: + - puppet-module-unit diff --git a/modules/openstack_project/files/jenkins_job_builder/config/puppet-module-jobs.yaml b/modules/openstack_project/files/jenkins_job_builder/config/puppet-module-jobs.yaml new file mode 100644 index 0000000000..28012b0ace --- /dev/null +++ b/modules/openstack_project/files/jenkins_job_builder/config/puppet-module-jobs.yaml @@ -0,0 +1,21 @@ +- job-template: + name: 'gate-{name}-puppet-unit-{puppet_version}' + node: '{node}' + + builders: + - shell: | + export PUPPET_GEM_VERSION={puppet_version} + bundle install + echo {puppet_version} | grep '2.6' && git clone git://github.com/puppetlabs/puppetlabs-create_resources.git spec/fixtures/modules/create_resources || true + bundle exec rake spec SPEC_OPTS='--format documentation' + + +- job-group: + name: 'puppet-module-unit' + puppet_version: + - 2.6 + - 2.7 + - 3.0 + - 3.1 + jobs: + - 'gate-{name}-puppet-unit-{puppet_version}' diff --git a/modules/openstack_project/files/zuul/layout.yaml b/modules/openstack_project/files/zuul/layout.yaml index 24e3ed9a4d..ff679f8dfe 100644 --- a/modules/openstack_project/files/zuul/layout.yaml +++ b/modules/openstack_project/files/zuul/layout.yaml @@ -1463,47 +1463,89 @@ projects: - name: stackforge/puppet-cinder check: - - gate-noop + - gate-puppet-cinder-puppet-unit-2.6 + - gate-puppet-cinder-puppet-unit-2.7 + - gate-puppet-cinder-puppet-unit-3.0 + - gate-puppet-cinder-puppet-unit-3.1 gate: - - gate-noop + - gate-puppet-cinder-puppet-unit-2.6 + - gate-puppet-cinder-puppet-unit-2.7 + - gate-puppet-cinder-puppet-unit-3.0 + - gate-puppet-cinder-puppet-unit-3.1 - name: stackforge/puppet-glance check: - - gate-noop + - gate-puppet-glance-puppet-unit-2.6 + - gate-puppet-glance-puppet-unit-2.7 + - gate-puppet-glance-puppet-unit-3.0 + - gate-puppet-glance-puppet-unit-3.1 gate: - - gate-noop + - gate-puppet-glance-puppet-unit-2.6 + - gate-puppet-glance-puppet-unit-2.7 + - gate-puppet-glance-puppet-unit-3.0 + - gate-puppet-glance-puppet-unit-3.1 - name: stackforge/puppet-horizon check: - - gate-noop + - gate-puppet-horizon-puppet-unit-2.6 + - gate-puppet-horizon-puppet-unit-2.7 + - gate-puppet-horizon-puppet-unit-3.0 + - gate-puppet-horizon-puppet-unit-3.1 gate: - - gate-noop + - gate-puppet-horizon-puppet-unit-2.6 + - gate-puppet-horizon-puppet-unit-2.7 + - gate-puppet-horizon-puppet-unit-3.0 + - gate-puppet-horizon-puppet-unit-3.1 - name: stackforge/puppet-keystone check: - - gate-noop + - gate-puppet-keystone-puppet-unit-2.6 + - gate-puppet-keystone-puppet-unit-2.7 + - gate-puppet-keystone-puppet-unit-3.0 + - gate-puppet-keystone-puppet-unit-3.1 gate: - - gate-noop + - gate-puppet-keystone-puppet-unit-2.6 + - gate-puppet-keystone-puppet-unit-2.7 + - gate-puppet-keystone-puppet-unit-3.0 + - gate-puppet-keystone-puppet-unit-3.1 - name: stackforge/puppet-nova check: - - gate-noop + - gate-puppet-nova-puppet-unit-2.6 + - gate-puppet-nova-puppet-unit-2.7 + - gate-puppet-nova-puppet-unit-3.0 + - gate-puppet-nova-puppet-unit-3.1 gate: - - gate-noop + - gate-puppet-nova-puppet-unit-2.6 + - gate-puppet-nova-puppet-unit-2.7 + - gate-puppet-nova-puppet-unit-3.0 + - gate-puppet-nova-puppet-unit-3.1 - name: stackforge/puppet-openstack check: - - gate-noop + - gate-puppet-openstack-puppet-unit-2.6 + - gate-puppet-openstack-puppet-unit-2.7 + - gate-puppet-openstack-puppet-unit-3.0 + - gate-puppet-openstack-puppet-unit-3.1 gate: - - gate-noop - - - name: stackforge/puppet-openstack_dev_env - check: - - gate-noop - gate: - - gate-noop + - gate-puppet-openstack-puppet-unit-2.6 + - gate-puppet-openstack-puppet-unit-2.7 + - gate-puppet-openstack-puppet-unit-3.0 + - gate-puppet-openstack-puppet-unit-3.1 - name: stackforge/puppet-swift + check: + - gate-puppet-swift-puppet-unit-2.6 + - gate-puppet-swift-puppet-unit-2.7 + - gate-puppet-swift-puppet-unit-3.0 + - gate-puppet-swift-puppet-unit-3.1 + gate: + - gate-puppet-swift-puppet-unit-2.6 + - gate-puppet-swift-puppet-unit-2.7 + - gate-puppet-swift-puppet-unit-3.0 + - gate-puppet-swift-puppet-unit-3.1 + + - name: stackforge/puppet-openstack_dev_env check: - gate-noop gate: