Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Summary
Atlassian OnDemand restricts the ability to install most plugins. So how can you still implement concepts like How to use Confluence for Business Intelligence and Reporting? Or perhaps you are not allowed to install plugins on your own corporate Confluence installation and you would still like to publish SQL or other external data (like excel data). Now there is a solution for both of these use cases. We will discuss this in terms of OnDemand, but it applies equally to other restricted environments. While not as dynamic as using the plugins directly, it only takes a few more steps to implement and skills and knowledge gained can also be applied in the other context.
This is the how the Project summary page is produced. Bamboo automation publishes the page once a day.
Solution
Some of the elements here are optional depending on what you want to do and how automated you want to be. We will outline the most automatic and rich example.
You will need:
- An instance of Confluence (download edition) installed and running. You will need administrator rights. A $10 starter license is sufficient and an instance can be setup in minutes.
- If not already installed, install the following plugins:
- SQL Plugin for Confluence - version 4.5 or above
- Run Plugin for Confluence (optional) - provides parameterized page for testing
- CLI Plugin for Confluence - makes it easy to store the page on the OnDemand instance. After installation, configure a profile to get to OnDemand
- Create a page to test your query page just like you would normally
Create a publish page using the run, cli and sql-query macros. The key is that the sql-query produces wiki markup because of output=unrenderedWiki (this is what gets published to OnDemand)
No Format title Wiki markup for publish page {run:titleRun=Publish |autoRun=true |requestPrefix |replace=profile:confluence:Profile:select::confluence-local::confluence-OnDemand} {cli:profile=$profile|macros=true} -a storePage --title "Project Summary" --space info --file - --minor --comment "Updated from database" @DATA: \{\{toc:type=flat|separator=pipe|minLevel=3|maxLevel=3} h3. Confluence Plugins {sql-query:id=CONF|datasource=myDS|output=unrenderedWiki|columnTypes=S,S,S,S,S,S,S,S,C} select ... {sql-query} {cli} {run}
- Copy in your SQL from your test page
- Verify your local published page matches your expectation
- Once satisfied, select the OnDemand instance profile and press Publish
Tip | ||
---|---|---|
| ||
When macros=true is used in the cli macro, all embedded macros are rendered. This is how the SQL data is generated. However, you may want some macros to not be rendered and remain in the markup so they get rendered on the target page. In this example, it is the toc macro. Simply escape the open bracket so the rendered does not render it and double up the opening bracket so the cli macro will remove the extra after it is rendered. |
Tip | ||
---|---|---|
| ||
|
...