Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Looking for a tool that shows the output of puppet-lint and rspec-puppet on a screen like jenkins #374

Closed
030 opened this issue Dec 26, 2014 · 2 comments

Comments

@030
Copy link

030 commented Dec 26, 2014

Is it possible to check the Puppet code using Jenkins or something? Would it be possible to indicate that the build fails by interpreting the outcome of puppet-lint and rspec-puppet?

The aim is to run a kind of build once changes have been made to the Puppet code. Puppet-lint and rspec-puppet are helpfull, but is it possible to visualize it on a screen like Jenkins does?

If false would it be an idea to create a new project or extend the rspec-puppet and puppet-lint with this?

@jantman
Copy link

jantman commented Dec 26, 2014

I'm sort of confused by what you mean by "visualize it on a screen". Jenkins can run ANY command, and interprets failures by whether the command failed. It's also very common to do this with TravisCI, and in fact most puppet modules include a .travis.yml file by default. The same configuration, more or less, will work for Jenkins.

I know there were a couple of presentations at PuppetConf this year about CI for puppet; those might prove helpful ( http://info.puppetlabs.com/puppetconf-2014-videos-and-presentations.html ), and I'm sure that googling "puppet jenkins ci" would get you some information on how to do what you want.

There's no need to indicate that a build fails by interpreting output. Both commands (rspec and puppet-lint) will exit non-0 if there was an error, or 0 on success. In addition, there are a number of libraries out there with Rake tasks to handle common testing. For example, the current_module branch of my puppet-reviewboard module ( https://github.com/jantman/puppet-reviewboard/tree/current_module ) is tested by an internal Jenkins instance; Jenkins simply runs bundle install --path vendor and then bundle exec rake test; this runs puppet-lint, syntax (parser validate) and rspec tests, and exits non-zero if any of them fail; any command that exits non-zero in a shell builder in Jenkins will cause the build to be failed.

In addition, I have RSpec generating a results.xml JUnit file (for an example see https://github.com/jantman/puppet-reviewboard/blob/current_module/.rspec) which is parsed by Jenkins and displayed graphically.

@rnelson0
Copy link
Collaborator

This request is a bit out of scope for puppet-lint, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants