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
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
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.
From within a Chef Habitat Studio, you can build the chef-analyze CLI by:
- Building a native Habitat package.
$ hab studio enter [1][default:/src:0]# build
- Helper method to build cross-platform binaries.
NOTE: The generated binaries will be located inside the
$ hab studio enter [1][default:/src:0]# build_cross_platform
bin/
directoy.
From within a Chef Habitat Studio, you can run both, unit and integration tests:
- Unit tests. (Go-based)
$ hab studio enter [1][default:/src:0]# unit_tests
- Integration tests. (Go-based)
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.
$ hab studio enter [1][default:/src:0]# integration_tests
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
.
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.
For information on contributing to this project please see our Contributing Documentation
- 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.