Skip to content
A CLI to analyze artifacts from a Chef Infra Server
Go Shell Makefile PowerShell
Branch: master
Clone or download
Chef Expeditor
Chef Expeditor Bump version to 0.1.30 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
Latest commit 8abb16d Nov 15, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.buildkite/hooks [pipeline] Shrink Code Coverage Table (GH Comment) Nov 5, 2019
.expeditor
.github Adds GH issue templates Nov 7, 2019
cmd Remove 'config', 'credentials' and 'featflag' pkgs Nov 13, 2019
docs Updates project status + corrects trademark Nov 7, 2019
habitat Cache Go dependencies using a vendor/ directory Nov 1, 2019
integration Adds integration tests for the new feature flag Nov 14, 2019
pkg/reporting Adding additional test coverage Nov 13, 2019
scripts Add Buildkite artifacts to GH Comment Oct 29, 2019
vendor
.bldr.toml Build the right habitat package Oct 8, 2019
.gitignore Update to use coverage/ and upload artifacts Oct 28, 2019
.studiorc Read and merge WS App (Tray) Config Nov 12, 2019
CODE_COVERAGE Update code coverage to 80.4% Nov 13, 2019
LICENSE
Makefile Make go-build the default make tasks Nov 12, 2019
README.md
VERSION Bump version to 0.1.30 by Chef Expeditor Nov 15, 2019
go.mod chef-analyze is in development and will be hidden Nov 14, 2019
go.sum chef-analyze is in development and will be hidden Nov 14, 2019
main.go chef-analyze is in development and will be hidden Nov 14, 2019

README.md

chef-analyze

Build status Code coverage

A CLI to analyze artifacts from a Chef Infra Server.

Umbrella Project: Chef Workstation

Project State: Prototyping

Issues Response Time Maximum: Not yet defined

Pull Request Response Time Maximum: Not yet defined

Installation

We highly recommend using Chef Workstation, which includes chef-analyze out of the box. If for some reason you can't use Chef Workstation you can manually install the Habitat package chef/chef-analyze.

hab pkg install -b chef/chef-analyze

Development Documentation

The development of this CLI is being done inside a Chef Habitat Studio, you will need to have Chef Habitat installed on your local workstation to proceed with any development task.

Building

From within a Chef Habitat Studio, you can build the chef-analyze CLI by:

  1. Building a native Habitat package.
    $ hab studio enter
    [1][default:/src:0]# build
    
  2. Helper method to build cross-platform binaries.
    $ hab studio enter
    [1][default:/src:0]# build_cross_platform
    
    NOTE: The generated binaries will be located inside the bin/ directoy.

Testing

From within a Chef Habitat Studio, you can run both, unit and integration tests:

  1. Unit tests. (Go-based)
    $ hab studio enter
    [1][default:/src:0]# unit_tests
    
  2. Integration tests. (Go-based)
    $ hab studio enter
    [1][default:/src:0]# integration_tests
    
    NOTE: The integration tests require a binary to test against, this helper automatically triggers a cross-platform build and uses the generated binary for the running platform.

Code coverage

This repository requires any change to always increase, or at least, maintain the percentage of code coverage, to execute the current coverage run:

$ hab studio enter
[1][default:/src:0]# code_coverage

For details about the code coverage open the generated HTML report located at coverage/coverage.html.

Patching a local Chef Workstation Install

You can override the chef-analyze binary that comes inside your local Chef Workstation install by running make patch_local_workstation at the top level folder of this repository. Then just simply run chef-analyze or chef analyze to use the top-level chef wrapper.

Contributing

For information on contributing to this project please see our Contributing Documentation

License & Copyright

  • Copyright:: Copyright (c) 2019 Chef Software, Inc.
  • License:: Apache License, Version 2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
You can’t perform that action at this time.