Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

What's the best way to embed URL content from Jenkins API in Confluence?

Camden Reeve April 30, 2012

We wish to include some information from our Jenkins build pages, probably via the XML API, in Confluence pages.

We thought that using the HTML Include plugin would work, but instead get the error:

HTML inclusion denied because the page at http://192.168.26.41:9090/job/ourproject/lastCompletedBuild/testReport/api/xml?xpath=/*/passCount/text() is not an HTML page.

Which makes sense as it is just a text response, in this case a number indicating the number of tests that have passed for our build.

However, I can't see any other way to retrieve the contents of a URL and embed them within the page. I tried using an iframe, using the HTML plugin, and this works, but seems to default to being a very large box, which is no good as we want to include many values from Jenkins in a table.

I'm sure I must be missing something and there is a better way to do this...please help point us in the right direction :)

1 answer

0 votes
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 1, 2012

The xslt macro of confluence claims to do this. So instead of applying the xpath on the Jenkins URL, you could try directly getting the xml and then applying the style sheet.

Check https://bobswift.atlassian.net/wiki/display/HTML/XSLT+Macro

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events