Bash Reference
FlowCov provides you with detailed configuration options to control how to upload your reports. On this page, you will find all options available.
Reference
You can always see this reference by opening a shell and executing this command:
bash <(curl -s https://bash.flowcov.io) --help
Required parameters
The following parameters are required for each run. If one of these is missing, the script execution will fail with an error.
-a <KEY>
*
Specifies the API key to authenticate and authorize you. Also available by specifying one of these:
--api-key <KEY>
FLOWCOV_API_KEY=<KEY>
-r <ID>
*
Specifies the ID of the repository to upload the reports into. You need to have at least the Member role to upload builds. Also available by specifying one of these:
--repository-id <ID>
FLOWCOV_REPOSITORY_ID=<ID>
Build types
If no build type is specified, auto-detection will be used to determine any supported CI provider. Setting one of these flags does not disable auto-detection for commit information.
By default, the script tries to discover if it is ran inside an automated CI pipeline. It currently supports the following vendors:
- Jenkins
- Travis CI
- Codebuild CI
- CircleCI
- GitLab CI
- GitHub Actions
If the detection does not work for your vendor, or you want to specify manually if this is a local or a CI build, you can specify either -c
or -l
. These flags are mutually exclusive. If both are specified, the last specified will win.
-c
Override the build type as CI build. Also available by specifying one of these:
--ci
-l
Override the build type as local build. Also available by specifying one of these:
--local
--no-ci
 [DEPRECATED]
Commit information
Each build contains information about the commit that it was created for. The following information will included:
- Commit ID
- Commit Message
- Commit Author (name and email)
- Branch Name
By default, this information will be extracted from the environment variables set by your CI provider. The following information is available for the supported CI vendors:
- Jenkins: Commit ID, Branch name
- Travis CI: Commit ID, Branch name, Commit message
- Codebuild CI: Commit ID, Branch name
- CircleCI: Commit ID, Branch name
- GitLab CI: Commit ID, Branch name, Commit message
- GitHub Actions: Commit ID, Branch name
If some information is missing, your CI provider cannot be detected, or you are using a local build, git will instead be queried for that information. For that to work, the git binary must be available on your path.
Information that you specify manually always have precedence over auto-detected information.
-ci <SHA>
This parameter allows you to manually override the commit id that this upload is tagged with. Also available by specifying one of these:
--commit-id <SHA>
FLOWCOV_COMMIT_ID=<SHA>
important
If you specify the commit id manually, this commit id will also be used to extract the commit message and author from git. This does not apply if the information is extracted from your CI environment, or if you specify the information manually by passing it as parameters.
-cm <MSG>
This parameter allows you to manually override the commit message that this upload is tagged with. Also available by specifying one of these:
--commit-message <MSG>
FLOWCOV_COMMIT_MESSAGE=<MSG>
-ca <NAME>
This parameter allows you to manually override the commit author that this upload is tagged with. Also available by specifying one of these:
--commit-author <NAME>
FLOWCOV_COMMIT_AUHTOR=NAME
For the name to be correctly detected in the UI, it should be specified in the format AUTHOR_NAME <AUTHOR_EMAIL>
, for example John Doe <j.doe@flowcov.io>
.
-b <NAME>
This parameter allows you to manually override the branch name that this upload is tagged with. Also available by specifying one of these:
--branch-name <NAME>
FLOWCOV_BRANCH_NAME=<NAME>
-xa
This flag disables the auto-detection of commit information for the CI environment and git. You need to specify the information manually or no commmit information will be added to this build. Also available by specifying one of these:
--no-auto-detection
FLOWCOV_NO_AUTO_DETECTION=true
-xg
This flag disables the auto-detection of commit information for git only. Information from the CI environment will still be used. You can alternatively provide commit information manually. Also available by using one of these:
--no-git
FLOWCOV_NO_GIT=true
Upload parameters
These parameters allow you to change the default behavior of the script.
-s <DIR>
This parameter allows you to override the location that is recursively searched for reports. By default, the current directory and all subdirectories will be searched. Also available by specifying one of these:
--dir <DIR>
FLOWCOV_SEARCH_DIR=<DIR>
-f
This parameter forces the script to exit with code 1 if an error occurs. This usually fails your pipeline. The default behavior is to always exit with code 0. Also available by specifying one of these:
--fail-on-error
FLOWCOV_FAIL_ON_ERROR=true
-e
This parameter forces the script to skip the upload if no reports were found. The default behavior is to always upload the build, even if no reports were found. Also available by specifying one of these:
--skip-empty-upload
FLOWCOV_SKIP_EMPTY_UPLOAD=true
-u <URL>
This parameter allows you to define the target server for the upload. By default, https://app.flowcov.io/ will be used. This is usually only required if you use testing environments or have an on-premise or dedicated installation of FlowCov. The http(s):// part is required and there must be no slash at the end of the url.
Help and debug options
These parameters help you debug if the script does not behave as you expect.
-h
This parameter prints the help dialog shown at the top of the screen. Also available by specifying one of these:
--help
-d
This parameter prints the generated request body to console output instead of sending it to the server. Also available by specifying one of these:
--debug
FLOWCOV_DEBUG=true
-v
This parameter enables verbose output logging. Additional information is printed to console output and the curl command will be executed in verbose mode as well. Also available by specifying one of these:
--verbose
FLOWCOV_VERBOSE=true