Edit workflow
- Edit the workflow
- Find the workflow step
- Select Validators or Post Functions tab
- Select Add
- Find and select CLI action
Parameter input dialog
CLI action validators and post functions share the same parameters.
- Product - select the product (JIRA, Confluence, Bamboo, Crucible, FishEye) to be accessed
- Action - provide an action string valid for the product selected - same as what you would do from a command line
- Data - some CLI actions can input data from standard input or using the file parameter and this allows the input data to be provided directly
- When using the file parameter, specify to use standard input: file -
- Find pattern1 - A regex pattern that is used to find data on the result produced by running the CLI action
- For a validator, if the pattern is not found, the validator will fail
- Regex find groups are available as substitution variables using syntax like pattern1_1, pattern1_2, etc ...
- Find pattern2 - a second find pattern
- Regex find groups are available as substitution variables using syntax like pattern2_1, pattern2_2, etc ...
- Message - Validator error message and workflow property value
- If validator fails (action fails or one of the find patterns do not match), this error message will be shown as a transition error
- Use text and substitution variables to construct a reasonable message
- For both validators and post functions, this message is passed as a workflow property for access in subsequent CLI actions
- Notes - This provides administrators an opportunity to better document this workflow function
Variable substitution
A variety of substitution variables are available to use in text parameters.
Table of Contents | ||||||||
---|---|---|---|---|---|---|---|---|
|
Workflow functions
There are 2 primary ways to use this add-on.
Workflow post function to run CLI actions on a transition - see CLI Post Function and CLI Validator
Administrator UI for running CLI actions directly - see Administrator UI to Run CLI Actions
Related documentation
Action Reference - find product specific actions that you can run as part of the transition
Logging
Setting up advanced logging is highly recommended. See How to add advanced logging.
Security
CLI actions require user credentials to access Atlassian servers. Those credentials must be provided on the action, there isn't currently any way to avoid that even with Application links. Consider setting up an automation account for CLI automation use.
Limitations
Actions like updateIssue and setFieldValue should not be used to update system fields if they reference the issue being transitioned. Instead, use post functions that are available for those specific functions directly. See JCLIP-19 for more information.