【发布时间】:2021-11-22 00:19:07
【问题描述】:
我想在 Jenkins 中创建一个进程,当一个作业正在构建时,它应该在内部调用另一个作业,该作业正在为相同的代码拉取请求生成 SONAR 报告。
当我尝试调用 API 来自动触发 Jenkins 作业时。
https://jenkins.com/job/DPNew/job/xyz/buildWithParameters?token=DW&FROM_HASH=195c8df91791768f3098ce260eb2dd8728&REPO_NAME=_python&PROJECT_KEY=%7Eabc&EMAIL=abc@gmail.com&FROM_BRANCH_NAME=feature%2FDO-451&TO_BRANCH_NAME=Port-2.7&PR_ID=622"
我的响应低于错误。
content: "<html><head><body style='background-color:white;
color:white;'>\n\n\nAuthentication required\n<!--\nYou are authenticated as: anonymous\nGroups that you are in:\n \nPermission you need to have (but didn't):
hudson.model.Hudson.Read\n ... which is implied by: hudson.security.Permission.GenericRead\n ... which is implied by:
hudson.model.Hudson.Administer\n-->\n\n</body></html>
我已经在 'user -> configure' 中创建了 Jenkins API 令牌
编辑 1: 第一个 Jenkins 作业由来自 Bitbucket 的拉取请求触发,bitbucket 中的 UI 会显示构建是否成功,如果构建成功则会显示声纳报告。
我应该怎么做才能解决这个问题?
【问题讨论】:
-
如果我的回答对您有帮助,请标记为正确或提供更多详细信息
-
@itay 我添加了一些有问题的细节