Synopsis
kosli assert artifact:
- Against an environment. When
--environmentis specified, asserts against all policies currently attached to the given environment. - Against one or more policies. When
--policyis specified, asserts against all the given policies. - Against a flow. When
--flowis specified, asserts against the current template file of the given flow. - Against many flows. When none of
--environment,--policy, or--floware specified, asserts against the template files of all flows the artifact is found in (by fingerprint).
Flags
Flags inherited from parent commands
Live Examples in different CI systems
- GitHub
- GitLab
View an example of the
kosli assert artifact command in GitHub.In this YAML file, which created this Kosli Event.Examples Use Cases
These examples all assume that the flags--api-token, --org, --host, (and --flow, --trail when required), are set/provided.
assert that an artifact meets all compliance requirements for an environment
assert that an artifact meets all compliance requirements for an environment
assert that an artifact meets a set of policies
assert that an artifact meets a set of policies
fail if an artifact has a non-compliant status in a single flow (using the artifact fingerprint)
fail if an artifact has a non-compliant status in a single flow (using the artifact fingerprint)
fail if an artifact has a non-compliant status in any flow (using the artifact name and type)
fail if an artifact has a non-compliant status in any flow (using the artifact name and type)