如何按计划将文件上传到Confluence?

时间:2015-04-17 13:08:05

标签: confluence

我们使用汇合作为项目wiki等。

有很多有用的文档,表格等等。但是其中许多可能是实际的一天,而不是实际的第二天。

因此,使用/(实现?)功能将是完美的,它将按计划重新上传所需的文件。文件将(例如)从git存储库获取。

所以,我的问题是:汇合是否有这样的功能((重新)按计划上传文件)?如果没有,有没有办法实现这个,除了新的插件写作?

1 个答案:

答案 0 :(得分:4)

如果您有CI服务器(如Jenkins),则可以使用Confluence REST API创建每晚作业以上传新版本的文档。

摘自doc:

A simple example to upload a file called "myfile.txt" to the Attachment with id "456" in a container with id "123", with the comment updated, and minorEdit set to true:
curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F "file=@myfile.txt" -F "minorEdit=true" -F "comment=This
                  is my updated File" http://myhost/rest/api/content/123/child/attachment/456/data
相关问题