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

How can I publish HTML page generated by Jenkins build to Confluence

Piyush Gupta June 5, 2019

Hello, 

I have a Jenkins task which is running a powershell script and generate an HTML. I want this html report to be displayed at confluence page and whenever a new build run it should refresh it with the latest html. I tried confluence publisher plugin but it is not picking up the file. 

16:39:58 [confluence] Attempting to attach the archived artifacts, but there are no archived artifacts from the job! Check job configuration...
16:39:58 [confluence] Uploading 0 file(s) to Confluence...
16:39:58 [confluence] Done
16:39:58 [confluence] EXPERIMENTAL: performing storage format edits on Confluence 4.0
16:39:58 [confluence] Performing wiki edits: Replace entire page content
16:39:58 [confluence] Markup file (CPG-AD-Audit-Report-6-5-2019.html) does not exist.

 

1 answer

0 votes
Ganesh Gautam
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 20, 2021

Hi Piyush,

 

Thanks so much for your question.

It looks like you are trying to use an artefact from a Jenkins build (happens to be html) and push it to Confluence page.

You can choose to use Confluence REST API(bash/ruby/nodejs) and add a task to your Jenkins pipeline. Confluence supports REST endpoints for creating a new page and uploading new attachments to a page. Please follow this Rest API guide to upload the html created in previous task. 

Pro-tip: Instead of basic auth, you can choose to use Personal Access token in your script to do so in Confluence 7.10 and above.

Thank you,

Ganesh

Confluence Data Center team

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events