jenkins-pipeline - 詹金斯文件 | 从 Jenkins 工作区上传文档到 Confluence
问题描述
我需要从 Jenkins 工作区上传文档以通过 Jenkinsfile 汇合。
我跟进了这个链接并开始编写基本代码,并确保这不起作用。任何人都可以添加或评论或建议我几个链接。
void Publish_Doc_Confluence(){
withCredentials([[$class: 'AmazonWebServicesCredentialsBinding', credentialsId: 'iam_user_jenkins']]) {
publishConfluence attachArchivedArtifacts: true, pageName: '', replaceAttachments: true, siteName: '', spaceName: ''
}
}
我也在使用 curl 命令上传文件,但徒劳无功-
命令-
stage('Publish to Confluence') {
steps {
withCredentials([usernamePassword(credentialsId: 'confluence', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
sh '''
curl -D- -u $USERNAME:$PASSWORD -X PUT -H "X-Atlassian-Token: nocheck" -F "file=@code/pydoc/*.html" -F "minorEdit=false" 'https://alm-tuigroup.atlassian.net/wiki/rest/api/content/504955238/child/attachment'
'''
}}}
我将在汇合页面中获得如下详细信息 -
- 分页符
- 网站名称
- 空间名称
解决方案
推荐阅读
- angular - 按字母顺序显示 json 数据
- realm - 在 Electron JS 应用程序上使用来自 npm 的 Realm
- angular - 如何根据angular4中的下拉选择进行路由?
- java - JMX 获取实时堆内存使用报告常量值
- wolfram-mathematica - 在循环中命名多个变量
- java - Spring Boot 中的记录器问题
- android - 邮政编码和地址
- javascript - 隐藏所有子元素时的元素值全为零
- ms-project - 当我运行 .MPX 文件时,我收到一条消息“发生导入错误”
- php - 无法连接到 GoDaddy 上的 MySQL 数据库