How to set up a self service CLI page for administrators

Summary

This shows how to set up a self service CLI page for trusted administrators. The page needs to have view permission restricted to only trusted users for the profiles listed. A similar page can be set up for general users if an additional password is a required input parameter to use on the CLI call.

Steps

  1. Configure the Run CLI Actions in Confluence with appropriate profiles.
  2. Copy the example page markup to a suitable location.
  3. Install Run Self-Service Reports for Confluence.
  4. Install Cache for Confluence, or remove section using the cache macro.
  5. Install the Linking add-on or remove section using the link-to macro.
  6. Edit the run macro markup to customize the profiles available in your installation.
  7. Edit the page restrictions to allow view only to trusted administrators.
Example page
{section} {column}

h3. Description
- Use this page to run CLI commands for Confluence, JIRA, Bamboo, FishEye, and Crucible
- About the [Confluence CLI plugin|https://plugins.atlassian.com/plugin/details/843829] with [documentation|https://appfire.atlassian.net/wiki/display/CCLI]
- [General Atlassian CLI documentation|https://appfire.atlassian.net/wiki/display/ACLI]

{csv:output=wiki}
Product, Documentation, Examples
Confluence, [documentation|https://appfire.atlassian.net/wiki/display/CSOAP/documentation], [examples|https://appfire.atlassian.net/wiki/display/CSOAP/examples] 
JIRA, [documentation|https://appfire.atlassian.net/wiki/display/JCLI/documentation], [examples|https://appfire.atlassian.net/wiki/display/JCLI/examples] 
Bamboo, [documentation|https://appfire.atlassian.net/wiki/display/BCLI/documentation], [examples|https://appfire.atlassian.net/wiki/display/BCLI/examples] 
Crucible, [documentation|https://appfire.atlassian.net/wiki/display/CRUCLI/documentation], [examples|https://appfire.atlassian.net/wiki/display/CRUCLI/examples] 
FishEye, [documentation|https://appfire.atlassian.net/wiki/display/FCLI/documentation], [examples|https://appfire.atlassian.net/wiki/display/FCLI/examples] 
{csv}

{column} {column:width=50%}
{tip:title=Previous examples}
Look at the {link-to:page attachments}attachments{link-to}
{tip}

{tip:title=Use: Run and save output}
Once you are finished testing and have a production run, use the *Run and save output* button so that the action information and log can be kept as an attachment for future reference.
{tip}

----
{cache:refresh=7d|checkAttachments=false|showRefresh=true|showDate=true}
h4. CLI client version
{cli:profile=confluence|panel=false}-a getClientInfo{cli}
{cache}

{column} {section}

h3. Run CLI actions

{run:id=cli|inputSize=300|titleRun=Run|autoRun=false|anchor=results|dateFormat=yyyy-MM-dd hh.mm.ss|autorun=false|titleExport=Run and save output|autoExport=false|hideExport=false|exportFile=?^$current_time_$profile.html|attachmentComment=?$profile|
replace=profile:Confluence:Profile:select::confluence::jira::bamboo::crucible::fisheye::' ':none,
action:-a getServerInfo:CLI action:textarea-required:5:90}

{anchor:results}
----
Results generated: *$current_time*
{noformat:title=Action}
$action
{noformat}

{cli:profile=$profile}
$action
{cli}

{run}

Screen shot