kosli pipeline declare

kosli pipeline declare #

Declare or update a Kosli pipeline

Synopsis #

Declare or update a Kosli pipeline by providing a JSON pipefile or by providing pipeline parameters in flags. The pipefile contains the pipeline metadata and compliance policy.

kosli pipeline declare [flags]

Flags #

FlagDescription
--description string[optional] The Kosli pipeline description.
-h, --helphelp for declare
--pipefile string[deprecated] The path to the JSON pipefile.
--pipeline stringThe name of the pipeline to be created or updated.
-t, --template stringsThe comma-separated list of required compliance controls names. (default [artifact])
--visibility stringThe visibility of the Kosli pipeline. Options are [public, private]. (default "private")

Options inherited from parent commands #

FlagDescription
-a, --api-token stringThe Kosli API token.
-c, --config-file string[optional] The Kosli config file path. (default "merkely")
-D, --dry-runWhether to run in dry-run mode. When enabled, data is not sent to Kosli and the CLI exits with 0 exit code regardless of errors.
-H, --host stringThe Kosli endpoint. (default "https://app.merkely.com")
-r, --max-api-retries intHow many times should API calls be retried when the API host is not reachable. (default 3)
-o, --owner stringThe Kosli user or organization.
-v, --verbosePrint verbose logs to stdout.

Examples #


# create/update a Kosli pipeline without a pipefile:
kosli pipeline declare \
	--pipeline yourPipelineName \
	--description yourPipelineDescription \
    --visibility private OR public \
	--template artifact,evidence-type1,evidence-type2 \
	--api-token yourAPIToken \
	--owner yourOrgName

# create/update a Kosli pipeline with a pipefile (this is a legacy way which will be removed in the future):
kosli pipeline declare \
	--pipefile /path/to/pipefile.json \
	--api-token yourAPIToken \
	--owner yourOrgName

The pipefile format is:
{
    "name": "yourPipelineName",
    "description": "yourPipelinedescription",
    "visibility": "public or private",
    "template": [
        "artifact",
        "evidence-type1",
        "evidence-type2"
    ]
}