GithubHelp home page GithubHelp logo

00mjk / chef-ci-tools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from clintoncwolfe/chef-ci-tools

0.0 0.0 0.0 168 KB

Glue scripts to assist testing chef cookbooks under Jenkins (and other CI engines)

License: BSD 3-Clause "New" or "Revised" License

Shell 11.00% Ruby 43.41% Perl 45.59%

chef-ci-tools's Introduction

chef-ci-tools

Glue scripts to assist testing chef cookbooks under Jenkins (and other CI engines).

What it Does

This kit tries to fill in some of the gaps between the various chef cookbook testing tools (like foodcritic, etc) and your continuous integration environment.

Currently, we can only do static analysis - no real testing yet. Stay tuned!

foodcritic-junit publisher

Runs foodcritic on each of your cookbooks, one by one. Emits foodcritic output to the console log, but also interprets it, to create an XML report in jUnit format. Each rule is considered a testcase, and each cookbook a test suite - so multiple rule violations of the same rule in the same cookbook appear as one failure, but at least you get a constant number of tests.

All arguments passed to chef-foodcritic-publisher.sh are passed to foodcritic, like this:

foodcritic <your-args> cookbook/<a-cookbook>

jsonlint-junit publisher

Runs jsonlint -v on all files in nodes/ and data_bags. Emits jsonlint to the console log, but also interprets it, to create an XML report in jUnit format. Each file is considered a test case. Tries to interpret the most common errors (trailing comma, unquoted keys, etc).

What you need

* A CI server, like Jenkins or Travis.  
* a foodcritic installation
* a jsonlint installation   
* a chef-solo or chef-client installation (we need knife)
* perl 5.12+ (no CPAN modules needed)

Maturity

Pre-alpha, extremely immature. Works in my environment with my toolset, may not in yours. Pull requests welcome.

Roadmap

* testkitchen is the obvious next step, methinks
* I only use Jenkins, so if someone out there wants to try this with another CI and help me make/keep it portable, I'm open to it.

chef-ci-tools's People

Contributors

clintoncwolfe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.