-
Notifications
You must be signed in to change notification settings - Fork 3
linting
Russell Seymour edited this page Oct 16, 2018
·
2 revisions
This task allows three different types of litning to be performed on a cookbook.
- ChefStyle
- ChefSpec
- Foodcritic
The task assumes that a Rakefile
has been configured for the cookbook that has the required Rake tasks configured for this Azure DevOps task to call.
The following settings are available on this task:
Setting | Group | Required | Default Value | Description |
---|---|---|---|---|
Display Name | Yes | Cookbook Link: | Display name of the tasl. It will be displayed in the pipeline | |
Lint Action | Yes | Lint action to be performed | ||
Lint Action Command | Advanced | No | Rake task that is be executed | |
Lint Action Folder | Advanced | No | $(Build.SourcesDirectory) | Path in which the task should be executed. This is where the Rakefile is stored |
Each of the different lint actions have a default rake task associated with them.
Action | Task |
---|---|
ChefStyle | style:chef |
ChefSpec | spec |
Foodcritic | style:foodcritic |
Your Rakefile
may not have the same tasks in it, and although we encourage you to have consistency in your cookbooks, these task names can ber overridden.
For example if you want to execute a different task for the ChefStyle action, use the 'Lint Action Command' to set an alernative name, e.g. style:rubocop
.
Endpoints
Tasks
- Add Variables to Chef Environment
- Install ChefDK
- Execute Chef Client
- Install InSpec
- Execute Inspec
- Install Gem
- Execute Knife
- Linting
- Test Kitchen
- Release Cookbook Version to Environment
- Update Cookbook Version Number
- Upload Cookbook to Chef Server
- Publish Cookbook to Supermarket
Guides
Releases