I would like to publish the output of bash script in confluence using jenkins, and everytime the page in confluence opened will the output updated. Is there any possibility to do that? thx
Asked
Active
Viewed 594 times
1 Answers
0
You can use Confluence Rest Api.
You can try this https://developer.atlassian.com/server/confluence/confluence-rest-api-examples/
Example:
curl -u jira_username_login:jira_password -X POST -H 'Content-Type: application/json' -d '{"type":"page","title":"new page",
"space":{"key":"TST"},"body":{"storage":{"value":"<p>This is <br/> a new page</p>","representation":
"storage"}}}' http://localhost:8080/confluence/rest/api/content/ | python -mjson.tool
To get bash output: How to set a variable to the output of a command in Bash?

Mukesh M
- 2,242
- 6
- 28
- 41
-
1Thx Mukesh M, do you have any idea, how can i insert this variable (which include bash script output) in confluence rest api. – xfask Dec 02 '18 at 13:29