system-config/modules/openstack_project/files/jenkins_job_builder/config/puppet-module-jobs.yaml
Mathieu Gagné 5c1dacbd81 Fix puppet-lint for bare puppet modules
puppet-lint expands symbolic links and use the realpath when checking
for the location of manifests. This means the autoloader_layout check
still fail although we tried to force the correct folder name
by using a symbolic link named after the puppet module.

This change brings two changes.

It now copies all files to a new folder named after the puppet module.
Rsync is used for the copy process. The destination folder is excluded
and so are hidden folders such as .git.

It also uses an alternative method to determine the module name
by reading the 'name' field from the Modulefile.

This allows a puppet module repository or project to be renamed
without breaking puppet-lint. An example of such use case would be
a rename of puppet-quantum to puppet-neutron.

If the Modulefile is not found or the name cannot be determined,
the puppet-lint builder falls back to its default behavior
which consists of running puppet-lint in the root of the workspace.

Change-Id: I6158ab3b32499820b7d09db7b31d4226650af8ae
2013-08-05 19:05:31 -04:00

47 lines
911 B
YAML

- job-template:
name: 'gate-{name}-puppet-unit-{puppet_version}'
node: '{node}'
builders:
- gerrit-git-prep
- shell: |
export PUPPET_GEM_VERSION='~> {puppet_version}.0'
mkdir .bundled_gems
export GEM_HOME=`pwd`/.bundled_gems
bundle install
bundle exec rake spec SPEC_OPTS='--format documentation'
publishers:
- console-log
- job-template:
name: 'gate-{name}-puppet-lint'
node: '{node}'
builders:
- gerrit-git-prep
- puppet-lint
publishers:
- console-log
- job-template:
name: 'gate-{name}-puppet-syntax'
node: '{node}'
builders:
- gerrit-git-prep
- puppet-syntax
publishers:
- console-log
- job-group:
name: 'puppet-module-unit'
puppet_version:
- 2.7
- 3.0
- 3.1
jobs:
- 'gate-{name}-puppet-unit-{puppet_version}'