简体   繁体   中英

Code Style Testing for Chef using Jenkins and GitHub organizations

Currently, we commit Chef cookbooks to individual repos within our GitHub organization. We are configuring a Jenkins job per repo / cookbook which will execute cookstyle first when a commit occurs, and if cookstyle passes with no issues, it will execute Test Kitchen. We have a template Jenkins job we copy and configure for each cookbook we create.

Does anyone know if it's possible to have GitHub hooks in Jenkins to listen for commit events across the entire organization, and then execute cookstyle on a repo where a commit occurred that contain a Chef cookbook? I'd like to have one central job handling the lint testing for our organization.

You wouldn't generally use a single job for this. You would use the GitHub Organization support to scan for all repositories and build them when they change. You can use webhooks to ping individual repos.

You can create github web hooks for your github organization and configure your jenkins with the help of github plugin. Refer this documentation to see how to configure

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM