Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

Instructions

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

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

    Image Removed
    Image Added

  6. Add the post function to create the Bitbucket repository.
    Image RemovedImage Added

Once the transition is performed,

...

if the

...

repository is not present in the Bitbucket instance as per

...

the added validation, you can see the newly created Bitbucket repository.

If the validation fails, it throws an error as shown in the

...

following sample:
Image Modified

Info