0

我尝试使用这种类型的逻辑在拉取请求的报告选项卡下的 bitbucket 云上发布。我可以在 jenkins 作业中看到摘要,但它没有显示在报告选项卡上。有什么建议么?这是 API 上的 BB 文档https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/commit/%7Bcommit%7D/reports/% 7BreportId%7D

def BBapiUrl = "https://api.bitbucket.org/2.0/repositories/removed_Organization/${BB_REPO}/commit/${GIT_COMMIT}/reports/${reportName}-${GIT_REVISION.substring(0,7)}"
def details = "Fail Count: ${fail} Total Count: ${total} Skipped: ${skipped}"
def response = sh(returnStdout: true, label: 'publish_reports', script: """curl -X PUT ${APIURL} \
    -H 'Content-Type: application/json' \
    -d '{
        "title": "${reportName} Results",
        "details": "${details}",
        "report_type": "${testType}",
        "reporter": "JenkinsB",
        "link": "${linkToArvchive}",
        "result": "${reportResult}",
        "data": [{"title": "Safe to merge?","type": "BOOLEAN","value": "${safeMerge}"}]
        }' 
    """).trim()
4

0 回答 0