Skip to end of banner
Go to start of banner

How to create Confluence pages

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 2 Current »

Summary

At a stage in the workflow of a JIRA issue, you may want to do some action against the Confluence instance. For instance, create a skeleton design page or add a comment to an existing page. By taking advantage of the normal Confluence notification support, this could be used to involve non-developers in the workflow of an issue including people that may not have direct access to JIRA. This is relatively easy to do. 

It is assumed you are familiar with JIRA workflow design and editing. You should also be comfortable running CLI actions from the command line first.

Steps

  1. Determine the CLI action(s) you want to run on your Confluence instance.
  2. Use the Confluence CLI client to test running of the action(s) to ensure you have the right parameters and it does everything you need. In the case of creating a page, make sure the page looks they way you want it.
    • Use addPage to create a new page. An alternative is to use storePage if you want to create a page or overwrite an existing page. 
    • A better alternative may be to use copyPage to copy a template page. Use descendents parameter to copy a whole tree of template pages.
    • Recommend using wiki markup (default) as it is normally easier to deal with. An alternative is to use storage format (noConvert parameter) but make sure it is accurate by copying from an example page storage view. 
  3. Recommend the following to help you will problem determinate: How to add advanced logging.
  4. Edit your workflow.
  5. Select to Add a post function in the appropriate transition.
  6. Select CLI action.
  7. Select Confluence in the Product pulldown.
  8. Copy the single CLI action from step 2 into the Action field. Note that Substitution variables can be used.
  9. If you have multiple actions, use the run action in the Action field and all the individual actions in the Data field, one per line. 
  10. Save.
  11. Publish the workflow.
  12. Test on an example issue by running the workflow step.
  13. Verify the page is created as expected.

Advanced Examples

The above shows the setup required to run a Confluence action as part of a JIRA workflow. Once that is mastered, you can easily extend your example to cover more advanced user scenarios. That usually means a more complicated Confluence action needs to be run. It is best and fastest to construct that by using the Confluence client to test first and then once you are happy with the result, it can be copied back into the JIRA post function. Here are some scenarios:

  • No labels