-->

CURL | 上传多个HTML文件汇合(CURL | Upload multiple html

2019-10-29 07:06发布

我需要上传从詹金斯工作区的HTML文件通过curl命令汇合。

脚本中使用: -

stage('Publish to Confluence') {
          steps {
          withCredentials([usernamePassword(credentialsId: 'confluence', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
          sh '''
          curl -v -S -u $USERNAME:$PASSWORD -X POST -H "X-Atlassian-Token: no-check" -F "file_0=@code/pydoc/manage_connections.html" "https://alm-group.atlassian.net/wiki/spaces/PROJECT/pages/830833705/PyDoc"
          '''
          }}}

问题是 - 它上传单个文件作为附件。 我需要上传一堆文件,但我不能够做到这一点。

我也跟着下面的链接,但无法破解它。 https://developer.atlassian.com/cloud/confluence/rest/#api-content-get

Answer 1:

我认为这不是一个问题,詹金斯在所有。

这实际上是重复的这一个 。

对于许多文件只是复制与@的-F。

curl -F "image=@file1.gif" -F "image2=@file2.gif"  http://localhost:8888/web/Upload.php


文章来源: CURL | Upload multiple html files to confluence