Note that all CLI command flags can be set as environment variables by adding the the
KOSLI_ prefix and capitalizing them.Defaulted Kosli command flags from CI variables
The following flags are defaulted (which means you don’t need to provide the flags, they’ll be automatically set to values listed below) as follows in the CI systems below:- GitHub
- GitLab
- Azure DevOps
- Bitbucket Cloud
- AWS CodeBuild
- CircleCI
- Teamcity
View defaulted Kosli command flags in Github Actions.For a complete example of a Github workflow using Kosli, please check the Kosli CLI’s own workflow.
Where
<PLACEHOLDERS> are Github Actions predefined variables. See here for more details.Use Kosli in Github Actions
To use Kosli in Github Actions workflows, you can use thesetup-kosli-cli GitHub Action to install the CLI on your Github Actions Runner.
Then, you can use all the CLI commands in your workflows. See the GitHub Action reference for its inputs, outputs, and version-pinning options.GitHub Secrets
Keep in mind that secrets in Github actions are not automatically exported as environment variables. You need to add required secrets to your GITHUB environment explicitly. E.g. to make kosli_api_token secret available for all cli commands as an environment variable use following:Example
Here is an example Github Actions workflow snippet usingkosli-dev/setup-cli-action running kosli create flow command: