【发布时间】:2018-12-01 17:19:33
【问题描述】:
我想使用 jenkins 在 confluence 中发布 bash 脚本的输出,每次打开 confluence 中的页面都会更新输出。有没有可能这样做?谢谢
【问题讨论】:
标签: jenkins jenkins-plugins jenkins-pipeline confluence confluence-rest-api
我想使用 jenkins 在 confluence 中发布 bash 脚本的输出,每次打开 confluence 中的页面都会更新输出。有没有可能这样做?谢谢
【问题讨论】:
标签: jenkins jenkins-plugins jenkins-pipeline confluence confluence-rest-api
您可以使用 Confluence Rest Api。
你可以试试这个https://developer.atlassian.com/server/confluence/confluence-rest-api-examples/
例子:
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
要获得 bash 输出: How to set a variable to the output of a command in Bash?
【讨论】: