diff --git a/docs.kosli.com/assets/metadata.json b/docs.kosli.com/assets/metadata.json index 2dacd86c1..80dc6be78 100644 --- a/docs.kosli.com/assets/metadata.json +++ b/docs.kosli.com/assets/metadata.json @@ -1 +1 @@ -{"currentversion": "v2.10.18"} +{"currentversion": "v2.11.0"} diff --git a/docs.kosli.com/content/client_reference/kosli_attest_junit.md b/docs.kosli.com/content/client_reference/kosli_attest_junit.md index f6c28a07b..5eb50a2a4 100644 --- a/docs.kosli.com/content/client_reference/kosli_attest_junit.md +++ b/docs.kosli.com/content/client_reference/kosli_attest_junit.md @@ -8,7 +8,9 @@ deprecated: false ## Synopsis -Report a junit attestation to an artifact or a trail in a Kosli flow. +Report a junit attestation to an artifact or a trail in a Kosli flow. +JUnit xml files are read from the `--results-dir` directory which defaults to the current directory. +The xml files are automatically uploaded as `--attachments` via the `--upload-results` flag which defaults to `true`. The attestation can be bound to a trail using the trail name. diff --git a/docs.kosli.com/content/client_reference/kosli_begin_trail.md b/docs.kosli.com/content/client_reference/kosli_begin_trail.md index 241bf4778..a63833cab 100644 --- a/docs.kosli.com/content/client_reference/kosli_begin_trail.md +++ b/docs.kosli.com/content/client_reference/kosli_begin_trail.md @@ -11,7 +11,10 @@ deprecated: false Begin or update a Kosli flow trail. You can optionally associate the trail to a git commit using `--commit` (requires access to a git repo). And you -can optionally redact some of the git commit data sent to Kosli using `--redact-commit-info` +can optionally redact some of the git commit data sent to Kosli using `--redact-commit-info`. + +`TRAIL-NAME`s must start with a letter or number, and only contain letters, numbers, `.`, `-`, `_`, and `~`. + ```shell kosli begin trail TRAIL-NAME [flags] diff --git a/docs.kosli.com/content/client_reference/kosli_create_environment.md b/docs.kosli.com/content/client_reference/kosli_create_environment.md index f4874fa94..2201e29fe 100644 --- a/docs.kosli.com/content/client_reference/kosli_create_environment.md +++ b/docs.kosli.com/content/client_reference/kosli_create_environment.md @@ -35,6 +35,8 @@ Logical environments are used for grouping of physical environments. For instanc be grouped into logical environment **prod**. Logical environments are view-only, you can not report snapshots to them. +`ENVIRONMENT-NAME`s must start with a letter or number, and only contain letters, numbers, `.`, `-`, `_`, and `~`. + ```shell kosli create environment ENVIRONMENT-NAME [flags] diff --git a/docs.kosli.com/content/client_reference/kosli_create_flow.md b/docs.kosli.com/content/client_reference/kosli_create_flow.md index 6973e8765..e13fe6169 100644 --- a/docs.kosli.com/content/client_reference/kosli_create_flow.md +++ b/docs.kosli.com/content/client_reference/kosli_create_flow.md @@ -11,6 +11,9 @@ deprecated: false Create or update a Kosli flow. You can specify flow parameters in flags. +`FLOW-NAME`s must start with a letter or number, and only contain letters, numbers, `.`, `-`, `_`, and `~`. + + ```shell kosli create flow FLOW-NAME [flags] ``` diff --git a/docs.kosli.com/content/client_reference/kosli_snapshot_ecs.md b/docs.kosli.com/content/client_reference/kosli_snapshot_ecs.md index 6efe92ca1..48084dc44 100644 --- a/docs.kosli.com/content/client_reference/kosli_snapshot_ecs.md +++ b/docs.kosli.com/content/client_reference/kosli_snapshot_ecs.md @@ -8,7 +8,8 @@ deprecated: false ## Synopsis -Report a snapshot of running containers in an AWS ECS cluster or service to Kosli. +Report a snapshot of running containers in one or more AWS ECS cluster(s) to Kosli. +Skip `--clusters` and `--clusters-regex` to report all clusters in a given AWS account. Or use `--exclude` and/or `--exclude-regex` to report all clusters excluding some. The reported data includes container image digests and creation timestamps. To authenticate to AWS, you can either: @@ -30,10 +31,12 @@ kosli snapshot ecs ENVIRONMENT-NAME [flags] | --aws-key-id string | The AWS access key ID. | | --aws-region string | The AWS region. | | --aws-secret-key string | The AWS secret access key. | -| -C, --cluster string | The name of the ECS cluster. | +| --clusters strings | [optional] The comma-separated list of ECS cluster names to snapshot. Can't be used together with --exclude or --exclude-regex. | +| --clusters-regex strings | [optional] The comma-separated list of ECS cluster name regex patterns to snapshot. Can't be used together with --exclude or --exclude-regex. | | -D, --dry-run | [optional] Run in dry-run mode. When enabled, no data is sent to Kosli and the CLI exits with 0 exit code regardless of any errors. | +| --exclude strings | [optional] The comma-separated list of ECS cluster names to exclude. Can't be used together with --exclude or --exclude-regex. | +| --exclude-regex strings | [optional] The comma-separated list of ECS cluster name regex patterns to exclude. Can't be used together with --clusters or --clusters-regex. | | -h, --help | help for ecs | -| -s, --service-name string | [optional] The name of the ECS service. | ## Flags inherited from parent commands @@ -58,7 +61,7 @@ export AWS_ACCESS_KEY_ID=yourAWSAccessKeyID export AWS_SECRET_ACCESS_KEY=yourAWSSecretAccessKey kosli snapshot ecs yourEnvironmentName \ - --cluster yourECSClusterName \ + --clusters yourECSClusterName \ --api-token yourAPIToken \ --org yourOrgName @@ -72,22 +75,33 @@ export AWS_ACCESS_KEY_ID=yourAWSAccessKeyID export AWS_SECRET_ACCESS_KEY=yourAWSSecretAccessKey kosli snapshot ecs yourEnvironmentName \ - --cluster yourECSClusterName \ + --clusters yourECSClusterName \ --service-name yourECSServiceName \ --api-token yourAPIToken \ --org yourOrgName ``` -**report what is running in in a specific AWS ECS service within a cluster (AWS auth provided in flags)** +**report what is running in all ECS clusters in an AWS account (AWS auth provided in flags)** + +```shell +kosli snapshot ecs yourEnvironmentName \ + --aws-key-id yourAWSAccessKeyID \ + --aws-secret-key yourAWSSecretAccessKey \ + --aws-region yourAWSRegion \ + --api-token yourAPIToken \ + --org yourOrgName + +``` + +**report what is running in all ECS clusters in an AWS account except for clusters with names matching given regex patterns** ```shell kosli snapshot ecs yourEnvironmentName \ - --cluster yourECSClusterName \ - --service-name yourECSServiceName \ --aws-key-id yourAWSAccessKeyID \ --aws-secret-key yourAWSSecretAccessKey \ --aws-region yourAWSRegion \ + --exclude-regex "those-names.*" \ --api-token yourAPIToken \ --org yourOrgName ``` diff --git a/docs.kosli.com/content/client_reference/kosli_snapshot_k8s.md b/docs.kosli.com/content/client_reference/kosli_snapshot_k8s.md index 480ab5ce3..04a3902ab 100644 --- a/docs.kosli.com/content/client_reference/kosli_snapshot_k8s.md +++ b/docs.kosli.com/content/client_reference/kosli_snapshot_k8s.md @@ -9,6 +9,7 @@ deprecated: false ## Synopsis Report a snapshot of running pods in a K8S cluster or namespace(s) to Kosli. +Skip `--namespaces` and `--namespaces-regex` to report all pods in all namespaces in a cluster. The reported data includes pod container images digests and creation timestamps. You can customize the scope of reporting to include or exclude namespaces. @@ -20,10 +21,12 @@ kosli snapshot k8s ENVIRONMENT-NAME [flags] | Flag | Description | | :--- | :--- | | -D, --dry-run | [optional] Run in dry-run mode. When enabled, no data is sent to Kosli and the CLI exits with 0 exit code regardless of any errors. | -| -x, --exclude-namespaces strings | [conditional] The comma separated list of namespaces regex patterns NOT to report artifacts info from. Can't be used together with --namespace. | +| -x, --exclude-namespaces strings | [optional] The comma separated list of namespaces names to exclude from reporting artifacts info from. Can't be used together with --namespaces or --namespaces-regex. | +| --exclude-namespaces-regex strings | [optional] The comma separated list of namespaces regex patterns to exclude from reporting artifacts info from. Can't be used together with --namespaces or --namespaces-regex. | | -h, --help | help for k8s | | -k, --kubeconfig string | [defaulted] The kubeconfig path for the target cluster. (default "$HOME/.kube/config") | -| -n, --namespaces strings | [conditional] The comma separated list of namespaces regex patterns to report artifacts info from. Can't be used together with --exclude-namespace. | +| -n, --namespaces strings | [optional] The comma separated list of namespaces names to report artifacts info from. Can't be used together with --exclude-namespaces or --exclude-namespaces-regex. | +| --namespaces-regex strings | [optional] The comma separated list of namespaces regex patterns to report artifacts info from. Can't be used together with --exclude-namespaces --exclude-namespaces-regex. | ## Flags inherited from parent commands diff --git a/docs.kosli.com/content/client_reference/kosli_snapshot_lambda.md b/docs.kosli.com/content/client_reference/kosli_snapshot_lambda.md index b6ef6509e..4748cbd9e 100644 --- a/docs.kosli.com/content/client_reference/kosli_snapshot_lambda.md +++ b/docs.kosli.com/content/client_reference/kosli_snapshot_lambda.md @@ -9,7 +9,7 @@ deprecated: false ## Synopsis Report a snapshot of artifacts deployed as one or more AWS Lambda functions and their digests to Kosli. -Skip `--function-names` to report all functions in a given AWS account. Or use `--exclude` and/or `--exclude-regex` to report all functions excluding some. +Skip `--function-names` and `--function-names-regex` to report all functions in a given AWS account. Or use `--exclude` and/or `--exclude-regex` to report all functions excluding some. To authenticate to AWS, you can either: 1) provide the AWS static credentials via flags or by exporting the equivalent KOSLI env vars (e.g. KOSLI_AWS_KEY_ID) @@ -33,7 +33,8 @@ kosli snapshot lambda ENVIRONMENT-NAME [flags] | -D, --dry-run | [optional] Run in dry-run mode. When enabled, no data is sent to Kosli and the CLI exits with 0 exit code regardless of any errors. | | --exclude strings | [optional] The comma-separated list of AWS Lambda function names to be excluded. Cannot be used together with --function-names | | --exclude-regex strings | [optional] The comma-separated list of name regex patterns for AWS Lambda functions to be excluded. Cannot be used together with --function-names. Allowed regex patterns are described in https://github.com/google/re2/wiki/Syntax | -| --function-names strings | [optional] The comma-separated list of AWS Lambda function names to be reported. | +| --function-names strings | [optional] The comma-separated list of AWS Lambda function names to be reported. Cannot be used together with --exclude or --exclude-regex. | +| --function-names-regex strings | [optional] The comma-separated list of AWS Lambda function names regex patterns to be reported. Cannot be used together with --exclude or --exclude-regex. | | -h, --help | help for lambda | @@ -93,6 +94,20 @@ kosli snapshot lambda yourEnvironmentName \ ``` +**report what is running in the latest version of AWS Lambda functions that match a name regex** + +```shell +export AWS_REGION=yourAWSRegion +export AWS_ACCESS_KEY_ID=yourAWSAccessKeyID +export AWS_SECRET_ACCESS_KEY=yourAWSSecretAccessKey + +kosli snapshot lambda yourEnvironmentName \ + --function-names-regex yourFunctionNameRegexPattern \ + --api-token yourAPIToken \ + --org yourOrgName + +``` + **report what is running in the latest version of multiple AWS Lambda functions (AWS auth provided in env variables)** ```shell diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/_index.md b/docs.kosli.com/content/legacy_ref/v2.10.13/_index.md deleted file mode 100644 index 0b293c5a9..000000000 --- a/docs.kosli.com/content/legacy_ref/v2.10.13/_index.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: v2.10.13 -bookCollapseSection: true -weight: 604 ---- - -# v2.10.13 diff --git a/docs.kosli.com/content/legacy_ref/v2.10.14/_index.md b/docs.kosli.com/content/legacy_ref/v2.10.14/_index.md index d55750f40..cc774748c 100644 --- a/docs.kosli.com/content/legacy_ref/v2.10.14/_index.md +++ b/docs.kosli.com/content/legacy_ref/v2.10.14/_index.md @@ -1,7 +1,7 @@ --- title: v2.10.14 bookCollapseSection: true -weight: 603 +weight: 604 --- # v2.10.14 diff --git a/docs.kosli.com/content/legacy_ref/v2.10.15/_index.md b/docs.kosli.com/content/legacy_ref/v2.10.15/_index.md index 9fe2e3279..ba7195574 100644 --- a/docs.kosli.com/content/legacy_ref/v2.10.15/_index.md +++ b/docs.kosli.com/content/legacy_ref/v2.10.15/_index.md @@ -1,7 +1,7 @@ --- title: v2.10.15 bookCollapseSection: true -weight: 602 +weight: 603 --- # v2.10.15 diff --git a/docs.kosli.com/content/legacy_ref/v2.10.16/_index.md b/docs.kosli.com/content/legacy_ref/v2.10.16/_index.md index 0bb66f0f2..1f3a6273e 100644 --- a/docs.kosli.com/content/legacy_ref/v2.10.16/_index.md +++ b/docs.kosli.com/content/legacy_ref/v2.10.16/_index.md @@ -1,7 +1,7 @@ --- title: v2.10.16 bookCollapseSection: true -weight: 601 +weight: 602 --- # v2.10.16 diff --git a/docs.kosli.com/content/legacy_ref/v2.10.17/_index.md b/docs.kosli.com/content/legacy_ref/v2.10.17/_index.md index 5ad1922eb..9b80f5efa 100644 --- a/docs.kosli.com/content/legacy_ref/v2.10.17/_index.md +++ b/docs.kosli.com/content/legacy_ref/v2.10.17/_index.md @@ -1,7 +1,7 @@ --- title: v2.10.17 bookCollapseSection: true -weight: 600 +weight: 601 --- # v2.10.17 diff --git a/docs.kosli.com/content/legacy_ref/v2.10.18/_index.md b/docs.kosli.com/content/legacy_ref/v2.10.18/_index.md new file mode 100644 index 000000000..ef6e73cac --- /dev/null +++ b/docs.kosli.com/content/legacy_ref/v2.10.18/_index.md @@ -0,0 +1,7 @@ +--- +title: v2.10.18 +bookCollapseSection: true +weight: 600 +--- + +# v2.10.18 diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_allow_artifact.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_allow_artifact.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_allow_artifact.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_allow_artifact.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_archive_environment.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_archive_environment.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_archive_environment.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_archive_environment.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_archive_flow.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_archive_flow.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_archive_flow.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_archive_flow.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_assert_approval.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_assert_approval.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_assert_approval.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_assert_approval.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_assert_artifact.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_assert_artifact.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_assert_artifact.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_assert_artifact.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_assert_pullrequest_azure.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_assert_pullrequest_azure.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_assert_pullrequest_azure.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_assert_pullrequest_azure.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_assert_pullrequest_bitbucket.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_assert_pullrequest_bitbucket.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_assert_pullrequest_bitbucket.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_assert_pullrequest_bitbucket.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_assert_pullrequest_github.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_assert_pullrequest_github.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_assert_pullrequest_github.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_assert_pullrequest_github.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_assert_pullrequest_gitlab.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_assert_pullrequest_gitlab.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_assert_pullrequest_gitlab.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_assert_pullrequest_gitlab.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_assert_snapshot.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_assert_snapshot.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_assert_snapshot.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_assert_snapshot.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_assert_status.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_assert_status.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_assert_status.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_assert_status.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_artifact.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_artifact.md similarity index 93% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_artifact.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_artifact.md index c155cf770..c763909eb 100644 --- a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_artifact.md +++ b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_artifact.md @@ -9,7 +9,9 @@ deprecated: false ## Synopsis Attest an artifact creation to a Kosli flow. -The artifact SHA256 fingerprint is calculated (based on the `--artifact-type` flag and the artifact name/path argument) or can be provided directly (with the `--fingerprint` flag). +The artifact SHA256 fingerprint is calculated (based on the `--artifact-type` flag and the artifact name/path argument) or can be provided directly (with the `--fingerprint` flag).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. 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/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_generic.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_generic.md similarity index 99% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_generic.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_generic.md index 2452ca399..05c40fa58 100644 --- a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_generic.md +++ b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_generic.md @@ -119,6 +119,7 @@ kosli attest generic \ --name yourTemplateArtifactName.yourAttestationName \ --flow yourFlowName \ --trail yourTrailName \ + --commit yourArtifactGitCommit \ --api-token yourAPIToken \ --org yourOrgName @@ -131,7 +132,7 @@ kosli attest generic \ --name yourAttestationName \ --flow yourFlowName \ --trail yourTrailName \ - --attachments=yourAttachmentPathName \ + --attachments yourAttachmentPathName \ --api-token yourAPIToken \ --org yourOrgName diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_jira.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_jira.md similarity index 99% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_jira.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_jira.md index 6699f34e0..16f5ac5f5 100644 --- a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_jira.md +++ b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_jira.md @@ -135,6 +135,7 @@ kosli attest jira \ --name yourTemplateArtifactName.yourAttestationName \ --flow yourFlowName \ --trail yourTrailName \ + --commit yourArtifactGitCommit \ --jira-base-url https://kosli.atlassian.net \ --jira-username user@domain.com \ --jira-api-token yourJiraAPIToken \ @@ -153,7 +154,7 @@ kosli attest jira \ --jira-base-url https://kosli.atlassian.net \ --jira-username user@domain.com \ --jira-api-token yourJiraAPIToken \ - --attachments=yourAttachmentPathName \ + --attachments yourAttachmentPathName \ --api-token yourAPIToken \ --org yourOrgName diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_junit.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_junit.md similarity index 99% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_junit.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_junit.md index e50af0609..f6c28a07b 100644 --- a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_junit.md +++ b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_junit.md @@ -123,6 +123,7 @@ kosli attest junit \ --name yourTemplateArtifactName.yourAttestationName \ --flow yourFlowName \ --trail yourTrailName \ + --commit yourArtifactGitCommit \ --results-dir yourFolderWithJUnitResults \ --api-token yourAPIToken \ --org yourOrgName @@ -137,7 +138,7 @@ kosli attest junit \ --flow yourFlowName \ --trail yourTrailName \ --results-dir yourFolderWithJUnitResults \ - --attachments=yourAttachmentPathName \ + --attachments yourAttachmentPathName \ --api-token yourAPIToken \ --org yourOrgName ``` diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_pullrequest_azure.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_pullrequest_azure.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_pullrequest_azure.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_pullrequest_azure.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_pullrequest_bitbucket.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_pullrequest_bitbucket.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_pullrequest_bitbucket.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_pullrequest_bitbucket.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_pullrequest_github.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_pullrequest_github.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_pullrequest_github.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_pullrequest_github.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_pullrequest_gitlab.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_pullrequest_gitlab.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_pullrequest_gitlab.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_pullrequest_gitlab.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_snyk.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_snyk.md similarity index 99% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_snyk.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_snyk.md index 0d8522536..4b69f1eaf 100644 --- a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_snyk.md +++ b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_snyk.md @@ -131,6 +131,7 @@ kosli attest snyk \ --name yourTemplateArtifactName.yourAttestationName \ --flow yourFlowName \ --trail yourTrailName \ + --commit yourArtifactGitCommit \ --scan-results yourSnykSARIFScanResults \ --api-token yourAPIToken \ --org yourOrgName @@ -145,7 +146,7 @@ kosli attest snyk \ --flow yourFlowName \ --trail yourTrailName \ --scan-results yourSnykSARIFScanResults \ - --attachments=yourEvidencePathName \ + --attachments yourEvidencePathName \ --api-token yourAPIToken \ --org yourOrgName diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_sonar.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_sonar.md similarity index 71% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_sonar.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_sonar.md index f8a29152b..c4fec472e 100644 --- a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_attest_sonar.md +++ b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_attest_sonar.md @@ -8,10 +8,21 @@ deprecated: false ## Synopsis -Report a sonarcloud or sonarqube attestation to an artifact or a trail in a Kosli flow. -Retrieves the latest scan results for the given project key from SonarCloud or SonarQube (if a SonarQube server URL is given). +Report a SonarCloud or SonarQube attestation to an artifact or a trail in a Kosli flow. +Retrieves results for the specified scan from SonarCloud or SonarQube and attests them to Kosli. The results are parsed to find the status of the project's quality gate which is used to determine the attestation's compliance status. +The scan to be retrieved can be specified in two ways: +1. (Default) Using metadata created by the Sonar scanner. By default this is located within a temporary .scannerwork folder in the repo base directory. +If you have overriden the location of this folder by passing parameters to the Sonar scanner, or are running Kosli's CLI locally outside the repo's base directory, +you can provide the correct path using the --sonar-working-dir flag. This metadata is generated by a specific scan, allowing Kosli to retrieve the results of that scan. +2. Providing the Sonar project key and the revision of the scan (plus the SonarQube server URL if relevant). If running the Kosli CLI in some CI/CD pipeline, the revision +is defaulted to the commit SHA. If you are running the command locally, or have overriden the revision in SonarCloud/SonarQube via parameters to the Sonar scanner, you can +provide the correct revision using the --sonar-revision flag. Kosli then finds the scan results for the specified project key and revision. + +Note that if your project is very large and you are using SonarCloud's automatic analysis, it is possible for the attest sonar command to run before the SonarCloud scan is completed. +In this case, we recommend using Kosli's Sonar webhook integration ( https://docs.kosli.com/integrations/sonar/ ) rather than the CLI to attest the scan results. + The attestation can be bound to a trail using the trail name. @@ -29,7 +40,6 @@ kosli attest sonar [IMAGE-NAME | FILE-PATH | DIR-PATH] [flags] | --annotate stringToString | [optional] Annotate the attestation with data using key=value. | | -t, --artifact-type string | The type of the artifact to calculate its SHA256 fingerprint. One of: [docker, file, dir]. Only required if you want Kosli to calculate the fingerprint for you (i.e. when you don't specify '--fingerprint' on commands that allow it). | | --attachments strings | [optional] The comma-separated list of paths of attachments for the reported attestation. Attachments can be files or directories. All attachments are compressed and uploaded to Kosli's evidence vault. | -| --branch-name string | [optional] The name of the branch being analysed by SonarCloud/SonarQube. Cannot be used together with --pull-request-id . | | -g, --commit string | [conditional] The git commit for which the attestation is associated to. Becomes required when reporting an attestation for an artifact before reporting it to Kosli. (defaulted in some CIs: https://docs.kosli.com/ci-defaults ). | | --description string | [optional] attestation description | | -D, --dry-run | [optional] Run in dry-run mode. When enabled, no data is sent to Kosli and the CLI exits with 0 exit code regardless of any errors. | @@ -41,15 +51,16 @@ kosli attest sonar [IMAGE-NAME | FILE-PATH | DIR-PATH] [flags] | -h, --help | help for sonar | | -n, --name string | The name of the attestation as declared in the flow or trail yaml template. | | -o, --origin-url string | [optional] The url pointing to where the attestation came from or is related. (defaulted to the CI url in some CIs: https://docs.kosli.com/ci-defaults ). | -| --pull-request-id string | [optional] The ID of the pull request being analysed by SonarCloud/SonarQube. Cannot be used together with --branch-name . | | --redact-commit-info strings | [optional] The list of commit info to be redacted before sending to Kosli. Allowed values are one or more of [author, message, branch]. | | --registry-password string | [conditional] The docker registry password or access token. Only required if you want to read docker image SHA256 digest from a remote docker registry. | | --registry-provider string | [conditional] The docker registry provider or url. Only required if you want to read docker image SHA256 digest from a remote docker registry. | | --registry-username string | [conditional] The docker registry username. Only required if you want to read docker image SHA256 digest from a remote docker registry. | | --repo-root string | [defaulted] The directory where the source git repository is available. Only used if --commit is used. (default ".") | | --sonar-api-token string | [required] SonarCloud/SonarQube API token. | -| --sonar-project-key string | [required] SonarCloud/SonarQube project key. | -| --sonarqube-url string | [conditional] The URL for your SonarQube server (only required if using SonarQube for project analysis). | +| --sonar-project-key string | [conditional] The project key of the SonarCloud/SonarQube project. Only required if you want to use the project key/revision to get the scan results rather than using Sonar's metadata file. | +| --sonar-revision string | [conditional] The revision of the SonarCloud/SonarQube project. Only required if you want to use the project key/revision to get the scan results rather than using Sonar's metadata file and you have overridden the default revision, or you aren't using a CI. Defaults to the value of the git commit flag. | +| --sonar-server-url string | [conditional] The URL of your SonarQube server. Only required if you are using SonarQube and not using SonarQube's metadata file to get scan results. (default "https://sonarcloud.io") | +| --sonar-working-dir string | [conditional] The base directory of the repo scanned by SonarCloud/SonarQube. Only required if you have overriden the default in the sonar scanner or you are running the CLI locally in a separate folder from the repo. (default ".scannerwork") | | -T, --trail string | The Kosli trail name. | | -u, --user-data string | [optional] The path to a JSON file containing additional data you would like to attach to the attestation. | @@ -74,75 +85,76 @@ In [this YAML file](https://app.kosli.com/api/v2/livedocs/cyber-dojo/yaml?ci=git ## Examples Use Cases -**report a sonarcloud attestation about a trail** +**report a sonarcloud attestation about a trail using Sonar's metadata** ```shell kosli attest sonar \ --name yourAttestationName \ --flow yourFlowName \ --trail yourTrailName \ - --sonar-project-key yourSonarProjectKey \ --sonar-api-token yourSonarAPIToken \ + --sonar-working-dir yourSonarWorkingDirPath \ --api-token yourAPIToken \ --org yourOrgName \ ``` -**report a sonarqube attestation about a trail** +**report a sonarqube attestation about a trail using Sonar's metadata** ```shell kosli attest sonar \ --name yourAttestationName \ --flow yourFlowName \ --trail yourTrailName \ - --sonar-project-key yourSonarProjectKey \ --sonar-api-token yourSonarAPIToken \ - --sonarqube-url yourSonarQubeURL \ + --sonar-working-dir yourSonarWorkingDirPath \ --api-token yourAPIToken \ --org yourOrgName \ ``` -**report a sonarcloud attestation for a specific branch about a trail** +**report a sonarcloud attestation for a specific branch about a trail using key/revision** ```shell kosli attest sonar \ --name yourAttestationName \ --flow yourFlowName \ --trail yourTrailName \ - --sonar-project-key yourSonarProjectKey \ --sonar-api-token yourSonarAPIToken \ + --sonar-project-key yourSonarProjectKey \ + --sonar-revision yourSonarRevision \ --branch-name yourBranchName \ --api-token yourAPIToken \ --org yourOrgName \ ``` -**report a sonarqube attestation for a pull-request about a trail** +**report a sonarqube attestation for a pull-request about a trail using key/revision** ```shell kosli attest sonar \ --name yourAttestationName \ --flow yourFlowName \ --trail yourTrailName \ - --sonar-project-key yourSonarProjectKey \ --sonar-api-token yourSonarAPIToken \ --sonarqube-url yourSonarQubeURL \ + --sonar-project-key yourSonarProjectKey \ + --sonar-revision yourSonarRevision \ --pull-request-id yourPullRequestID \ --api-token yourAPIToken \ --org yourOrgName \ ``` -**report a sonarcloud attestation about a trail with an attachment** +**report a sonarcloud attestation about a trail with an attachment using Sonar's metadata** ```shell kosli attest sonar \ --name yourAttestationName \ --flow yourFlowName \ --trail yourTrailName \ - --sonar-project-key yourSonarProjectKey \ --sonar-api-token yourSonarAPIToken \ + --sonar-working-dir yourSonarWorkingDirPath \ --attachment yourAttachmentPath \ --api-token yourAPIToken \ --org yourOrgName diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_begin_trail.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_begin_trail.md similarity index 98% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_begin_trail.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_begin_trail.md index 27a9a3d9a..241bf4778 100644 --- a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_begin_trail.md +++ b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_begin_trail.md @@ -30,7 +30,7 @@ kosli begin trail TRAIL-NAME [flags] | -o, --origin-url string | [optional] The url pointing to where the attestation came from or is related. (defaulted to the CI url in some CIs: https://docs.kosli.com/ci-defaults ). | | --redact-commit-info strings | [optional] The list of commit info to be redacted before sending to Kosli. Allowed values are one or more of [author, message, branch]. | | --repo-root string | [defaulted] The directory where the source git repository is available. Only used if --commit is used. (default ".") | -| -f, --template-file string | [optional] The path to a yaml template file. Cannot be used together with --use-empty-template | +| -f, --template-file string | [optional] The path to a yaml template file. | | -u, --user-data string | [optional] The path to a JSON file containing additional data you would like to attach to the flow trail. | diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_completion.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_completion.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_completion.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_completion.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_config.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_config.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_config.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_config.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_create_environment.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_create_environment.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_create_environment.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_create_environment.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_create_flow.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_create_flow.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_create_flow.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_create_flow.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_diff_snapshots.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_diff_snapshots.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_diff_snapshots.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_diff_snapshots.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_disable_beta.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_disable_beta.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_disable_beta.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_disable_beta.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_enable_beta.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_enable_beta.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_enable_beta.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_enable_beta.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_expect_deployment.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_expect_deployment.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_expect_deployment.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_expect_deployment.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_fingerprint.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_fingerprint.md similarity index 88% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_fingerprint.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_fingerprint.md index 3bf6a827a..1543d9d7d 100644 --- a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_fingerprint.md +++ b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_fingerprint.md @@ -22,6 +22,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 "**" +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. + ```shell kosli fingerprint {IMAGE-NAME | FILE-PATH | DIR-PATH} [flags] ``` diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_get_approval.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_get_approval.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_get_approval.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_get_approval.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_get_artifact.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_get_artifact.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_get_artifact.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_get_artifact.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_get_deployment.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_get_deployment.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_get_deployment.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_get_deployment.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_get_environment.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_get_environment.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_get_environment.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_get_environment.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_get_flow.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_get_flow.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_get_flow.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_get_flow.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_get_snapshot.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_get_snapshot.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_get_snapshot.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_get_snapshot.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_get_trail.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_get_trail.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_get_trail.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_get_trail.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_join_environment.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_join_environment.md new file mode 100644 index 000000000..0d165162d --- /dev/null +++ b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_join_environment.md @@ -0,0 +1,49 @@ +--- +title: "kosli join environment" +beta: false +deprecated: false +--- + +# kosli join environment + +## Synopsis + +Join a physical environment to a logical environment. + +```shell +kosli join environment [flags] +``` + +## Flags +| Flag | Description | +| :--- | :--- | +| -D, --dry-run | [optional] Run in dry-run mode. When enabled, no data is sent to Kosli and the CLI exits with 0 exit code regardless of any errors. | +| -h, --help | help for environment | +| --logical string | [required] The logical environment. | +| --physical string | [required] The physical environment. | + + +## Flags inherited from parent commands +| Flag | Description | +| :--- | :--- | +| -a, --api-token string | The Kosli API token. | +| -c, --config-file string | [optional] The Kosli config file path. (default "kosli") | +| --debug | [optional] Print debug logs to stdout. A boolean flag https://docs.kosli.com/faq/#boolean-flags (default false) | +| -H, --host string | [defaulted] The Kosli endpoint. (default "https://app.kosli.com") | +| --http-proxy string | [optional] The HTTP proxy URL including protocol and port number. e.g. 'http://proxy-server-ip:proxy-port' | +| -r, --max-api-retries int | [defaulted] How many times should API calls be retried when the API host is not reachable. (default 3) | +| --org string | The Kosli organization. | + + +## Examples Use Cases + +**join a physical environment to a logical environment** + +```shell +kosli join environment \ + --physical prod-k8 \ + --logical prod \ + --api-token yourAPIToken \ + --org yourOrgName +``` + diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_list_approvals.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_list_approvals.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_list_approvals.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_list_approvals.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_list_artifacts.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_list_artifacts.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_list_artifacts.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_list_artifacts.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_list_deployments.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_list_deployments.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_list_deployments.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_list_deployments.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_list_environments.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_list_environments.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_list_environments.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_list_environments.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_list_flows.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_list_flows.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_list_flows.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_list_flows.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_list_snapshots.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_list_snapshots.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_list_snapshots.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_list_snapshots.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_list_trails.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_list_trails.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_list_trails.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_list_trails.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_log_environment.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_log_environment.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_log_environment.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_log_environment.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_rename_environment.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_rename_environment.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_rename_environment.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_rename_environment.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_rename_flow.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_rename_flow.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_rename_flow.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_rename_flow.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_approval.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_approval.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_approval.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_approval.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_artifact.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_artifact.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_artifact.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_artifact.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_artifact_generic.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_artifact_generic.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_artifact_generic.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_artifact_generic.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_artifact_junit.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_artifact_junit.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_artifact_junit.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_artifact_junit.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_artifact_pullrequest_azure.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_artifact_pullrequest_azure.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_artifact_pullrequest_azure.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_artifact_pullrequest_azure.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_artifact_pullrequest_bitbucket.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_artifact_pullrequest_bitbucket.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_artifact_pullrequest_bitbucket.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_artifact_pullrequest_bitbucket.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_artifact_pullrequest_github.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_artifact_pullrequest_github.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_artifact_pullrequest_github.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_artifact_pullrequest_github.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_artifact_pullrequest_gitlab.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_artifact_pullrequest_gitlab.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_artifact_pullrequest_gitlab.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_artifact_pullrequest_gitlab.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_artifact_snyk.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_artifact_snyk.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_artifact_snyk.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_artifact_snyk.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_commit_generic.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_commit_generic.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_commit_generic.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_commit_generic.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_commit_jira.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_commit_jira.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_commit_jira.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_commit_jira.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_commit_junit.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_commit_junit.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_commit_junit.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_commit_junit.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_commit_pullrequest_azure.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_commit_pullrequest_azure.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_commit_pullrequest_azure.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_commit_pullrequest_azure.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_commit_pullrequest_bitbucket.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_commit_pullrequest_bitbucket.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_commit_pullrequest_bitbucket.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_commit_pullrequest_bitbucket.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_commit_pullrequest_github.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_commit_pullrequest_github.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_commit_pullrequest_github.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_commit_pullrequest_github.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_commit_pullrequest_gitlab.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_commit_pullrequest_gitlab.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_commit_pullrequest_gitlab.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_commit_pullrequest_gitlab.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_commit_snyk.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_commit_snyk.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_report_evidence_commit_snyk.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_report_evidence_commit_snyk.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_request_approval.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_request_approval.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_request_approval.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_request_approval.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_search.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_search.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_search.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_search.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_snapshot_azure.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_snapshot_azure.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_snapshot_azure.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_snapshot_azure.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_snapshot_docker.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_snapshot_docker.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_snapshot_docker.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_snapshot_docker.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_snapshot_ecs.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_snapshot_ecs.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_snapshot_ecs.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_snapshot_ecs.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_snapshot_k8s.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_snapshot_k8s.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_snapshot_k8s.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_snapshot_k8s.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_snapshot_lambda.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_snapshot_lambda.md similarity index 79% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_snapshot_lambda.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_snapshot_lambda.md index 4f1a65bfb..b6ef6509e 100644 --- a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_snapshot_lambda.md +++ b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_snapshot_lambda.md @@ -9,7 +9,7 @@ deprecated: false ## Synopsis Report a snapshot of artifacts deployed as one or more AWS Lambda functions and their digests to Kosli. -Skip `--function-names` to report all functions in a given AWS account. +Skip `--function-names` to report all functions in a given AWS account. Or use `--exclude` and/or `--exclude-regex` to report all functions excluding some. To authenticate to AWS, you can either: 1) provide the AWS static credentials via flags or by exporting the equivalent KOSLI env vars (e.g. KOSLI_AWS_KEY_ID) @@ -31,6 +31,8 @@ kosli snapshot lambda ENVIRONMENT-NAME [flags] | --aws-region string | The AWS region. | | --aws-secret-key string | The AWS secret access key. | | -D, --dry-run | [optional] Run in dry-run mode. When enabled, no data is sent to Kosli and the CLI exits with 0 exit code regardless of any errors. | +| --exclude strings | [optional] The comma-separated list of AWS Lambda function names to be excluded. Cannot be used together with --function-names | +| --exclude-regex strings | [optional] The comma-separated list of name regex patterns for AWS Lambda functions to be excluded. Cannot be used together with --function-names. Allowed regex patterns are described in https://github.com/google/re2/wiki/Syntax | | --function-names strings | [optional] The comma-separated list of AWS Lambda function names to be reported. | | -h, --help | help for lambda | @@ -62,6 +64,21 @@ kosli snapshot lambda yourEnvironmentName \ ``` +**report all (excluding some) Lambda functions running in an AWS account (AWS auth provided in env variables)** + +```shell +export AWS_REGION=yourAWSRegion +export AWS_ACCESS_KEY_ID=yourAWSAccessKeyID +export AWS_SECRET_ACCESS_KEY=yourAWSSecretAccessKey + +kosli snapshot lambda yourEnvironmentName \ + --exclude function1,function2 \ + --exclude-regex "^not-wanted.*" \ + --api-token yourAPIToken \ + --org yourOrgName + +``` + **report what is running in the latest version of an AWS Lambda function (AWS auth provided in env variables)** ```shell diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_snapshot_path.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_snapshot_path.md similarity index 86% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_snapshot_path.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_snapshot_path.md index ab156fd93..ae1746974 100644 --- a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_snapshot_path.md +++ b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_snapshot_path.md @@ -14,7 +14,9 @@ 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 "**" - +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. ```shell kosli snapshot path ENVIRONMENT-NAME [flags] diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_snapshot_paths.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_snapshot_paths.md similarity index 86% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_snapshot_paths.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_snapshot_paths.md index 1944352b0..a8375de77 100644 --- a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_snapshot_paths.md +++ b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_snapshot_paths.md @@ -20,6 +20,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 "**" +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. + This is an example YAML paths spec file: ```yaml version: 1 diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_snapshot_s3.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_snapshot_s3.md similarity index 91% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_snapshot_s3.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_snapshot_s3.md index 1d9461eff..cce69bfbe 100644 --- a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_snapshot_s3.md +++ b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_snapshot_s3.md @@ -21,6 +21,9 @@ More details can be found here: https://aws.github.io/aws-sdk-go-v2/docs/configu You can report the entire bucket content, or filter some of the content using `--include` and `--exclude`. In all cases, the content is reported as one artifact. If you wish to report separate files/dirs within the same bucket as separate artifacts, you need to run the command twice. +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. ```shell kosli snapshot s3 ENVIRONMENT-NAME [flags] diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_snapshot_server.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_snapshot_server.md similarity index 88% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_snapshot_server.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_snapshot_server.md index 35c86286d..025cfa329 100644 --- a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_snapshot_server.md +++ b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_snapshot_server.md @@ -19,6 +19,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 "**" +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. + ```shell kosli snapshot server ENVIRONMENT-NAME [flags] ``` diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_status.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_status.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_status.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_status.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_tag.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_tag.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_tag.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_tag.md diff --git a/docs.kosli.com/content/legacy_ref/v2.10.13/kosli_version.md b/docs.kosli.com/content/legacy_ref/v2.10.18/kosli_version.md similarity index 100% rename from docs.kosli.com/content/legacy_ref/v2.10.13/kosli_version.md rename to docs.kosli.com/content/legacy_ref/v2.10.18/kosli_version.md