diff --git a/cmd/kosli/attestArtifact.go b/cmd/kosli/attestArtifact.go index 9bd835fd..f999e8a1 100644 --- a/cmd/kosli/attestArtifact.go +++ b/cmd/kosli/attestArtifact.go @@ -41,7 +41,7 @@ type AttestArtifactPayload struct { const attestArtifactShortDesc = `Attest an artifact creation to a Kosli flow. ` const attestArtifactLongDesc = attestArtifactShortDesc + ` -` + fingerprintDesc + ` +` + fingerprintDesc + kosliIgnoreDesc + ` This command requires access to a git repo to associate the artifact to the git commit it is originating from. You can optionally redact some of the git commit data sent to Kosli using ^--redact-commit-info^` diff --git a/cmd/kosli/fingerprint.go b/cmd/kosli/fingerprint.go index 3538ee72..20fc52e5 100644 --- a/cmd/kosli/fingerprint.go +++ b/cmd/kosli/fingerprint.go @@ -13,7 +13,9 @@ using the ^--exclude^ flag. Excluded paths are relative to the DIR-PATH and can be literal paths or glob patterns. The supported glob pattern syntax is what is documented here: https://pkg.go.dev/path/filepath#Match , -plus the ability to use recursive globs "**"` +plus the ability to use recursive globs "**" + +` + kosliIgnoreDesc const fingerprintLongDesc = fingerprintShortDesc + ` Requires ^--artifact-type^ flag to be set. diff --git a/cmd/kosli/root.go b/cmd/kosli/root.go index 469cb588..a1d8c40e 100644 --- a/cmd/kosli/root.go +++ b/cmd/kosli/root.go @@ -67,6 +67,9 @@ The service principal needs to have the following permissions: 2) Microsoft.ContainerRegistry/registries/pull/read ` + kosliIgnoreDesc = `To specify paths in a directory artifact that should always be excluded from the SHA256 calculation, you can add a ^.kosli_ignore^ file to the root of the artifact. +Each line should specify a relative path or path glob to be ignored. You can include comments in this file, using ^#^. +The ^.kosli_ignore^ will be treated as part of the artifact like any other file,unless it is explicitly ignored itself.` // flags apiTokenFlag = "The Kosli API token." diff --git a/cmd/kosli/snapshotPath.go b/cmd/kosli/snapshotPath.go index 81dae633..39d03eb8 100644 --- a/cmd/kosli/snapshotPath.go +++ b/cmd/kosli/snapshotPath.go @@ -18,7 +18,7 @@ You can exclude certain paths or patterns from the artifact fingerprint using ^- The supported glob pattern syntax is what is documented here: https://pkg.go.dev/path/filepath#Match , plus the ability to use recursive globs "**" -` +` + kosliIgnoreDesc const snapshotPathExample = ` # report one artifact running in a specific path in a filesystem: diff --git a/cmd/kosli/snapshotPaths.go b/cmd/kosli/snapshotPaths.go index 7b76bc0c..cc8b3012 100644 --- a/cmd/kosli/snapshotPaths.go +++ b/cmd/kosli/snapshotPaths.go @@ -23,9 +23,10 @@ glob patterns. The supported glob pattern syntax is what is documented here: https://pkg.go.dev/path/filepath#Match , plus the ability to use recursive globs "**" +` + kosliIgnoreDesc + ` + This is an example YAML paths spec file: ` + - "```yaml\n" + `version: 1 artifacts: