项目作者: chef

项目描述 :
A CLI to analyze artifacts from a Chef Infra Server
高级语言: Go
项目地址: git://github.com/chef/chef-analyze.git
创建时间: 2019-09-16T17:39:36Z
项目社区:https://github.com/chef/chef-analyze

开源协议:Apache License 2.0

下载


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.

  1. 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.
    1. $ hab studio enter
    2. [1][default:/src:0]# build
  2. Helper method to build cross-platform binaries.
    1. $ hab studio enter
    2. [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)
    1. $ hab studio enter
    2. [1][default:/src:0]# unit_tests
  2. Integration tests. (Go-based)
    1. $ hab studio enter
    2. [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:

  1. $ hab studio enter
  2. [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

  • Copyright:: Copyright (c) 2019 Chef Software, Inc.
  • License:: Apache License, Version 2.0
  1. Licensed under the Apache License, Version 2.0 (the "License");
  2. you may not use this file except in compliance with the License.
  3. You may obtain a copy of the License at
  4. http://www.apache.org/licenses/LICENSE-2.0
  5. Unless required by applicable law or agreed to in writing, software
  6. distributed under the License is distributed on an "AS IS" BASIS,
  7. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  8. See the License for the specific language governing permissions and
  9. limitations under the License.