Skip to end of banner
Go to start of banner

How to validate creation of a Bitbucket repository from Jira using Run CLI Actions in Jira app

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Current »

This article explains how to add a validation for the creation of a Bitbucket repository from Jira using Run CLI Actions in Jira app.

Instructions

  1. Log into the Jira instance as an Administrator.
  2. Edit the workflow where Run CLI is to be added as a validator.
  3. Select the transition to which the CLI validator needs to be added and then click the link Validators.
  4. Click Add validator and select CLI action from the list of validation options.
  5. Add the CLI action in the Action field. Enter the CLI find pattern 1 value as the CLI action output. Replace the details as per your instance. 


    CLI action:

    -a getRepositoryList --server "http://example.com/" --user "admin" --password "admin" --project "%original_customfield_12700%" --regex "%original_customfield_12701%" 



  6. Add the post function to create the Bitbucket repository.

  7. Once the transition is performed, you can see the Bitbucket repository is created if the same repository is not present in the Bitbucket instance as per the condition added for validation.
  8. If the validation fails it throws an error as shown in the below sample:


  • No labels