Skip to content

Latest commit

History

History
60 lines (37 loc) · 1.7 KB

File metadata and controls

60 lines (37 loc) · 1.7 KB

codecovStatic Badge

Kosli Reporter

This CLI is used to record and query software delivery events to Kosli.

Usage

See the docs

Linting the code

make lint

Building the code (Mac/Linux)

make build

Then to run Kosli commands: ./kosli [COMMAND]

Building the code (Windows)

Windows will not allow building using the makefile, so we need to run the commands directly in the terminal.

set GOFLAGS=""go mod downloadgo mod tidygo vet ./...go build -o kosli.exe -ldflags '-extldflags "-static"' ./cmd/kosli/

Then to run Kosli commands: ./kosli.exe [COMMAND] or .\kosli.exe [COMMAND]

Generating CLI reference docs

To generate docs for all commands into client_reference/: make docs

To generate docs for a specific command: make docs CMD="attest snyk"

Running the tests

To run the tests you need to set the env-var KOSLI_API_TOKEN_PROD to an api-token (with reader rights), for the kosli Org on https://app.kosli.com

To run all tests except the too slow ones: make test_integration

To run all the tests" make test_integration_full

To run only the tests in a single test suite, eg TestAttestJunitCommandTestSuite make test_integration_single TARGET=TestAttestJunitCommandTestSuite

Releasing

See the release guide for details on CI/CD pipelines and the release process.